DEV Community

Discussion on: Is Sass worth learning in 2019/20?

Collapse
 
markmercier profile image
Mark

If you write a lot of CSS, I definitely think SASS is still worth learning, even with the rise of CSS variables. SASS has a lot of functionality like nesting, mixins, and for/each loops that CSS variables don't replace. There's also an argument for both CSS and SASS variables having their place - I'm using SASS variables for most things (for backward compatibility), and CSS variables for progressive enhancements.

IMO once you get used to it, SASS takes a lot of the tedium out of writing CSS - even just setting up some simple mixins for combinations of properties you write over and over makes the process a lot faster and more fun.

Collapse
 
cguttweb profile image
Chloe

Thanks for the reply I've dabbled with it but never really gotten into the full power of it and with the likes of postcss emerging wondered it's worth me going more in depth and given a lot of work we do needs to support the joys of IE... 😐

Collapse
 
markmercier profile image
Mark

You can actually use SASS and PostCSS together - I do a lot of Wordpress builds with Sage which uses SASS for the style files and PostCSS to handle autoprefixing and minifying.

If you want to get into SASS, I'd suggest starting with basic variables, nesting with the parent selector, and making some basic mixins for groups of properties you use often.

That much was plenty for me to never want to code vanilla CSS again, and there's a lot of wackier stuff you can do beyond that (like this crazy mixin that basically generates Bootstrap's entire grid system).