I design .

I'm Ketan ‐ A Melbourne web designer, developer and illustrator with 20 years industry experience.

I don't need you Sass, the creator of bad habits

16 July 2021 sass web design css

I’ve been using sass for a few years now, and I’ve gotten so used to using it on new projects, I never gave it a second thought. I thought it was making my life easier, but it’s caused me more hassle than it’s worth in recent weeks.

When sass came out, it was all the hype, and as all devs know, when something new comes out, you jump on the bandwagon just because everyone is doing it and raving about it, and you get hooked in.

These last few weeks, I’ve been doing a lot of work on page speed improvements in light of Google’s Core Web Vitals update. It made me question my usage of sass - is it vital, given that CSS can do all of what I needed?

Some of the sass features I used were:

  • CSS variables - I used sass a lot to declare variables, but CSS now has the var() function, which does the same thing.
  • Sass mixin’s - I have to admit, I don’t use this very much, and it’s not something I would miss.
  • CSS nesting - Nesting styles made the code cleaner to look at by “grouping” styles together, but it results in a mess of styles.

I’ve been removing sass from a few client projects recently, including my website, and one thing I’ve realised is that although sass was quick and convenient - unjustifiably convenient - it hinders performance.

With sass, it’s too easy to add similar styles without any thought of their impact, and this is complicated further by nesting styles. With nesting, it makes the styles much harder to dissect compared to standard CSS. I wasn’t thinking about structure or grouping globally; I was writing them without any thought, which is unlike me.

Whilst going through the long process of refactoring the CSS, I managed to consolidate many of the styles, thus reducing the size of the style sheet. And, splitting out the mobile styles into separate CSS files helped reduce render-blocking on devices they do not apply to.

I am a little disappointed with myself for falling into the sass trap. CSS is CSS, and it doesn’t need pre-processing. It’s capable and powerful on its own, especially today, and it’s what the web is designed with from very early on.

We don’t need anything else. I’ve enjoyed going back to using plain CSS.