Created
November 30, 2012 08:09
-
-
Save simenbrekken/4174449 to your computer and use it in GitHub Desktop.
Override display declaration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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