stylus / nib

Stylus mixins, utilities, components, and gradient image generation
http://stylus.github.io/nib
MIT License
1.91k stars 249 forks source link

Add opactity mixin #270

Open neysimoes opened 9 years ago

neysimoes commented 9 years ago

Mixin for opacity with IE suport

opacity(n)
  -khtml-opacity n
  -moz-opacity n
  opacity n
  -ms-filter unquote('"progid:DXImageTransform.Microsoft.Alpha(Opacity=' + round(n * 100) + ')"')
  filter unquote('alpha(opacity=' + round(n * 100) + ')')
notslang commented 9 years ago

pretty sure we already have this: https://github.com/visionmedia/nib/blob/701efeecde722790cdd95654b4a9c40f02d63efb/lib/nib/vendor.styl#L268

...you just need to enable IE support.