Haml and Sass are Split

Posted September 22, 2010

Haml and Sass have, finally, become independent projects.

A Little History

This has been a long time coming. To people looking at the two projects as they are today, it seems deeply strange that they’re bundled. Splitting them has been a common request since version 3 was in development. But it’s worth remembering that they didn’t always seem as different as they do now.

When Hampton first told me his idea for Sass, he pitched it as “Haml for CSS”, and that’s pretty much what it was. Sure, it had variables and nesting, but its primary claim to fame was its clean indentation-based syntax. It didn’t even have mixins until one Garry Hill1 submitted a patch that went into Sass 2.0.

Sass has evolved hugely since then. It’s become far more powerful than its humble roots would have suggested, providing (for the first time in the history of the web, as far as I know) a drive to bring the power of abstraction and sharing to stylesheets.

Although the change in Sass was large, it happened slowly enough that it took us by surprise. By the time Sass had obviously outgrown its connections with Haml, we were elbows-deep in Sass 3 and had no time to spare to separate the two. But now Sass 3 has been released and we’ve had a chance to cool off, and so the split happened.

How It Works

First of all, the stable 3.0.x version of Haml/Sass haven’t changed at all. It continues to contain both Haml and Sass, just like it always has. So you don’t need to worry about adding a new dependency just yet.

The next versions, Haml 3.1 and Sass 3.1, will be released separately. However, as per our backwards-compatibility policy, if you try to use Sass while only having Haml 3.1 installed, it will print a deprecation warning but still work. Sass will be included as a submodule within the Haml 3.1 repo, and will be rolled into all Haml 3.1 packages.

When using Haml 3.1 and Sass 3.1 with Rails, you need to be sure to load each gem, either via `config.gem` for Rails 2 or in the `Gemfile` for Rails 3. As with loading the libraries themselves, if you only load the Haml 3.1 gem Sass will work but will print a deprecation warning explaining how to properly require it.

There is now a separate Sass gem, which won’t see a stable release until 3.1 is ready. There’s also a separate Sass repo, which is a fork of the Haml repo with all the Haml-specific stuff stripped out. All feature requests and bug reports that don’t apply to the stable release should be made on the new repo’s issue tracker. It’s looking pretty bare right now, so go fill it up!

No More `haml-edge`

As part of the split, we’re also getting rid of the `haml-edge` gem. I’d feel bad if all the automated releasing infrastructure I wrote went to waste, though, so instead we’ll be releasing alpha versions of the `haml` and `sass` gems proper. Just like the edge gem, a new alpha version will automatically be pushed whenever a change is made to the master branch.

On To A Sassier Tomorrow!

This split marks an important point in Sass’s evolution. Sass 3 was perhaps the first major step towards the ultimate goal of breaking Sass out of the niche and bringing its promise of better stylesheets to everyone who wants it. But making it its own project sends a message that Sass is accessible, that it’s important, and that we’re just beginning to see where it’ll go.

1 I can’t find a URL for this guy, but if you have one let me know and I’ll put it up.

Karl said September 22, 2010:

I always thought it was a good idea, organizationally. But whenever I have used SASS in a project, I have always used HAML.

Excellent work on 3.0 Nathan. Eager for 3.1.

Damien said September 23, 2010:

Thanks for the news. These are great projects.

Michael Deering said September 24, 2010:

I came for the HAML and stayed for the SASS

Mario "Kuorir" Ricalde said September 26, 2010:

Great news :) Now we have a separate google group ?

Nathan said September 29, 2010:

There is indeed a sass-lang group now available.

Brad Phelan said October 01, 2010:

I just started using sass ( and compass ) to style my blog. I’ve used Haml before but now playing with sass and compass i’m hooked. Thanks for putting this together. I wrote a small article on my experience here

Steve Perkins said October 01, 2010:

SASS is definitely awesome and useful… but honestly, who cares?

Richard Clarke said October 02, 2010:

Hey,

Not exactly related to your post but I couldnt find a way to contact you directly from the website. The faqs and other help methods seem to relate to HAML mostly.

So I was wondering – how do you determine the current version of SASS that is installed on the PC? I know the current version that is available – it is the version I actually have that I want to know.

Regards,

Richard

PS I agree with Steve Perkins (only the first part – I care). And my project markers (at university) who gave me 66% for my project mark, I think, thought “Syntactically Awesome StyleSheets” was a joke… lol

Nathan said October 02, 2010:

Richard: Once the split trickles down to the stable version, the documentation will be fully split as well.

You can use sass --version on the command line to get the version of Sass you have currently installed.

Daniel Brockman said October 03, 2010:

Hey Nathan,

Thanks for all the great work.

Question: Will any of the generic and useful Sass extensions in Compass be merged into Sass proper? I’m thinking of stuff like ‘image-width’, etc.

Nathan said October 03, 2010:

Daniel: Some functionality from Compass, like filesystem-watching, has already been moved into Sass proper. However, functions like image-width rely on a notion of a “project” to figure out where the image files live. One of the things Compass adds is the knowledge of where the “project” is, so functions like that actually do belong with Compass.

Konstantin Haase said October 26, 2010:

Would it be possible to release an empty Sass 3.0 gem, that simply depends on haml 3.0? That way we could start using Sass as dependency (even with ”~> 3.0”).

Nathan said October 26, 2010:

Konstantin: See Sass issue 18.

Behati Prinsloo said November 28, 2010:

Really great idea, i love it !

Shaggy said March 01, 2011:

Hello,

I have a bug/feature request. Where do I post it?

Thanks, this is the best thing since css itself.

Nathan said March 01, 2011:

Shaggy: You can post it on the Haml bug tracker or the Sass bug tracker.

Zegge said April 07, 2011:

What about IE?

Nathan said April 07, 2011:

Zegge: What about it?

Make your comments snazzy with Textile!