Why I don't like Tailwind CSS

Interesting article, some well made points but it only confirms to me that Tailwind probably is the right approach for me.

Every single approach has a trade off, and that can be presented as a criticism. But that doesn’t mean it might still not be the best approach available. Are the alternatives, whose trade offs aren’t touched on in this article, really better for a particular use case?

Maybe it’s just me, but my HTML is a bit ugly and not very readable anyway. It doesn’t feel like much of a sacrifice to have more, and initially obscure looking, html classes in it.

An example of a criticism from the article that is actually a plus for me:

you’re lying to yourself if you think this is any better than writing CSS directly, or any more maintainable than directly applying inline styles. Because instead of repeating styles in your CSS, you’re now repeating them in your HTML, through class names. In fact, you’re likely repeating yourself three, four, possibly many more times now because you can’t chain selectors.

In my workflow, NOT having to open up a CSS file at all, being able to specify the presentation directly inline inside the view template, is a huge win and avoids disrupting my train of thought. It is massively better than writing CSS directly, for me.
And I can easily use helper methods to DRY up commonly repeated sets of classes (with Ruby on Rails view helpers in my case).

Opinionated is great, but this article reads quite biased to be honest. Just a warning to anyone who reads the snippet without reading the full article and considering for themselves whether alternatives really would be better.

6 Likes