2 ms·
I'm a big fan of presentation-free markup and IMHO, SASS offers a good way to achieve it with mixins. Look at this article, it pretty much covers that topic. h
by niclupien 14y ago
I'm a big fan of presentation-free markup and IMHO, SASS offers a good way to achieve it with mixins. Look at this article, it pretty much covers that topic.
http://chriseppstein.github.com/blog/2009/09/20/why-stylesheet-abstraction-matters/ http://chriseppstein.github.com/blog/2009/09/20/why-styleshe...
The idea is to get something like this :
@mixin three-column {
.container { @include container; }
.header,
.footer { @include column(24); }
.sidebar { @include column(6); }
article { @include column(10); }
.rightbar { @include column(8); }
}
body#article,
body#snippet,
body#blog-post { @include three-column; }
I describe the whole thing with examples here:
https://github.com/niclupien/compass-examples/wiki/Example-01 https://github.com/niclupien/compass-examples/wiki/Example-0...