Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lancejpollard/519774 to your computer and use it in GitHub Desktop.
Save lancejpollard/519774 to your computer and use it in GitHub Desktop.
// css
.opacity {
opacity: .80;
filter: alpha(opacity=80);
-ms-filter: "alpha(opacity=$value)";
-khtml-opacity: .80;
-moz-opacity: .80;
}
// sass
@mixin opacity($value) {
opacity: #{"." + $value};
filter: alpha(opacity=$value);
-ms-filter: "alpha(opacity=$value)";
-khtml-opacity: #{"." + $value};
-moz-opacity: #{"." + $value};
}
.opacity {
@include opacity(80);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment