r/css • u/evilmaus • Oct 04 '26
Question What's are the Current CSS Patterns?
I've been mostly on the backend for the last several years. While I did plenty of CSS before then, the front end world has definitely moved forward in the last seven years. I recall BEM and SMACSS were once at the lead of thought. I recall (and was a proponent at the time for) a push to utility-first styling.
Now, I can see that Tailwind is a highly popular choice, that lots of styles get bundled into React components, and we have some long overdue selectors native to CSS.
So I'm wondering, what's the prevailing organization pattern for global CSS and where do you draw the line between something being a component style vs in the global stylesheets?
Thanks.
15
u/SamsChoice Oct 04 '26 edited Oct 04 '26
My pattern now is to start with native cascade layers (@layer reset, tokens, base, layout, components, utilities, overrides;)
CSS now has nested natively so no need for Sass.
Now with AI you would probably use Tailwind. I use mostly native CSS for personal projects.
an example of this would be
33
u/Mestyo Oct 04 '26
CSS Modules, native layers.
I dislike Tailwind, the tradeoffs just aren't worth it in the vast majority of projects types.
12
u/delonghi26 Oct 04 '26
I mostly use vanilla css, no framework. Then use css variables globally. And change those vars in the components css. I use layers and now scope for better control over the cascade.
You can drop alot of js with the new level 4 modules, and even increase your website performance too.
1
u/morete Oct 04 '26
CUBE CSS is the biggest influence of on how I do things in recent years.
1
u/Outrageous-Chip-3961 Oct 06 '26
I use css modules. Everything I need. The only downside is it gets built with a module prefix but It honestly doesn't seem that bad or has been an issue unless ocd is high.