Created
July 5, 2011 20:46
-
-
Save jakebellacera/1065880 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin box-shadow($shadow-1: default, $shadow-2: false, $shadow-3: false, $shadow-4: false, $shadow-5: false, $shadow-6: false, $shadow-7: false, $shadow-8: false, $shadow-9: false, $shadow-10: false) { | |
// This has to be on a single line due to a bug in the scss parser: https://github.com/nex3/sass/issues/issue/26 | |
$legacy: type-of($shadow-1) == color and type-of(if($shadow-2, $shadow-2, 0)) == number and type-of(if($shadow-3, $shadow-3, 0)) == number and type-of(if($shadow-4, $shadow-4, 0)) == number and type-of(if($shadow-5, $shadow-5, 0)) == number and ($shadow-6 == inset or type-of($shadow-6) == bool) and ($shadow-2 or $shadow-3 or $shadow-4 or $shadow-5 or $shadow-6); | |
@if $legacy { | |
@warn "Passing separate arguments for a single shadow to box-shadow is deprecated. " + "Pass the values as a single space-separated list, or use the single-box-shadow mixin. " + "See http://beta.compass-style.org/help/tutorials/upgrading/antares/ for more info."; | |
@include single-box-shadow(if($shadow-1, $shadow-1, $default-box-shadow-color), if($shadow-2, $shadow-2, $default-box-shadow-h-offset), if($shadow-3, $shadow-3, $default-box-shadow-v-offset), if($shadow-4, $shadow-4, $default-box-shadow-blur), if($shadow-5, $shadow-5, $default-box-shadow-spread), if($shadow-6, $shadow-6, $default-box-shadow-inset)); } | |
@else { | |
@else if $shadow-1 == default { | |
$shadow-1: -compass-space-list(compact(if($default-box-shadow-inset, inset, false), $default-box-shadow-h-offset, $default-box-shadow-v-offset, $default-box-shadow-blur, $default-box-shadow-spread, $default-box-shadow-color)); } | |
$shadow: compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10); | |
@include experimental(box-shadow, $shadow, -moz, -webkit, -o, not -ms, not -khtml, official); } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment