diff --git a/frameworks/compass/stylesheets/compass/utilities/_general.sass b/frameworks/compass/stylesheets/compass/utilities/_general.sass index a09b235a..8e593fec 100644 --- a/frameworks/compass/stylesheets/compass/utilities/_general.sass +++ b/frameworks/compass/stylesheets/compass/utilities/_general.sass @@ -4,3 +4,4 @@ @import general/tag_cloud.sass @import general/inline_block.sass @import general/hacks.sass +@import general/opacity.sass \ No newline at end of file diff --git a/frameworks/compass/stylesheets/compass/utilities/general/_opacity.sass b/frameworks/compass/stylesheets/compass/utilities/general/_opacity.sass new file mode 100644 index 00000000..04b85ec4 --- /dev/null +++ b/frameworks/compass/stylesheets/compass/utilities/general/_opacity.sass @@ -0,0 +1,15 @@ +// expects a number from 0 to 1 +=opacity(!opacity = 1) + :opacity= !opacity + :-moz-opacity= !opacity + :-khtml-opacity= !opacity + :-ms-filter= "progid:DXImageTransform.Microsoft.Alpha(Opacity=" + round(!opacity*100) + ")" + :filter= "alpha(opacity=" + round(!opacity*100) + ")" + +// Make an element completely transparent. +=transparent + +opacity(0) + +// Make an element completely opaque. +=opaque + +opacity(1)