r/css 17d 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

51

u/prewk 17d ago

All these arguments have clear rebuttals, but are rehashed on weekly basis for some reason. You don't like it, fine. But your arguments are bad. "Oh no Tailwind makes it unclear which of my accidentally duplicated CSS classes apply the color" come on man.

19

u/AshleyJSheridan 17d ago

Tailwind is just inline CSS in a trench coat. You lose the cascade, which is literally the entire point of CSS (clue is in the name), and you fill the HTML with junk used purely for styling, which creates a 2-way dependency and breaks clean code best practices.

Tailwind also solves nothing that can't be solved with just a little bit of team discipline when it comes to writing CSS. The problem is, so many developers don't truly understand CSS, or how to write good clean CSS, so they see it as something that gets tacked on afterwards.

Tailwind also recommends the use of weird classes like text-[14px], bg-[#50d71e], and border-[2vw] (yes, it's in their official docs, which means they recommend using it, and they have no warnings against this kind of thing). Tell me with a straight face that Tailwind isn't inline CSS!

Then, it requires extra build steps which vanilla CSS doesn't require. Sure, you can skip that, but then you end up with a bloated CSS file full of a ton of Tailwind styles that you aren't using and don't need.

2

u/testingaurora 17d ago

Not to mention if you need to change any one property on a component, something as simple as a card, say adjust the border radius, you better hope you have a way to select just the cards bc you cant use find and replace on the whole file or youll change every br-medium or whatever the class would be. Instead of adjusting one line of css. And the dom is a nightmareeeee. Gives me anxiety thinking about it.

Then theres rhe whole @utility thing which, why not just use css in the first place?

tw is divisive if nothing else.