Haml 1.8.1

Posted January 28, 2008

Haml 1.8.1 has just been released. You can get it by running gem update haml.

Version 1.8.1 fixes all known bugs with the 1.8.0 release. One particularly notable bug is that I forgot to mark the “css2sass” utility that was bundled with 1.8.0 as an executable, so RubyGems didn’t put it into people’s PATHs.

This utility is now fully usable. It does just what you’d expect: converts plain old CSS into equivalent Sass code. Although it’s not perfect, it’s quite useful. If you find any bugs in it, please let me know.

In addition, Haml 1.8.1 should be fully compatible with Merb 0.5.3. It’s not quite compatible with edge Rails, but we’re hoping for a fix from their end.

Finally, not exactly on the topic of 1.8.1 but still interesting, Jeremy Burks brought something cool to the attention of the Haml mailing list today. Andrew Peters has created an implementation of Haml for ASP.NET. Haml was always designed to be cross-language, so I’m very happy to see ports taking place.

Dan Croak said March 09, 2008:

Love the css2sass utility. One request… when it hits the “Invalid CSS!” Exception, could it provide the line number? I looked briefly at the code and couldn’t figure out how.

Nathan said March 09, 2008:

I’ll do you one better, Dan. The master branch of Haml now has css2sass give both the line number and expected token when it sees an error. For example:

$ css2sass 
#main {
  color blue;
}
Invalid CSS on line 1: expected ":"
jpablobr said August 09, 2010:

Hey, I build this simple web based css2sass app @ http://css2sass.heroku.com/

it’s inspired by the http://html2haml.heroku.com/ one… I think it’s great for snippets of css…

Make your comments snazzy with Textile!