Skip to content

Instantly share code, notes, and snippets.

@ryanburgess
Last active December 30, 2015 18:18
Show Gist options
  • Save ryanburgess/7866203 to your computer and use it in GitHub Desktop.
Save ryanburgess/7866203 to your computer and use it in GitHub Desktop.
Add opacity to a class in your SASS file using the Opacity SASS Mixin.
// -----------------------------------------
// Opacity
// -------------------------------------------
// example: @include opacity(0.8);
@mixin opacity($opacity) {
opacity: $opacity;
$opacity-ie: $opacity * 100;
filter: alpha(opacity=$opacity-ie); //IE8
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment