3 ms·
Call me a curmudgeon, but I am still not a fan of Tailwind. I know a lot of newer engineers that believe it’s a perfectly acceptable alternative to learning CS
by cjk 2y ago
Call me a curmudgeon, but I am still not a fan of Tailwind.
I know a lot of newer engineers that believe it’s a perfectly acceptable alternative to learning CSS, to which I always respond: using Tailwind does not absolve you from having to learn CSS.
There are also a lot of comments in this thread claiming that the “right” way to use Tailwind is to create composite classes using its utility classes, but I have rarely seen anyone do this in practice.
Instead, the inline classes pollute the markup to the point of becoming extraordinarily difficult to read, and unless you make a concerted effort to e.g. bury as much of that garbage markup in reusable components as possible, it remains a persistent eyesore.
- dcre 2y agoPeople don't do that because it's not the right way and is explicitly discouraged by the docs: "While it’s highly recommended that you create proper template partials for more complex components, you can use Tailwind’s @apply directive to extract repeated utility patterns to custom CSS classes when a template partial feels heavy-handed." https://tailwindcss.com/docs/reusing-styles#extracting-classes-with-apply https://tailwindcss.com/docs/reusing-styles#extracting-class...