DEV Community


Discussion on: My mixed feelings about Tailwind CSS

moopet profile image
Ben Sinclair

Instead of repetitively writing color: white in multiple classes, you just drop the text-white class and that's it!

That's what the cascade is for! The big C in CSS that everyone seems to be trying to get away from these days. You have something like an aside that is styled as a sidebar, and you give it colours and so on, and elements within it inherit those.

Tailwind is another big push towards binding content and style.

Apparently, the Tailwind team is aware of this issue

Yes, I've seen people talk about "tooling" with Tailwind. As far as I can see it's an acceptable way of using it - in fact, it's the only acceptable way of using Tailwind as far as I'm concerned. Anything that wants me to add text-white margin-small to a redundant div is completely off the table.

So, tooling fixes that? It does... but it's a lot of work to get back to the original problem. Tooling in Tailwind is reinventing the wheel.

Forem Open with the Forem app