Hacker News new | past | comments | ask | show | jobs | submit login

Surely I'm not the only one who finds tailwind insanely easy to use, but I see so many people bashing it every day it baffles me.

Who cares if a div has 15 classes? When writing React, I spend pretty minimal effort creating, debugging, or modifying TW classes, especially when using `classNames` so I can break them into logical chunks. The hardest part is... oh, I get it.

The hardest part is when other people do a shit job of organizing their classes and I have to dig through them. But an LLM isn't going to solve that problem, only an actual, intelligent algorithm to standardize class arrangement would help, like prettier for tailwind classes.




> Surely I'm not the only one who finds tailwind insanely easy to use

It's a write-only DSL for CSS, easy to write but hard to then read and edit afterwards, which is a problem that you're blaming on a skill issue while it's a problem inherent to Tailwind's philosophy itself. Just use CSS Modules at that point.


I never understood this sentiment. Once you get past a dozen or two dozen classes being used all over your codebase, CSS becomes the write-only language to me. I don't know where this class is being used, so I won't edit it. With tailwind, I can see every style and I know exactly where it's going to be applied (to the element it's on). I find it much easier to read.


For sure, but they're talking about CSS modules, where styles are isolated to components at build time.

CSS modules are critical in a large web app for those rare styles you can't accomplish with Tailwind, but for the vast majority of styles I do not want to be hand-writing them. Plus, unless you're extremely strict about using CSS modules, you don't escape the horror of styles being inherited from global classes - on the other hand, a robust library of utility classes like Tailwind makes "inline" styling so easy you're likely to end up with almost no hand-written CSS anywhere.


> blaming on a skill issue

No I'm not, I'm blaming it on the lack of organizational framework. I expect people to leave a mess if there's no guideline; there are more ways to do a thing wrong than to do it right.

> hard to then read and edit afterwards

No, that's what I'm saying. It's quite easy to read and edit - when organized. Maybe I'm the first person to invent conceptual organization of utility classes?? In which case I ought to just make a plugin for it.

Also, Tailwind has first-class support for grouping utility classes, such that `.button` can apply 15 different styles at once if that's your preference. So, you know, the exact same as regular CSS.


I tried, but it's not for me. I found myself proud of styling a button, before noticing that I spent an hour. A lot of classes are almost plain Css attributes, so you just ask yourself "why am I doing this instead of writting the Css myself, like in the old days?" It's a tell that people is making money by creating a new Bootstrap on top of Tailwind, and calling it "components". Or AI assistants.

That said, if you enjoy Tailwind, good for you!


(seemingly few) People bash it because its just writing regular css but objectively worse and incorrect.

if you can write tw you can write css. if you can write css theres no valid reason to write tw.


Huh, all of those statements are incorrect.


> Who cares if a div has 15 classes?

Even if bottleneck are images, I still care about bloat on mobile internet.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: