Live data from Hacker News

I don't recommend Tailwind CSS

en.andros.dev

151–160 of 178 posts

Re: I don't recommend Tailwind CSS

#151
post #148

Earlier quoted context omitted.

If it's just CSS then why would I use Tailwind instead of the actual thing? It's a layer of indirection for no reason if it's the same.

If BEM is regular CSS, why would I use BEM instead of the actual thing? It's a layer of indirection for no reason if it's the same. You use Tailwind in the same way you use BEM: becuase it makes it easier for frontend developers to write correct CSS.

You're right which is why I don't use BEM, it has no advantages over regular CSS, same with Tailwind.

Re: I don't recommend Tailwind CSS

#152
post #10

This is such a bikeshedding debate. While you don't recommend it, projects with Tailwind work . Over years. You can onboard new developers to it, able to contribute productively immediately . Likewise, you can pick up work after months or years and don't have to remember or rediscover how your styling layer works. The conventions and class names come really naturally fast, and you can always look it up. It's just not…

The "rounding" was grasping at straws:

> How round is rounded-lg?

Author: "In my vanilla CSS, I can read it in the CSS file. In Tailwind, who knows?!?"

Reality: You read it from location 2, not from location 1. The horror.

I don't even have a dog in the race. I'm past my days of handcrafting HTML and CSS. I have a few Claude Coded apps that use Tailwind, but I've not looked at any of the files (yes yes, I know. They're personal projects that run in my homelab. I don't care.)

Re: I don't recommend Tailwind CSS

#153
post #122

Earlier quoted context omitted.

> I have been in the industry for a while > Out of curiosity how long have you been doing frontend development? I've been writing CSS since IE 6 and I can tell you not a lot of us oldies like tailwind. I've only seen a strong inclination towards Tailwind from the newer generation frontends (2015 and beyond) Us oldies actually prefer BEM over anything else. My talking point is based off internal comms from a large'ish…

Many of us oldies who started working on the web years before IE 6 actually like Tailwind. We all have our preferences. But I know multiple 50+ year olds who have been doing this work since CSS was barely a proposal who now use Tailwind.

Hah, yeah, there's always anecdotes. I stopped doing frontend a decade or more ago (and even then it had been a smaller and smaller part of my day). But I see the appeal of it. I started front end when we had to buy testing desktops that were beefier so they could run multiple VMware VMs, one with IE3, 4, 5, 5.5.

I remember the delight that our designers had when Javascript came out and my buddy showed that you could do some magic on images and form elements and have an actual checkbox with a check in it, not just a filled or empty box or circle. Or of the dev who thought he'd impress a girl on IRC by updating a prominent site's homepage to have a "Hi Sara" underneath the banner because he could just ftp to prod from his desktop.

Re: I don't recommend Tailwind CSS

#154
post #10

This is such a bikeshedding debate. While you don't recommend it, projects with Tailwind work . Over years. You can onboard new developers to it, able to contribute productively immediately . Likewise, you can pick up work after months or years and don't have to remember or rediscover how your styling layer works. The conventions and class names come really naturally fast, and you can always look it up. It's just not…

I've never found tailwind to help someone who isn't already a reasonably skilled web developer. If you don't know CSS tailwind gets your far enough sometimes, but you have to learn many of the same paradigms as you would in CSS and you can still create issues that aren't as simple as missing "text-green-500". Tailwind seems most useful for devs who don't want to be responsible for managing multiple CSS files and all…

Well yeah, people need to learn the tools they’re using. How’s that shocking?

Re: I don't recommend Tailwind CSS

#155
post #10

This is such a bikeshedding debate. While you don't recommend it, projects with Tailwind work . Over years. You can onboard new developers to it, able to contribute productively immediately . Likewise, you can pick up work after months or years and don't have to remember or rediscover how your styling layer works. The conventions and class names come really naturally fast, and you can always look it up. It's just not…

[flagged]

Re: I don't recommend Tailwind CSS

#156
post #7

