Created
March 19, 2012 20:17
-
-
Save nicolechung/2126495 to your computer and use it in GitHub Desktop.
LESS vs CSS
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
/* less file */ | |
.my_mixin { | |
display: block; | |
text-indent: -9999em; | |
background-color: transparent; | |
background-position: 0 0; | |
background-repeat: no-repeat; | |
overflow: hidden; | |
} | |
h1 a, .pagination em, .cog a { | |
.my_mixin | |
} | |
/* css file */ | |
.my_mixin { | |
display: block; | |
text-indent: -9999em; | |
background-color: transparent; | |
background-position: 0 0; | |
background-repeat: no-repeat; | |
overflow: hidden; | |
} | |
h1 a, .pagination em, .cog a { | |
display: block; | |
text-indent: -9999em; | |
background-color: transparent; | |
background-position: 0 0; | |
background-repeat: no-repeat; | |
overflow: hidden; | |
} |
Yes!! Me too. Seems to solve the problem
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh I see what you mean now, like:
http://stackoverflow.com/questions/7557626/less-js-redudancy-in-css-use-of-mixins-instead-of-selector-inheritance
The above post makes me want to try out @extend in SaSS/Compass:
http://awardwinningfjords.com/2010/07/27/sass-extend-introduction.html