Live data from Hacker News

Why Tailwind CSS Won

matt-rickard.com

211–220 of 559 posts

Re: Why Tailwind CSS Won

#211

The hardest part about programming is naming things. If you use tailwind you don’t have to name things. That’s why it won.

You really don't have to do that. It is a pseudo-problem. Specificity and flexibility can also be managed easily in CSS only. Without naming everything. Linting can be used to enforce real good practices. Without any overhead costs.

Re: Why Tailwind CSS Won

#212
post #160

Earlier quoted context omitted.

Yes it's like inline styling, but the difference is that with Tailwind your build has just 1 CSS class with { display: flex; } used across your HTML, rather than inline styling or decoupled stylesheets with hundreds of instances of {display: flex}. If you use a framework like React, Angular, Svelte, it makes sense because your styles are usually coupled to your components anyway.

There is a real though very niche reason why having fewer selectors is useful, speaking as someone who has run into the selector limit in IE before.

Also speaking from experience — you have to have a lot of bespoke CSS and virtually no design system / internal consistency to run into that limit (a.k.a the Movember 2013 brand refresh).

And finally, when you did run into the IE selector limit, you could just split the style sheet in two (fairly trivial if you were using Sass), because the selector limit was per stylesheet.

Re: Why Tailwind CSS Won

#213
post #156

Earlier quoted context omitted.

> You're not learning anything valuable by learning Tailwind. 1. You need to know CSS to use Tailwind 2. I learned and understood quite a few of things I rarely use thanks to Tailwind's amazing docs. Docs that are non-existent for CSS 3. I'm reasonably good with CSS, but I could never come up with a consistent and minimal design system that Tailwind offers That said, to things everyone should read to up their CSS gam…

If you know CSS why are you using Tailwind which is esoteric CSS but worse? Just use CSS.

So glad to read comments like this. I cannot believe my eyes that most devs these days just don't get it and litter their projects with layer upon layer upon layer of unnecessary complexity.

I thought a person had to be rational to become a developer but oh my, how wrong I was.

Re: Why Tailwind CSS Won

#214
I work every day with web projects, and the notion "Tailwind won" in any capacity sounds like a thunder from a clear sky.

If we see more articles to that effect and this is not an outlier, it means the Tailwind cult is in its "red dwarf" stage, where the community becomes smaller, but denser and more convinced than ever that the entire world is a copy of their small bubble.

That's good, it means in a few years Tailwind will be considered a dead tech. Tech bubbles are so weird. It's like the tulip mania or the NFT craze. It all makes sense when you're in the bubble. While those outside are looking at it, and seeing what is clearly mass psychosis.

Re: Why Tailwind CSS Won

#215
post #11

I don't get Tailwind. In my book, CSS is here to facilitate the style of multiple webpages by modifying a set of rules, and classes are here to mutualise said rules. With Tailwind, it looks like you design by writing HTML, which is the opposite of what CSS aims at. So if you wish to change your design, you'll have to update multiple templates instead of one CSS rule. Every time I've had to work with Tailwind, it felt…

> if you wish to change your design, you'll have to update multiple templates instead of one CSS rule. this comes up on every tailwind post and it isn't true. tailwind encourages you to not repeat yourself by making reusable components (or fragments etc) instead of reusable classes. that way if I want to see how the button both looks and works I only have one place to look even if you don't do this, with tailwind you…

Why not use the devtools "to see how the button both looks and works"?

Re: Why Tailwind CSS Won

#216
post #140

Gray beard's 5c: Tailwind is a farce and a catastrophe. It's as modern as the style parameter is, and it's as reusable as a moving a dirt pile from one corner to the next. You're not learning anything valuable by learning Tailwind. Learn CSS, that will stick with you for the next 20 years. It amuses me when a library is implemented 'with tailwind', which means it's totally useless to the people _not using tailwind_,…

You're not downvoted, which means... the tailwind... is turning.

I apologize.

Re: Why Tailwind CSS Won

#217
post #34
post #11

I don't get Tailwind. In my book, CSS is here to facilitate the style of multiple webpages by modifying a set of rules, and classes are here to mutualise said rules. With Tailwind, it looks like you design by writing HTML, which is the opposite of what CSS aims at. So if you wish to change your design, you'll have to update multiple templates instead of one CSS rule. Every time I've had to work with Tailwind, it felt…

> So if you wish to change your design, you'll have to update multiple templates instead of one CSS rule. Changing the CSS to apply site-wide changes sounds great in theory but after working in front-end since IE6, this almost never happens in practice. You're never certain how the styles cascade and indirectly affect things so you're afraid of changing the core CSS. Styles isolated to components is a much more scala…

> You're never certain how the styles cascade and indirectly affect things

Then your DOM is too complex. You're formatting a text document; that shouldn't get you in a position where you lose track of what cascades where. If it is you have a bigger problem than styling.

Re: Why Tailwind CSS Won

#218

Earlier quoted context omitted.

I’ve learned CSS, used Bootstrap, and tried a bunch of other tools. Tailwind ecosystem is the fast approach to building web UIs in my experience. It doesn’t matter if you know CSS or not. Nobody gains if you know CSS per se. People gain when you deliver finished projects. Tailwind helps ship projects faster.

As a user of web sites, this attitude leads to me paying for your fast shipping in electricity for CPU usage, extra money for extra RAM, plus wear and tear on my nerves because you do what your library allows you to do instead of something usable. Thank you.

Tailwind is not a performance hit, anyone who knows how it works knows that. Maybe stop throwing random accusations you can’t back up… it’s such low quality commenting.

Edit for the downvoters who don’t know how it works: there’s zero js being run at runtime, it’s a pure css framework that generates as-minimal-as-possible css files. And it’s not class lookups that cause whatever issues parent comment is talking about.

Re: Why Tailwind CSS Won

#219

Even putting aside the architectural considerations, one way that standard CSS has failed, is that the naming of properties is inconsistent and increasingly difficult to remember and work with. I find that using tailwind's flex "aliases" (which is almost what they are) is more intuitive than using the god awful standard CSS property names. CSS standards should not just look at adding stuff, but making new versions, l…

Hard disagree. As a web developer who has to work with the CSS monster daily, having to memorize property names between CSS versions would be a particular kind of nightmare.

Re: Why Tailwind CSS Won

#220

Earlier quoted context omitted.

But you don't need Tailwind for that. A "designsystem.css" file with custom properties would do the trick. Without any added third party tech.

Why should anyone care about adding third party tech? This argument boils down to: “But you don’t need Tailwind for that. You can do more work for a (almost certainly) worse result with a designsystem.css!” Sure you can! Why?

(Almost certainly) worse? Haha. Why would it be?

If you really want to, you can even use Tailwind's naming for you language file. The thing is, you add complexity to do a job that could be done in the same way without adding complexity and dependencies.

Shouldn't we try to justify added complexity through added value?

Post reply on HN