“Mobile first” CSS and getting LESS to help with legacy IE
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
.320up(){ | |
.three20 { | |
color: #fff; | |
} | |
} /* end 320up mixin */ | |
/* | |
note: this gist relates to http://nicolasgallagher.com/mobile-first-css-sass-and-ie/ | |
It is a LESS CSS reproduction of Nicolas's Sass method. | |
First created some time ago, it's possible it no longer works or there is a better way. In other words, this may or may not work. | |
*/ |
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
.base { | |
color: #000; | |
} |
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
@import "subs/base.less"; | |
@import "subs/320up.less"; | |
.320up(); |
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
@import "subs/base.less"; | |
@import "subs/320up.less"; | |
@media (min-width:320px) { | |
.320up(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Brilliant, very useful!
(Just a small typo: both in ie.less and style.less the second @imported file should be 'subs/320up.less', not 'subs/320.less'.)