Created
February 28, 2013 13:28
-
-
Save jensgro/5056686 to your computer and use it in GitHub Desktop.
Simple mixin to integrate a box-shadow and include a filter-expression for oldIE. If the box-shadow is inset the filter will be omitted as it doesn't provide inset-view.
This file contains hidden or 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-s($x, $y, $offset, $color, $inset: false) { | |
$ie-color: ie-hex-str($color); | |
@if $inset { | |
-webkit-box-shadow: inset $x $y $offset $color; | |
box-shadow: inset $x $y $offset $color; | |
} @else { | |
-webkit-box-shadow: $x $y $offset $color; | |
box-shadow: $x $y $offset $color; | |
filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=#{$x}, OffY=#{$y}, Color='#{$ie-color}'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment