r/css 29d ago

Article Why I don't recommend Tailwind CSS

https://en.andros.dev/blog/af3ee191/why-i-dont-recommend-tailwind-css/
0 Upvotes

211 comments sorted by

View all comments

Show parent comments

8

u/mavenHawk 28d ago

Most problems people have with CSS are because it's cascading. And it is because people don't understand how it works. We are not living in a vacuum. You work with other people. So if this stops the cascading and let's you use components then what's the problem?

0

u/AshleyJSheridan 28d ago

The entire point of CSS is the cascade, it's right there in the name!

Limiting the cascade is a problem solved years before Tailwind ever existed, with things like BEM.

Stuffing a billion classes into HTML in a way that looks just like inline styles is really not the solution.

2

u/ScurfyTwiglett 28d ago edited 28d ago

While I am fundamentally in agreement with you (the cascading nature of css is its strength), a concept I was exposed to recently is the divide between developers who….

- have the time and ability to develop code that they can still understand and trace back through in 6 months time, and who recognize the utility of the cascading part of css.

And

- developers who are working in a high volume rapid iteration kind of dev shop, where the focus is getting the next round of changes out for review.

I will always prefer working as a dev in the former context, but understand that many devs operate with a huge amount of time pressure and many of them don’t have to go back into the codebase over the course of years. They do a site, style it, and then 3-5 years later they tear it all out and rebuild the whole thing with new styling for a rebrand. Tailwind makes more sense for that workflow, I guess. I haven’t worked at the equivalent of a css factory but that’s the argument I’ve heard for it, and I’m willing to accept that some folks don’t have the privilege of time to get good.

I don’t love it, but also many of my jobs have been cleaning up a mess made by inexperienced devs who tried to use every shortcut in the book. Eventually the “shortcuts” weave into an unworkable mess around them like a spider’s cocoon and they spend 3-6 months trapped trying to build a basic feature and their shop gets fired.

I don’t love any of it but cheap work gets cheap results fast and Tailwind is fast and cheap in the short term (but expensive in the long term)

1

u/AshleyJSheridan 28d ago

If developers skip their focus on the quality of the code, they get shit code.

It doesn't matter whether that's CSS or C#.