aboutsummaryrefslogtreecommitdiff
path: root/stylesheets/library/_opacity.sass
diff options
context:
space:
mode:
authorB Mathis <brandon@imathis.com>2009-11-05 21:34:41 -0600
committerB Mathis <brandon@imathis.com>2009-11-05 21:34:41 -0600
commitf7700443ece4537c252b10a7463d12fd1725f40a (patch)
tree9eefa52f5435bdfb7fd86984ee7ae3ed518b4f5f /stylesheets/library/_opacity.sass
parent145f81046bc5881d7da86b05c8b92862b63f8080 (diff)
downloadmy_new_personal_website-f7700443ece4537c252b10a7463d12fd1725f40a.tar.xz
my_new_personal_website-f7700443ece4537c252b10a7463d12fd1725f40a.zip
moved stylesheets
Diffstat (limited to 'stylesheets/library/_opacity.sass')
-rw-r--r--stylesheets/library/_opacity.sass18
1 files changed, 18 insertions, 0 deletions
diff --git a/stylesheets/library/_opacity.sass b/stylesheets/library/_opacity.sass
new file mode 100644
index 00000000..f8d2a056
--- /dev/null
+++ b/stylesheets/library/_opacity.sass
@@ -0,0 +1,18 @@
+//**
+ Provides cross-browser css opacity.
+ @param !opacity
+ A number between 0 and 1, where 0 is transparent and 1 is opaque.
+=opacity(!opacity)
+ :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)