Created
September 3, 2013 05:21
-
-
Save saki007ster/6419957 to your computer and use it in GitHub Desktop.
From http://groundwork.sidereel.com/mixins
Drop Shadow
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 drop-shadow($color:rgba(0,0,0,0.2), $blur:0, $x:0, $y:0) { // color, blur, x, y | |
-ms-box-shadow:$x $y $blur $color; // IE10+ | |
@if ($x == 0 and $y == 0) { // non directional glow | |
filter: Glow(color=#{ie-hex-str($color)},strength=#{numericvalue($blur)}); | |
-ms-filter: glow(color=#{ie-hex-str($color)},strength=#{numericvalue($blur)}); | |
} @else { | |
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=#{numericvalue($blur)}, Direction=#{degrees($x, $y)}, Color='#{ie-hex-str($color)}')"; // IE8 | |
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=#{numericvalue($blur)}, Direction=#{degrees($x, $y)}, Color='#{ie-hex-str($color)}'); // IE7- | |
} | |
-o-box-shadow:$x $y $blur $color; // Opera | |
-moz-box-shadow:$x $y $blur $color; // Firefox | |
-webkit-box-shadow:$x $y $blur $color; // Webkit (Safari, Chrome, other) | |
box-shadow:$x $y $blur $color; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment