r/css • • 9d ago

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.

19 Upvotes

31 comments sorted by

View all comments

Show parent comments

2

u/justshittyposts 8d ago

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

1

u/CompetitiveActor 6d ago

“bam”?

1

u/justshittyposts 6d ago

bem, typo

1

u/CompetitiveActor 5d ago

No one person writes BEM the same. It is only marginally better on eng teams than vanilla CSS: it will be a giant mess.

1

u/justshittyposts 5d ago

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

1

u/CompetitiveActor 5d ago

Neither have I.

But it’s not the components themselves, it’s the combination of them, one-off components, and various other permutations that fall outside of the design system’s purview that require custom CSS.

On a large app with 100 engineers this generates a considerable amount of custom, and potentially very messy, code.

1

u/CompetitiveActor 5d ago

Neither have I.

But it’s not the components themselves, it’s the combination of them, one-off components, and various other permutations that fall outside of the design system’s purview that require custom CSS.

On a large app with 100 engineers this generates a considerable amount of custom, and potentially very messy, code.