Hacker News new | ask | show | jobs
by wauter 981 days ago
This article explains the reasoning pretty well:

https://adamwathan.me/css-utility-classes-and-separation-of-...

1 comments

Hmm. Thanks for the link; I can see where that argument comes from.

But doesn't that entire line of thinking disappear if one just uses scoped CSS inside components? Everything in that link assumes that all CSS rules are global, and it runs through BEM and then tailwind as a way to avoid putting component-specific rules in the global CSS file.

But if you just use a frontend framework with SFCs, you can treat each component as a module with its own local style rules. If there's no global CSS file to edit, don't BEM and Tailwind become irrelevant, since the problem they solve no longer exists?

That's exactly my perspective. Tailwind tries to make inline CSS workable, but there are so much better options in available in a frontend frameworks.