aboutsummaryrefslogtreecommitdiff
path: root/source/stylesheets/library/_opacity.sass
blob: f8d2a056c1875660d62b8033868d0ad3f0fb1ba4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)