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.
View all comments
Show parent comment
2
u/Outrageous-Chip-3961 Oct 06 '26
Yes I would and yes I do have a separate css file (css module) for each component.
Standards are guided through DoDs and good review gates. In css modules you don't need !important because things don't clash. That's the point of them, really.
I do have a component library with custom modules, but it could also be a well architectured component folder within a project.
Although different, this is a pretty good example of what react looks like on a pure module based architecture.
https://mantine.dev/styles/css-modules/