Created
February 20, 2014 05:42
-
-
Save blessdyb/9107656 to your computer and use it in GitHub Desktop.
CSS Mixin in LESS
This file contains 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
.opacity (@opacity) { | |
@opacityPercentage: @opacity * 100; | |
opacity: @opacity; | |
-ms-filter: ~"progid:DXImageTransform.Microsoft.Alpha(opacity=(@{opacityPercentage}))"; | |
filter: ~"alpha(opacity = (@{opacityPercentage}))"; | |
} | |
.border-radius(@radius) { | |
border-radius: @radius; | |
-moz-border-radius: @radius; | |
-webkit-border-radius: @radius; | |
} | |
.placeholder(@color) { | |
::-webkit-input-placeholder { /* WebKit browsers */ | |
color: @color; | |
} | |
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ | |
color: @color; | |
} | |
::-moz-placeholder { /* Mozilla Firefox 19+ */ | |
color: @color; | |
} | |
:-ms-input-placeholder { /* Internet Explorer 10+ */ | |
color: @color; | |
} | |
} | |
.nowrap { | |
white-space: nowrap; | |
} | |
.longname() { | |
.nowrap; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
} | |
.inline-block { | |
display: -moz-inline-stack; | |
display: inline-block; | |
zoom: 1; | |
*display: inline; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment