Haml + Sass = Goodness

Mar 23, 2007

After reading through the release notes for the v1.5 release of Haml I’m officially adding it my list of things to use in my next Rails project. Why? Sass.

Just read through the Sass intro and you’ll quickly see that it’s much easier to write this:

.some-class
   a
      img
   a:hover
   a:visited
... than this:
.some-class a { }
.some-class a:hover { }
.some-class a:visited { }
.some-class a img { }

I think Sass adds some much needed nesting to CSS, and it makes me extremely happy. I remember first being turned on this idea when Justin French pondered it as well (see: wouldn’t it be great).

I think Sass is about the closest we’re going to get right now, and I think it might be the more useful of the Haml/Sass duo.