2 ms·
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. Basicall
by didgeoridoo 4y ago
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-concerns/ https://adamwathan.me/css-utility-classes-and-separation-of-...