Skip to content

Instantly share code, notes, and snippets.

@imathis
Created July 16, 2009 19:50
Show Gist options
  • Save imathis/148655 to your computer and use it in GitHub Desktop.
Save imathis/148655 to your computer and use it in GitHub Desktop.
Use this SASS mixin to assign cross-browser CSS opacity
// expects a number from 0 to 100
=opacity(!opacity)
:opacity= !opacity / 100
:-moz-opacity= !opacity / 100
:-ms-filter= "progid:DXImageTransform.Microsoft.Alpha(Opacity=#{!opacity})"
:filter= "alpha(opacity=#{!opacity})"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment