3 ms·
I'm on the same boat. No one here really tells how to avoid the ease of getting tens of classes added across many tags. Tailwind requires a lot of self-discipli
by jarek83 6y ago
I'm on the same boat. No one here really tells how to avoid the ease of getting tens of classes added across many tags. Tailwind requires a lot of self-discipline and that is very easy to omit in some projects. I can't imagine maintaining a project with tailwind on board.
- deergomoo 6y agoAs someone who is actively maintaining several projects using Tailwind now, it really doesn’t in practice. In fact if anything it requires _less_ discipline, because a styling change can’t really break a layout elsewhere. You avoid repeated classes by extracting components (either template partials, or actual components if you’re using a front-end framework). The components themselves define how they look, and then you assemble them, perhaps with a few additional classes for things like spacing. If you need to change a component you don’t need to go and change classes everywhere you’ve used it, you just change the component itself. If you feel like reading further, Tailwind’s author explained his rationale very clearly in a blog post a few years ago [1] [1]: https://adamwathan.me/css-utility-classes-and-separation-of-concerns/ https://adamwathan.me/css-utility-classes-and-separation-of-...