Hacker News new | ask | show | jobs
by woahitsraj 1220 days ago
We get so much power from just setting global scoped styles like this it's so strange to me that more of these patterns aren't common or included in minimal css frameworks.

With all the recent criticism of tailwind, css-in-js, and other bloated frameworks I truly feel like 90% of projects could get away with a handful of sensible global styles or "classless css" and then aggressive use of components with scoped styles. You hardly ever need anything else

2 comments

This. So much this. I wish I could make my colleagues understand.
That requires the program itself to be well designed, without exceptions everywhere.
I think exceptions are fine and that is what you could use inline or scopes styles for. Exceptions everywhere is problematic but having this sort of pattern could encourage better design