Skip to content

Instantly share code, notes, and snippets.

@jaydiablo
Created March 10, 2015 17:11
Show Gist options
  • Save jaydiablo/7ef697434a2c7d6f8072 to your computer and use it in GitHub Desktop.
Save jaydiablo/7ef697434a2c7d6f8072 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
@mixin img-opacity($trans) {
$trans100: ($trans * 100);
filter : alpha(opacity=$trans100);
-ms-filter : "progid:DXImageTransform.Microsoft.Alpha(Opacity=#{$trans * 100})";
-moz-opacity : $trans;
-khtml-opacity : $trans;
opacity : $trans;
}
img {
@include img-opacity(.5);
}
img {
filter: alpha(opacity=50);
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
-moz-opacity: 0.5;
-khtml-opacity: 0.5;
opacity: 0.5;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment