Skip to content

Instantly share code, notes, and snippets.

@jasonkmccoy
Created March 13, 2015 00:03
Show Gist options
  • Save jasonkmccoy/b674494f1b890ae9824f to your computer and use it in GitHub Desktop.
Save jasonkmccoy/b674494f1b890ae9824f to your computer and use it in GitHub Desktop.
@mixin opacity($opacity) {
opacity: $opacity;
$opacity-ie: $opacity * 100;
filter: alpha(opacity=$opacity-ie); //IE8
}
.faded-text {
@include opacity(0.8);
}
@jasonkmccoy
Copy link
Author

This mixin ensures cross browser opacity all the way down to Internet Explorer 5. Though if you have to optomize for IE5, you have a lot bigger problems than opacity, godspeed my friend.

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