Created
January 17, 2014 23:36
-
-
Save stormwarning/8483691 to your computer and use it in GitHub Desktop.
Easy cross-browser opacity.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Cross-browser opacity. | |
* | |
* 1. Even IE8 | |
* | |
* Usage: | |
* | |
@include opacity(0.8); | |
* | |
*/ | |
@mixin opacity($opacity) { | |
opacity: $opacity; | |
$opacity-ie: $opacity * 100; | |
filter: alpha(opacity=$opacity-ie); /* [1] */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment