[Compass Core] New mixin: +opacity(amount). Provides cross-browser css opacity.
Amount should be between 0 and 1, where 0 is transparent and 1 is opaque.
This commit is contained in:
parent
dafbd88588
commit
31bdbe815b
@ -4,3 +4,4 @@
|
||||
@import general/tag_cloud.sass
|
||||
@import general/inline_block.sass
|
||||
@import general/hacks.sass
|
||||
@import 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)
|
Loading…
Reference in New Issue
Block a user