David Lohmeyer's Blog

Why hasn't SASS taken off in mainstream web development?

Today I'd like to talk about a point that has bothered me for the past year or so as I've integrated SASS into my typical frontend development pattern for websites.  Why hasn't the preprocessor, a tool that so drastically improves how CSS is written, taken off in the mainstream yet?  Look at the countless "Bootstrap template bundles", ThemeForest, and other sites for examples of what frontend designers are churning out to the masses.  They aren't SASS, or even LESS (most of the time).  With how fast the web moves, I'm fairly shocked at how slow this adoption has been.

I've run into instances where I've literally reduced a CSS chunk by 50-75% in size and complexity using SASS.  Is that not a huge win for the developer who needs to quickly do his job?  The first thing I think about when I see a normal css file with endless-repeating selectors is to make it SASS.

I think some people just aren't aware of what SASS does for them.  IE, it has a marketing problem.  One solution is to stop buying templates that don't use SASS. I like this one, and I practice it as much as possible.  This is obviously cumbersome, as you then need to create your own solutions for the CMS/platform you're working on.  This takes longer, but I'd argue that it saves a lot of time in the future when you're enhancing and changing your design.  Don't know SASS?  In the last year two books have been released that look pretty legitimate: Sass and Compass in Action by Wynn Netherland and SASS and Compass for Designers by Ben Frain. And finally, I'll do my part on describing the main reasons I personally use SASS.

Readability

This is really it.  The other features of SASS all lead to this feature.  It's the reason people use SASS.

Organization

Since you're preprocessing, it doesn't matter if you're littered with @import statements in your CSS.  In fact, it makes folder organization much better.  Never put long strings of CSS in a single file again for performance reasons.  After compiling the CSS it turns into that giant file so you don't have to deal with it.

Nesting

Sick of seeing #mainbody repeated 100 times in order to target the 50 other elements underneath it?  Start using SASS and have ONE #mainbody with everything else nested.

Variables

I hate changing the primary color of my site in 30 different places if I don't like blue anymore.

There are more features to SASS that you might like such as mixins, but the reasons here are the ones that make SASS mandatory for me.

Related Posts