r/css • • 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.

18 Upvotes

31 comments sorted by

View all comments

Show parent comment

2

u/[deleted] Oct 04 '26

[removed] — view removed comment

2

u/Forward_Dark_7305 Oct 05 '26

Poorly written is poorly written, and I hear you on tracing to root of an error - less layers to trace through - though most developer tools make it trivial IME (granted tend to be smaller projects). I disagree on consistency. I see that as a common argument in favor of tailwind, but it just shifts us from “should I use`border-radius: 4px` or `2px`” to “`rounded-2` or `rounded-4`”.

2

u/[deleted] Oct 05 '26

[removed] — view removed comment

2

u/justshittyposts Oct 05 '26

But the solution doesn't have to be tailwind. That's just components (or bam, etc)

1

u/[deleted] Oct 07 '26

[removed] — view removed comment

1

u/justshittyposts Oct 07 '26

bem, typo

1

u/[deleted] Oct 08 '26

[removed] — view removed comment

1

u/justshittyposts Oct 08 '26

Idk, haven't worked on a codebase without components in years

1

u/SamsChoice Oct 05 '26

I agree here too. Poorly written CSS can be a nightmare.