It's like the coding version of https://en.wikipedia.org/wiki/Dancing_mania
Then, I encountered the raving fans. That's when I knew the shark had been jumped.
There is 1 I guess. I wrote a loop somewhat recently because there doesn't appear to be a variable for DPI yet. `env(dpi)` doesn't exist or I could have did what I wanted: scale a <canvas> element to be 1.0 scaling regardless of the user's screen scaling.
How you want to write CSS is a tradeoff.
Traditional CSS without tools like Tailwind, styled-components or other "hacks" is especially bad at collaboration and evolving from prototypes to large sites or apps, in my experience.
They're attributing a cult like / social influence phenomenon to the popularity of it. That others use it because others use it; not on any perceived by them actual merit of tailwinds design.
I was convinced to try it by Adam Wathans initial blog post comparing it to BEM notation and "semantic" class names.
The arguments in that blog post still make sense, regardless if you think that tailwind is a good solution.
A cult like / social influence phenomenon is attributable to a lot of tech. Not sure if I'd call that "mass psychosis" though.
Sure, Tailwind tends towards lock-in, it also adds complexity in other places. It also will surely go out of fashion soon, or already has.
But it brought a concrete idea to the table, which worked for many people, and that was the reason for the "hype", in my opinion. Not "mass psychosis".
I never wanted to use it because of fashion. Maybe that was the reason I got to know about it though.
Also it influenced the way I write CSS, despite not using it anymore. In short: avoid being clever with the cascade, like the plague.
And I mainly stopped using it because I changed my job after 5 years. The projects we used tailwind for went well and it succeeded at avoiding the problems I wanted to avoid, especially when collaborating with a newly hired young colleague.
So yes, it is an example of a hype, might have been overhyped, but that's not "mass psychosis" to me.
Traditional CSS? I’d update a style in a few specific spots and everything benefits.
I wish I liked tailwind it's all the rage but I just don't
The reason why it is big is efficiency. Once people know those class names by heart, they get a "nice" (arguably) default style very quickly without jumping between multiple files. This matters more than one might think..
Tailwind sacrificed that for dev ux. The next generation will have a harder time learning about web primitives.
And htmx is not something I need for these days thankfully. I use phoenix liveview and get away with writing very little pretty dumb code. It's wonderful.
Markup is no longer portable without bringing the config with it and devs still need to learn the custom styles and classes we defined, meaning Tailwind knowledge alone doesn't get you up to speed right away.
I also avoids the giant size of Tailwind classes that requires that elaborate build/reduction process. You can just include Bootstrap from a CDN or whatever.
A future project of mine is to build a mini-browser of sorts, and I'm going to use tailwind as the minimal basis for getting the CSS to work. so... I'm enjoying it... like a lot.
You just move HTML from anywhere and it would just look exactly the same (subject to your overrides/customisations of course) so I don't think Tailwind is going away anywhere.
Rather, it now can be thought of as a mini language or notation built on top of CSS.
So far UnoCSS works very well for me. It's like light-weight and customizable Tailwind. Also for more complicated "components" I use css modules and refer to my theme values via directives (I think this is doable in Tailwind too?).
I'm thinking something similar using a web component library could be good. Maybe material or fluent based.
I wish people move away from describing things they dislike as bad, horrible, dumpster fire. Describing the problem in a discussion site is always better
But notice how you're then left with a bunch of repetitive HTML on which you apply those classes. If you bundle up the repetitive HTML into a reusable abstraction (like a component), then you're no longer repeating the CSS and so you don't need to bundle the CSS into classes anymore, thus reducing work. A type of inline styles, without the limitations, then gives you more direct control over styling on the bundled HTML itself. That's how you should use Atomic CSS/Tailwind.
As for Htmx, it's nothing new. I don't dislike it, but comparing it to web frameworks like React is missing the point. A lot of what it gives you (or doesn't) can already be achieved with a bit of vanilla js and, if you're feeling fancy, jQuery. Advocating for it as a replacement for something like React is sort of like recommending a bicycle to someone who drives. Yeah, it has its place, but it doesn't replace the utility of the car. Insisting it does indicate you don't know much about cars - or maybe bikes.
Anyway htmx uncomfortably reminds me of the MVC servers we use to write 15 years ago where the frontend always ended up being an unreadable unmaintainable mess after a few years because the frontend was treated as a random collection of assets for views to use.