Skip to content

Instantly share code, notes, and snippets.

@gbbowers
Forked from hexorx/multi-shadow
Created September 28, 2010 21:25
Show Gist options
  • Save gbbowers/601810 to your computer and use it in GitHub Desktop.
Save gbbowers/601810 to your computer and use it in GitHub Desktop.
SCSS multi-shadow
@include multi-shadow(rgba(0,0,0,.35) 0 2px 3px 0 inset, rgba(255,255,255,.5) 0 1px 2px);
@mixin multi-shadow($shadow-1, $shadow-2: false, $shadow-3: false, $shadow-4: false, $shadow-5: false, $shadow-6: false, $shadow-7: false, $shadow-8: false, $shadow-9: false) {
$full: $shadow-1;
@if $shadow-2 {
$full: $full + "," + $shadow-2;
}
@if $shadow-3 {
$full: $full + "," + $shadow-3;
}
@if $shadow-4 {
$full: $full + "," + $shadow-4;
}
@if $shadow-5 {
$full: $full + "," + $shadow-5;
}
@if $shadow-6 {
$full: $full + "," + $shadow-6;
}
@if $shadow-7 {
$full: $full + "," + $shadow-7;
}
@if $shadow-8 {
$full: $full + "," + $shadow-8;
}
@if $shadow-9 {
$full: $full + "," + $shadow-9;
}
-moz-box-shadow: $full;
-webkit-box-shadow: $full;
-o-box-shadow: $full;
box-shadow: $full;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment