Skip to content

Instantly share code, notes, and snippets.

@jeremyboggs
Created September 5, 2014 19:14
Show Gist options
  • Save jeremyboggs/1e4e4a428e8d5aa257ad to your computer and use it in GitHub Desktop.
Save jeremyboggs/1e4e4a428e8d5aa257ad to your computer and use it in GitHub Desktop.
Sass/Compass mixin to do filter gradient in IE.
@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)}');
}
}
@jeremyboggs
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment