by imiric | 2025-09-08 00:00:10+00:00
> WHY does markup need to be "semantic" in the sense that you mean?

If you've been hearing about this since 2003, then I shouldn't have to repeat the reasons here. You can look up countless articles that explain exactly why semantic HTML and CSS are a good thing much better than I can do justice here.

> There are several reasons, but media queries would be reason 1.

That still doesn't explain why e.g. `class="w-16 h-48 md:w-32 lg:w-48"` would be preferable over a single class that describes what the element is and defines how it should look like and behave.

I mean, to steel man your argument, I get the appeal of getting predefined and consistent breakpoints, and being able to prefix or suffix classes with sizes. But that doesn't seem like a worthy tradeoff for losing legibility, and polluting the markup with this noise. It's the same as declaring all CSS inline, except using classes.

> Remember, we can't tell what your high-level abstractions do without opening at least two files

A good class name will tell you what the element is, not what it should look like. For that, you look at the CSS. Whether that CSS is defined in the same file or in another file, is up to you.

> plus we have to understand any inherited/cascading rules on top of that

Yes, that is what the "C" in CSS stands for, and it's a useful feature for propagating and combining rules without having to redefine them on every element.

If you want to avoid this "complexity", there are numerous ways to scope rules to a specific element or component. Most modern frameworks can scope styles per component for you. And with cascade layers, you now have more control over how and when rules are applied.

> Tailwind relies on CSS for its class names. How would one use it without knowing CSS in the first place?

Some class names are straightforward to understand and use, but others, like the example I posted above, require knowledge about Tailwind itself. Users can become proficient with this syntax without ever understanding what's happening underneath, thus degrading their CSS knowledge. You said it yourself—you want to avoid looking at CSS files altogether. How long would it take for you to not be able to write CSS directly?

> It's way faster, trivial to pick up, and easier to maintain longterm, especially in a team environment

Those are highly subjective, and I would argue against it being easier to maintain. When all your elements use dozens of utility classes, how do you ensure that the styles are consistent throughout the app? One typo in any of the class names can cause inconsistencies that are difficult to spot in a code review.

Oh, use reusable components, I hear you say. Well, why don't you just define the CSS in the component itself then?

Or, no, you use another abstraction on top of Tailwind like daisyUI, which is an insane attempt to bring back sanity into this workflow.

> than bespoke CSS/DOM abstractions that have layers of hidden complexity.

What abstractions?? It's literally a group of rules with a descriptive name that tells you a) what the element represents in the context of the app, and b) how it looks and behaves. There are no abstractions there.

The reason the classes are "bespoke" is because every app will be different. You might want to share some common rules between apps, and we've been doing that for decades just fine. I don't see how grouping utility class names inline makes you any faster or more productive than grouping rules in CSS declarations in the same or external file, and giving them a descriptive name.

> Remember, tons of people switched from older methodologies to Tailwind and have already priced in the benefits, small as they were.

Tons of people use and swear by bloated and complicated frontend web frameworks too, so the popularity of Tailwind doesn't surprise me. I can still have the opinion that it's all wrong, which you're free to disagree with.