This doesn't preclude enforcing it directly in the CSS files, but it does make it a lot easier.
You might like not having 24000 permutations of
display: flex;
align-items: center;
in your code.There are good alternatives to Tailwind and also small projects where "just write CSS" is enough. In larger projects, most people need at least strong naming conventions, other tools, and/or an opinionated "template" such as Bootstrap.
Many people using Bootstrap don't even bother to configure a theme.
That's where the real specificity wars begin then (not necessarily applicable to you).
And once people have started to define their design system in terms of overrides, pain is ahead (if you need any non-trivial CSS, that is).
After switching jobs, I now mainly use CSS-in-JS (which frees me of many problems, and in my case, creates fewer other problems).
I am perfectly versed in Vanilla CSS and the cascade, wrote my first stylesheet around 20 years ago (when layout in CSS was not really a thing)
Why is doing things differently from your preference "coping"?
And yes, I also agree with the core of your critique: Tailwind is a (yet another) DSL on top of CSS, which makes it smelly.
But as I see it, the reason for using Tailwind is not that this DSL was easier, in fact it's the opposite, I constantly had to use IDE autocomplete and/or the docs in order to use it.
Tailwind is a nasty DSL inside the class attribute, yes. And still, this DSL can be and often is a relieve from other custom CSS that grows exponentially and causes bugs due to selector complexity.
Tailwind IMO solves the same problem that styled-components, CSS Modules and ShadowDOM try to solve.
Maybe my post didn't make this clear, but that's what I meant when I said it solves the same problem for me.
No dead styles, no specificity wars, no naming worries.
Edit: I see, I wrote "try to solve" in contrast to "solve". That was unintentional and thus not what I wanted to say.
It's not.
> There are good alternatives to Tailwind
Yes, just write the CSS. If you are going to use Tailwind, just write CSS. If you are going to use Bootstrap or any of those sorts of resources the equation is different. You're no longer writing CSS in a class attribute but pretending it's a style tag and that you're somehow doing things "better". You're just writing CSS without writing CSS.