logoalt Hacker News

oaxacaoaxacatoday at 5:11 PM7 repliesview on HN

Am I the only one who doesn't like Tailwind? The way it totally pollutes your html makes it seem like, while the benefits are impressive, they're not worth the collateral damage.


Replies

simonreifftoday at 7:28 PM

Tailwind is fantastic precisely because the biggest benefit (tree-shaking to minimize the CSS that ships) massively outweighs the fact that Tailwind syntax "looks like" an anti-pattern and makes your code "look" ugly. Also, you get used to bundling your styling and JS code in one place with any component-driven framework like Next.js/React, and Tailwind works seamlessly with all of them. I guess I just prefer the benefits to the alternative, and I feel like the collateral damage of the alternative is definitely not worth trying to make front-end design code look simpler.

show 1 reply
Bridged7756today at 5:43 PM

It's pretty much all personal preference. You can do anything with css modules, or use any other CSS extension.

I don't ever recall hearing about the specific, tangible benefits tailwind brings. Just a loose "it's faster", or "it's easier". It just feels like one of those things, in front end development, that are just hype-driven rather than actually bringing any ostensible benefit.

conradkaytoday at 5:50 PM

https://htmx.org/essays/locality-of-behaviour/

I'm not a big tailwind fan, but keeping styling in a separate file feels like a net negative

AstroBentoday at 5:28 PM

Yeah I'm not a huge fan of it, either. Well organized CSS is much nicer to work with. On the other hand, I'd prefer Tailwind to badly organized CSS.

enraged_cameltoday at 5:32 PM

You are not the only one. I also dislike it immensely. For a framework that established itself as "for developers who don't know or want to learn CSS", polluting the HTML in the manner you describe makes no sense. And no company I've worked at figured out how to prevent it from becoming a bloated, impossible-to-maintain mess.

sweethearttoday at 5:27 PM

I'm in the same boat. Tailwind always seemed insane to me, even after really giving it the benefit of the doubt and trying it out. I use it now only because its so easy for the LLMs to use, so I don't need to actually interface with it at all.

Bridged7756today at 5:46 PM

Btw are you from Oaxaca? Nice to see another Mexican in here.