Been using Tailwind since starting my job 5 years ago where we have a ton of webapps standardized on Angular+Tailwind, and you may have to hop into a webapp you've never heard of before to fix a bug. Couldn't be happier with how much easier it is to build and maintain compared to traditional CSS. Many many words I've read trying to convince me why I shouldn't be having a good time using it, yet here I am more product…
CSS's problems are Tailwind's problems
81–90 of 179 posts
Re: CSS's problems are Tailwind's problems
#82Earlier quoted context omitted.
You can override classes, not so much inline css.
Is anyone ever going to override the "px-3" class? You can also change styles through javascript if you really want to. It just seems like we've lost the entire reason for css in the first place when every css attribute gets turned into it's own class.
No, but they will change things like their constants ("bg-neutral" or, in this case, the spacing constant).
Re: CSS's problems are Tailwind's problems
#83Earlier quoted context omitted.
yeah I was going to say this. AI is incredibly good at writing tailwind. Part of it is probably exactly the colocation issue. Context windows are precious.
AI was incredibly bad when Tailwind v4.0 was released. All the models trying force me to use the config file I did not want to and so on, every time.
Then you can say "Tailwind4 has major changes, please review using context7" and it'll sort out some of that.
Re: CSS's problems are Tailwind's problems
#84Earlier quoted context omitted.
You’re correct in the sense that they’re both big noisy blobs that dilute semantic/functional signals. You’re neglecting the design system work that goes into tailwind classes. I don’t particularly like its choices (and generally consider tailwind to be a minimal local maximum for a set of tradeoffs deserving of faint praise), but they’re something, and in an engineering culture that won’t adopt a better mindset or b…
> generally consider tailwind to be a minimal local maximum I feel like I've been nerd sniped trying to figure out what you mean by this.
Re: CSS's problems are Tailwind's problems
#85structure and locality instead of style purity.
Traditional CSS gives you basically nothing in terms of hierarchy or organization. You end up writing long, awkward selectors like .checkout .summary .item-title .price, which still aren’t that readable. And if you’re tracking down why there’s 4px of padding instead of 6, good luck figuring out which of the five CSS files is messing with it.
Tailwind flips that. Putting the styles right on the element means the structure is obvious. You don't have to context-switch or go hunting through a bunch of files just to see what’s going on. It’s all right there.
Yeah, sometimes it gets verbose. Especially when you’ve got a div with 20+ classes. But when that happens, you’ve probably got something reusable anyway. And Tailwind actually shows you that. If you copy and paste the same set of classes to another element, you’ve just signaled that you’re repeating yourself. That’s your cue: take the extra 60 seconds and extract it into a component or class. With vanilla CSS, that signal is way more opaque. People end up not writing composable styles at all. Instead, they name every div, then name every element inside the div, just to avoid writing selectors like .component div h1 span—which is even harder to reason about than .component .title .icon.
And honestly, writing Tailwind is just faster. Typing px-4 is way easier than padding: 0 4px;, and I don’t have to stress over naming a class that won’t collide with anything else. Naming things sucks. Tailwind helps you skip that whole mess and just build.
Another bonus: Tailwind is easy to delete. You don't get tangled side effects or some random override breaking stuff in weird ways. Kill a class and you know exactly what changed because it’s right there in the markup.
Re: CSS's problems are Tailwind's problems
#86Earlier quoted context omitted.
If you write enough CSS for a site... eventually you end up building utility classes anyway. Now, you re-invented Tailwind... but in your own proprietary way that nobody else understands. Tailwind takes the inverse approach. The example posted by the parent above is completely unambiguous - what you see is what you get, and it's done the same way everywhere Tailwind is used. You can read the component's styles and un…
There's a big difference between using utility classes for utilities and using utility classes for everything.
Re: CSS's problems are Tailwind's problems
#87...then goes on to promote "CSS-in-JS"
Re: CSS's problems are Tailwind's problems
#88Tailwind is magical to me for one reason alone: I can now design. As someone who spent 20+ years as a jack-of-all-trades / full-stack developer, specialising in back-end and database skills, this has largely been... confusing. Before, I couldn't even make plain text work. Totally hopeless, I didn't have the eye for things. Now though, now I help my kids lay out their homework to be more visually pleasing. It's bizarr…
A decade ago Bootstrap helped a generation of programmers who don't know how to design make pleasantly looking websites. I fail to see how Tailwind is better suited to that task than Bootstrap.
Re: CSS's problems are Tailwind's problems
#89If you go even minimally outside the beaten path, the tailwind CSS declarations can mutate into a frankenstein monster that makes regular CSS look like a friendly, cute koala Example: https://www.nikolailehbr.ink/blog/realistic-button-design-cs... shows an "old fashioned", 90's are back-in-vogue, 3d button. Tailwind CSS for it becomes After I got eye-strain and headaches after taking over maintenance of a tailwind ba…
I used to be against Tailwind. Now that I've used long enough I can tell you that code is perfectly fine. I can read it and easily modify it. You can comment it out if you care After
Re: CSS's problems are Tailwind's problems
#90Since Tailwind looks obviously bad on first pass with all the class spam, I'm more curious to see someone steelman Tailwind. I have some ideas, like how the dead code elimination + granular but consistent classes lets you build novel components that are still consistent with your UI which might be essential for making a 3rd party component library work. I've been using Bootstrap since it came out 15 years ago but it…
Except, it does now. Presumably because of the popularity of Tailwind, Bootstrap has all of these inline utility classes, and LLMs absolutely love to spam them across your code. It’s really annoying when you have a stylesheet with a few dozen well-scoped lines, and the LLM just starts bashing inline styles everywhere.