Skip to content

Instantly share code, notes, and snippets.

@Usse
Created November 7, 2012 11:38
Show Gist options
  • Save Usse/4030994 to your computer and use it in GitHub Desktop.
Save Usse/4030994 to your computer and use it in GitHub Desktop.
Sass Mixin for opacity prefix
// Opacity Prefix
// $level must be between 0 and 1
@mixin opacity($level) {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity="$level*100")";
filter: alpha(opacity=$level*100);
opacity: $level;
}
//Usage:
@include opacity(0.4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment