Live data from Hacker News

Why Tailwind CSS Won

matt-rickard.com

311–320 of 559 posts

Re: Why Tailwind CSS Won

#311

Earlier quoted context omitted.

This is called a leaky abstraction. I believe I'm convinced that if an abstraction is leaky then it's garbage. For instance, if I really needed to know say, jvm assembler to code Java then Java would be garbage as an abstraction layer because it would simply be creating problems where they need not be. Java however is clean, which makes it useful. I don't need to know the next level down. C is clean. JavaScript is. P…

I don't view Tailwind as an "abstraction" in the same way that you might say Java is an abstraction over the JVM. If I'm writing Java then I'm only thinking about how Java works, not about the implementation details of the JVM. But when I write Tailwind I'm still very much thinking about the underlying CSS properties. Tailwind just gives me a much more convenient way to add the CSS styles that I already know, with si…

> But then the CSS has been an agonising, unmaintainable mess on every big collaborative project I've ever worked on

That's the other thing, tools are a really poor shortcut to competency and in practice just reflect the same level of mastery that caused the initial headache except with a different set of tools.

This isn't pure. Some things are genuinely less insane than others.

As an analogy, higher quality brushes, paint and canvases will make you a better painter but buying new brushes isn't going to be part of becoming the next Monet. Consumption isn't going to get you there.

The real competency as you point out, come at higher level coherency, which frankly takes about 5-10 years to get any good at. It's a cognitive mastery that's mostly independent of tools.

People want to seek out better tools as a proxy for the hard earned talent. It might get you further but at some point, knowing what you're doing is the only way to go.

It sucks. It's hard. It's frustrating. It's always changing and it's also unavoidable.

Re: Why Tailwind CSS Won

#312

Earlier quoted context omitted.

> That's good, it means in a few years Tailwind will be considered a dead tech. And that’s good because of what, beyond your own personal preference as to your Framework Of Choice?

It is good because Tailwind actively fights the engineering choices behind the web platform, it doesn't understand them, it doesn't build on top of them in synergy and alignment, but it counteracts and nullifies them with religious fervor and zeal. Tailwind projects read like the wall writings of a mad man, who is convinced they've discovered the secret of the Universe. And that secret is compiling absurdly large, GI…

> So as the bubble grows, you start also seeing jobs requiring "10 years of Tailwind experience" more and more often, the projects you rely on are starting to switch to Tailwind, and now you have to use Tailwind, like it or not, because everything is glued to Tailwind. If the bubble keeps growing, then we also see a myriad of "like Tailwind but for JavaScript", "like Tailwind, but for SQL", "like Tailwind, but for web services" and there's no end to how far it can go, because bubbles, driven by the aligned wide-eyed stupidity of millions of delusional people can grow to wrap around the entire industry, before they pop.

Ah, just like React!

Re: Why Tailwind CSS Won

#313
post #304

Earlier quoted context omitted.

Cool hot-take but it’s not true. You’re literally learning CSS when you learn tailwind. And no one (good) picks up a tool solely because it’s shiny, they pick it up because they find it has utility, which evidently LOTS of people do. And if you don’t think it’s reusable then you at least need to bring an argument for why that’s so because the docs, personal anecdote, and the opinion of LOTS of people is completely op…

Senior Staff grey beard: Counterpoint: The C in CSS stands for Cascading. So you’re not learning CSS. You’re learning Tailwind specific classnames that expand to non-cascading style rules.

Mid level beard: Tailwind makes most sense in an app developed with components.

So the cascade still happens, just in a different way.

Re: Why Tailwind CSS Won

#314

Earlier quoted context omitted.

It is good because Tailwind actively fights the engineering choices behind the web platform, it doesn't understand them, it doesn't build on top of them in synergy and alignment, but it counteracts and nullifies them with religious fervor and zeal. Tailwind projects read like the wall writings of a mad man, who is convinced they've discovered the secret of the Universe. And that secret is compiling absurdly large, GI…

> Tailwind projects read like the wall writings of a mad man My dear pot, you should meet my friend Kettle. Really, this is a lot of text that sums up your personal preferences as to why you don't like Tailwind. Nothing concretely objective here. And, by the way, I agree with some of it! But you're also ignoring Tailwind is used by massive , engineer-first companies (such as Stripe), and the engineers in question act…

Stripe is not a dude, it's a company of many people with different skills in different areas. I also often wonder how OpenAI has a team that can create the world's top AI model currently, and yet their front-end chat app and plugin model has basic injections, usability issues, accidental user information disclosures and other novice bugs, but there you go. I guess it's possible to have a company skilled in something and stupid in another.

I think my critique was sufficiently detailed, but if you like Tailwind's approach you may enjoy it coming to your language of choice, where you can code by writing very long variable names in a highly specific way, which are then read by reflection and interpreted as code.

Re: Why Tailwind CSS Won

#315
Specific to the article:

> Switching to a CSS file to change styles is a costly context switch

It is?! I have an IDE with more than one pane. CSS-in-JS exists if you really don't want to switch (albeit with its own problems)

> you can just copy and paste a list of classes or an HTML block into your application

Well back in my day we called these "inline styles" and came with their own problems. CSS is copy-pastable as well, and easily composed with classes.

> Compare this to [..] CSS build systems like Saas

Tailwind requires a build step! Frankly, I haven't seen a sizeable webapp without a "build step" for incorporating even plain CSS

> The best way to write the least amount of CSS is to just compose basic styles

This feels like an argument against Tailwind? Utility classes are helpful but will never be enough to replace CSS entirely without long lists of classes on every element

Re: Why Tailwind CSS Won

#316
post #299
post #134

Earlier quoted context omitted.

4/5/6 what? Bananas? And what exactly is “screen size”? Does it refer to physical size, or number of pixels? Does it count width, height, or both?

You don't need 5 question marks to tell us you don't know what breakpoints are.

I know what breakpoints are. As far as I'm aware, there are no standard values for them.

Re: Why Tailwind CSS Won

#318
post #117

For getting designs up and running quickly, it really is great. Being able to think "Hmmm, I want a rounded button, with a border and a blue background" and just typing class="rounded border border-blue-600 bg-blue-500" and it's done. With lots of UI being components now, it doesn't really matter that it is verbose - I actually find that helpful. And even if you want to have a class that you use all over the place, j…

> Being able to think "Hmmm, I want a rounded button, with a border and a blue background" and just typing class="rounded border border-blue-600 bg-blue-500" and it's done. I'm not a frontend developer and don't really know much about these frameworks, but how is this different from just using style="actual css"? This just feels like inline styles reinvented for whatever reason.

For me, when I'm working on a layout (I'm not a designer at all) it's quicker for me to parse words that describe what I want, than to type out

style="border-radius: 5px; border: 1px solid #2563eb; background-color: #3b82f6"

Personal choice obviously, but I work with frameworks and components if I'm doing frontend stuff, so having things as a single name for something that is consistent across everywhere I use it makes it easier for me.

It's not for everyone, and that's cool.

Re: Why Tailwind CSS Won

#319
Btw Tailwind isn’t a religion…if you don’t want to use it, that’s fine.

It has helped a lot of people - myself included - write more and better CSS but I don’t understand the vitriol here. If you want to write vanilla CSS or BEM or Sass or Less, I think that’s great.

Re: Why Tailwind CSS Won

#320
post #304

Earlier quoted context omitted.

Cool hot-take but it’s not true. You’re literally learning CSS when you learn tailwind. And no one (good) picks up a tool solely because it’s shiny, they pick it up because they find it has utility, which evidently LOTS of people do. And if you don’t think it’s reusable then you at least need to bring an argument for why that’s so because the docs, personal anecdote, and the opinion of LOTS of people is completely op…

Senior Staff grey beard: Counterpoint: The C in CSS stands for Cascading. So you’re not learning CSS. You’re learning Tailwind specific classnames that expand to non-cascading style rules.

This is not true. There's no way to create a "non-cascading style rule" unless the style rule already doesn't cascade. You still have to understand the cascade in order to use Tailwind.
Post reply on HN