News for hackers. Stuff that matters.
Re:Tailwind CSS v3.2 – Introducing Container Queries, Multip... by didgeoridoo on Thursday October 20, 2022 @02:13PM (#33278524)
Not sure if you’re read Adam’s original post[0] detailing the thinking behind the Tailwind approach, but I found it pretty thought-provoking at least.

Basically we just admit to ourselves that we don’t have true separation of concerns anyway, so stacking utility classes lets us keep the styling of components near the components where the styles are actually used (no more flipping back and forth between HTML and CSS to tell what a component will look like). You can always extract and refactor later if you find yourself writing the same thing over and over. It’s bizarre and uncomfortable to start, but I’ve found it has quite a bit more upside than downside.

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

There are no comments on this comment yet.