As a 26+ year frontender, years ago I was against it on so many levels. Until I tried it. Never looked back. Also, inheriting projects with someone else’s code is fine. Just a quick look at the central config and you’re good to go.

Tailwind is like Air Fryers in that way. I have been cooking for decades. I have a convection oven. Air Fryer is just an undersized version of one. But then you try one, and it turns out they are amazing.

Re: I don't recommend Tailwind CSS

#157
The bane of Tailwind is that to appreciate it, you should have in-depth experience with regular CSS. Negative opinions mostly come from people who show no understanding of CSS and pre-existing methodologies of writing it at scale. This author, as all authors of similar articles, shows quite limited CSS knowledge, judging by his points.

Answering every point of the author:

1. You have to learn dozens of classes – these classes are named after dozens of CSS properties. So you already know them. You also take this knowledge to other projects that are using Tailwind.

2. It breaks the separation between structure and design. Also, in HTML, you put scripts and CSS into files by design. Separation is a made-up thing. And writing Tailwind with @apply is still a valid way to write it – you lose code size benefits, but design system enforcement stays.

3. Its names are not consistent. See https://wiki.csswg.org/ideas/mistakes/

4. The design system is not enforced as much as it seems – you can literally detect deviations from the design system by the [] pattern, and you can force it with linters.

5. It is not a good gateway to learning CSS – Why should it be? It's a framework, not a CSS learning resource. BTW, it is still a better way to learn CSS than with auto-scoping modules.

6. It is hard to read – The author neglects clsx that is the default/available way to write CSS in most frameworks, that allows to group classes via arrays and objects.

7. The HTML lies to you about priority – Cascade is way harder than the author thinks, and by the way, one of the selling points of Tailwind is what makes complex cascade situations completely avoidable. What if color-red and color-green are in separate unscoped modules bundled up by webpack?

8. Working with Dev Tools is not comfortable. Agree, but it's how browsers devtools work.

P.S. I write CSS by hand via BEM on my own projects, and use Tailwind when I work with frontend and design teams. BEM is great, but it is much harder to onboard engineers to a BEM codebase, and no-methodology is a disastrous approach that sinks many frontend projects in bloat and cascade hell. Tailwind makes everyone familiar with code, and also Tailwind keeps our agreements with the design team in code.

Re: I don't recommend Tailwind CSS

#158
post #2

Nobody does. Yet it is everywhere, like AI slop.

I recommend it for certain situations.

I think this is one of those cases where there is no objectively "right" opinion. Tailwind exists for a reason and got a market for a reason. That doesn't mean it is always used in the places it's most helpful or that people don't misuse it (or simply not understand the complexity beast that is CSS). That's just the nature of any popular tool

I have my own opinions about where it's useful and why, but they're just that; opinions.

It's okay for folk to think differently, that is pretty helpful.

Re: I don't recommend Tailwind CSS

#159
post #154

Earlier quoted context omitted.

I've never found tailwind to help someone who isn't already a reasonably skilled web developer. If you don't know CSS tailwind gets your far enough sometimes, but you have to learn many of the same paradigms as you would in CSS and you can still create issues that aren't as simple as missing "text-green-500". Tailwind seems most useful for devs who don't want to be responsible for managing multiple CSS files and all…

Well yeah, people need to learn the tools they’re using. How’s that shocking?

that ship has sailed loooong time ago, hence endless “why we stopped using _____” blogs that make the front page

Re: I don't recommend Tailwind CSS

#160
post #70

Earlier quoted context omitted.

Do your sass customers know what javascript is or how it's different from java? Does this mean developers shouldn't care either?

They don’t, unfortunately. Any time I bring up the wonders of Elixir/Erlang or how great Postgres is, their eyes glaze over unless they have some kind of technical background. I’ve had many conversations where people were surprised there’s more than one programming language, they assume it’s some sort of 1s and 0s that flash past the screen Hollywood style.

I sometimes use edexui + btop to mess with business types.
Post reply on HN