Chris Eppstein, a developer of Sass and Compass, writes about CSS abstraction, stylesheet tooling, and language design.
Commenters cite his posts "Haml Sucks for Content" and "Why Stylesheet Abstractions Matter" as clear explanations of when Haml and Sass fit.
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/
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
CSS, although a very cool and powerful language, leaves a lot to be desired in one key area: abstraction. Not coincidentally, this is the area that Sass is best at. Chris Eppstein has an excellent blog post (http://chriseppstein.github.com/blog/2009/09/20/why-stylesheet-abstraction-matters/) explaining why abstraction in stylesheets matters.
Haml is great for many cases, but it's terrible when the ratio of text to embedded code gets large. Chris Eppstein, one of the developers of Haml, made a blog post to this effect last year:
http://chriseppstein.github.com/blog/2010/02/08/haml-sucks-for-content/
As a result, though I love Haml, I think ERb is a more sensible default.
> A similar framework for CSS would be great.
Have you taken a look at Compass/Sass?
http://blog.derekperez.com/tagged/compass-sass-good-to-great
"Why Stylesheet Abstraction Matters"
http://chriseppstein.github.com/blog/2009/09/20/why-stylesheet-abstraction-matters/
CoffeeKup is great for layouts, but it's very Haml-esque. I think it suffers from many of the issues described in "Haml Sucks for Content" (http://chriseppstein.github.com/blog/2010/02/08/haml-sucks-for-content/). Markdown/Textile are really better-suited to a wiki.
Chris Eppstein (develops compass) does a great job breaking down the why (for tools like sass in general) here => http://chriseppstein.github.com/blog/2009/09/20/why-stylesheet-abstraction-matters/