Re:The LESS CSS Grid
by Semiapies on Monday January 24, 2011 @05:43PM
(#2137104)
OFFS, people. You've got an excellent CSS preprocessor with mixin capability here, use it. Do something like this:
and then this:
It's easy, clean, and doesn't maul your markup.
[ Parent
| on HN ]
Re:The LESS CSS Grid
by unicornporn on Tuesday January 25, 2011 @10:39AM
(#2139409)
Would you care to elaborate on this for a newbie?
.column and .grid_12 looks more like classes than CSS properties to me.
That's a great idea. I've been trying to think of better ways to combine the power of 1kbgrid and LESS.
Thanks - you can pretty much take any class-based grid system and use them this way in LESS (and SASS, of course).
(And if you're rolling your own, you can even be more concise - such as, instead of invoking theWidth() twelve times to build your classes as shown here, make an atGridColumn() function and skip making those classes.)
Indeed. Sass and Compass have been doing this for years. Using mixins for CSS framework rules so markup stays semantic is basically the core concept behind Compass.
Re:The LESS CSS Grid
by chriseppstein on Monday January 24, 2011 @07:06PM
(#2137350)
If I could upvote you 100x I would.