loading...

re: Is anyone really using SASS anymore? VIEW POST

FULL DISCUSSION
 

Of course.
I like writing style systems instead of using the atomic css approach of Tailwind and co.
Sass (or scss in my case) helps me with three major points

  • Nesting. I write my styles in between BEM and SMACSS. Nesting helps me with namespacing.
  • Mixins. Those are awesome for helper classes that you may or may not need. Mixins don't get rendered by default if the stylesheet doesn't require it. It allows me to tree shake a library of helpers. I used to use sass-variables for everything too, but phased that out in favor for custom properties.
  • component structure. Helps me stay sane, when every component has its own file. But bundling everything up is necessary to improve the network waterfall. That's something CSS-imports can't do.

I think sass is losing relevance, but for the wrong reasons. Native css is growing and the working group is discussing things like native nesting. That would be my main reason to abandon sass for just native css.
However it's mostly losing relevance because of Utility-first frameworks. I don't believe those are the answer to complex style systems, since they're aiming to reduce relationships between elements to zero. Those can be very powerful, if wielded with care.

 

I agree with this comment. It does provide improvements to structure CSS. And namespaces are good as well.

Vue which has scoped styling is good.

React in the other hand, doesn't. But I'm not going into Styled Components are anything like that.

Code of Conduct Report abuse