Skip to content

Instantly share code, notes, and snippets.

@jdeagle
Created January 14, 2013 23:08
Show Gist options
  • Save jdeagle/4534407 to your computer and use it in GitHub Desktop.
Save jdeagle/4534407 to your computer and use it in GitHub Desktop.
SCSS - IE8 Opacity mixin
@mixin opacity($opacity) {
// @if $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8 {
// -ms-filter: unquote("progid:DXImageTransform.Microsoft.Alpha(Opacity=#{round($opacity * 100)})");
//}
filter: alpha(opacity= round($opacity * 100)); /* internet explorer */
opacity: $opacity; /* fx, safari, opera, chrome */
-ms-filter: unquote("progid:DXImageTransform.Microsoft.Alpha(Opacity=#{round($opacity * 100)})");
//-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=50)"; /*IE8*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment