Skip to content

Instantly share code, notes, and snippets.

@simenbrekken
Created November 30, 2012 08:09
Show Gist options
  • Select an option

  • Save simenbrekken/4174449 to your computer and use it in GitHub Desktop.

Select an option

Save simenbrekken/4174449 to your computer and use it in GitHub Desktop.
Override display declaration
// support-for-ie is provided as a compile-time variable, in case you don't want/need IE support
display(type)
display: type
if type is 'inline-block' and support-for-ie
zoom: 1
*display: inline
// Nib also provides this gem:
opacity(n, args...)
opacity: n args
if support-for-ie
val = round(n * 100)
if val == 100
-ms-filter: none
filter: none
else
-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)' % val args
filter: 'alpha(opacity=%s)' % val args
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment