Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
SASS/SCSS Internet Explorer Compatible Opacity Mixin
@mixin opacity($alpha) {
// IE 8
// IE 5-7
filter: alpha(opacity=$alpha*100);
// Real Browsers
-webkit-opacity: $alpha;
-moz-opacity: $alpha;
-khtml-opacity: $alpha;
opacity: $alpha;
// 50% transparency
@include opacity(.5);
// no transparency
@include opacity(1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment