It was just an example, but it's more broadly the redundancy of a list of repeated classes applied to elements that are identical or mostly identical.
These are things that CSS literally solved with the web2.0/semantic-web movement 20 years ago. I get the convenience of Tailwind but a lot of it feels like a massive step backwards.
The big thing about tailwind in the context of JS rendering is that this ends up being a code smell. If you find yourself repeating a set of classes...you probably should componentize that and DRY.
It's funny how the solution (use CSS as it was intended) is now being transformed into JS-powered component solutions.
But yeah take say a dashboard layout with a lot of cards of different sizes. They're going to have the same underlying design, padding, rounded edges, background colors, etc -- and usually only vary on maybe size and breakpoints.
This is all very well solved in semantic web, but it feels to me like the JS + Tailwind apporach is creating new problems and thus new solutions to accompany.
I think the detail is that this JS answer is really only for people working at a seriously large scale. At that size, there is absolutely zero room for non-componentized logic as cross-managing a billion pages with duplicate HTML elements is pretty unacceptable. That said, Tailwind also allows you to define your own classes that apply multiple TW classes.
These are things that CSS literally solved with the web2.0/semantic-web movement 20 years ago. I get the convenience of Tailwind but a lot of it feels like a massive step backwards.