Anyone else think this Tailwind-everything trend has gone too far? Tools have strengths and weaknesses, but I never understood why Tailwind specifically is so poularly seen as some kind of "default" these days - rather than a supplement to CSS for common/simple operations.
Personally I think the popular trends have overcorrected from CSS; soon we'll realize that the amount of complexity above is screaming to be packaged up and named something, rather than being crammed into the markup alongside more sensible things like text-black.
In 10 years, Tailwind is going to be like Bootstrap is now. Embedding a sophisticated DSL into attribute strings has never been a good idea. It works as long as the tooling around it is kept up to date, but it’s a hack. CSS may be ugly, but at least browsers are committed to maintaining backwards compatibility, and I can statically analyze it to reason about its behavior.
Sure it's not the prettiest, but even if you styled this with CSS directly you'd need to target those selectors. `#range-input::webkit-progress-bar` etc.
To your final point, I completely agree that it should be packaged up — I'd package this up into a component (react, partial etc.) which would encapsulate the styles via Tailwind, HTML and logic.
I like Tailwind as a way to more closely tie my markup with styling. I'll package it all up into a component anyway, but Tailwind keeps it all in 1 spot (the markup) rather than spread across multiple files.
Personally I think the popular trends have overcorrected from CSS; soon we'll realize that the amount of complexity above is screaming to be packaged up and named something, rather than being crammed into the markup alongside more sensible things like text-black.