@import “shared”;
// Provides cross-browser CSS opacity. Takes a number between 0 and 1 as the argument, e.g. 0.5 for 50% opacity. // // @param $opacity // A number between 0 and 1, where 0 is transparent and 1 is opaque.
@mixin opacity($opacity) {
opacity: $opacity; @if $experimental-support-for-microsoft { $value: unquote("progid:DXImageTransform.Microsoft.Alpha(Opacity=#{round($opacity * 100)})"); @include experimental(filter, $value, not -moz, not -webkit, not -o, -ms, not -khtml, official // even though filter is not an official css3 property, IE 6/7 expect it. ); }
}
// Make an element completely transparent. @mixin transparent { @include opacity(0); }
// Make an element completely opaque. @mixin opaque { @include opacity(1); }