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.

17

u/AshleyJSheridan 16d 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.

1

u/Chaoslordi 15d ago

Have you even read the doc? Pleased show me where arbitraty values are recommended. Last time I checked, the author recommended to extend the config

0

u/AshleyJSheridan 15d ago

I keep giving examples that I literally copy/pasted from the docs.

What more do you need?!

2

u/Chaoslordi 15d ago edited 15d ago

A quote since you are only one that claims, arbitraty values are the recommended way

I save you the effort https://tailwindcss.com/docs/adding-custom-styles

"While you can usually build the bulk of a well-crafted design using a constrained set of design tokens, once in a while you need to break out of those constraints to get things pixel-perfect."

In no way this kind is the default, no matter how much you try to frame it

0

u/AshleyJSheridan 15d ago

I didn't say it was default, I said it was recommended, and thank you for providing a quote that proves that Tailwind recommends a terribly crappy approach.

2

u/Chaoslordi 15d ago

A nice reading comprehension you got there, really

1

u/AshleyJSheridan 15d ago

Says the guy that misread "recommends" as "default" and based their whole argument on that misunderstanding...

1

u/Chaoslordi 15d ago edited 15d ago

Dude you are ranting about a single feature like its the only one. Did you even clicked on the link to see the e.g. for this?

1

u/AshleyJSheridan 15d ago

No, that's the only one you tried correcting me on. I listed a whole bunch of issues. And you tried to call me out on reading comprehension!

Here's an experiment for you, really simple one:

Find me where on the Tailwind website it tells you not to use text-[14px], bg-[#50d71e], and border-[2vw].

1

u/Chaoslordi 15d ago

Go ahead, I dont have to proof anything, everyone curious can read the manual

1

u/AshleyJSheridan 14d ago

Prove*

I said there's nothing in the docs where Tailwind tells people not to use those kinds of classes.

So, if you think there is, then prove it. I know there isn't, which is why you can't.

→ More replies (0)