Created
September 5, 2014 19:14
-
-
Save jeremyboggs/1e4e4a428e8d5aa257ad to your computer and use it in GitHub Desktop.
Sass/Compass mixin to do filter gradient in IE.
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 ie-filter-gradient($start-color, $end-color, $orientation: vertical) { | |
@include has-layout; | |
$gradient-type: if($orientation == vertical, 0, 1); | |
@each $property in -ms-filter, filter { | |
#{$property}: progid:DXImageTransform.Microsoft.gradient(gradientType=#{$gradient-type}, startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Modified from http://compass-style.org/reference/compass/css3/images/#mixin-filter-gradient