Honestly, as much as I disliked the CSS-in-JSS trend, it did solve a reasonable problem with React — one which Vue and others had solved with their SPC.
It feels like ducktape on top of ducktape...
If Vue/Svelte had gotten the popularity React has you would see a lot more people realizing that SFCs and scoped style blocks solve most of the problems people poorly solved with CSS-in-JS.
Tailwind has some other benefits to it like good token setup and ability to copy paste from project to project and have it just work, but the mess it makes of your templates and the difficulty of then editing it down the line doesn't make those benefits worth it.
But Tailwind works for me because:
- it gives good defaults (from sizes and distances to color palettes)
- it's documentation is heavenly, and helps you find the precise thing you're looking for in seconds
I actually leveled up my understanding of CSS thanks to Tailwind :)
Tailwind is super successful from people that have an aversion to React. Like all my mostly backend devs friends.
> create-next-app now asks if you want to start with Tailwind CSS instead of CSS Modules.
Steve was the personal designer for Taylor Otwell and Laravel long before Tailwind. Steve has created all the most recent Laravel designs for many years.
Prior to starting Tailwind with Adam, Steve wrote up a bunch of fronted design standards and published a book called Refactoring UI. In that time frame, he also created a bunch of free open sourced sets of SVG icons called HeroIcons. HeroIcons were a direct replacement and improvement over Font Awesome.
Somewhere in that timeline, Adam and Steve put everything they had created together into a single project, and that was called Tailwind CSS.
Being on the ground floor of Laravel and the open source community totally helped with their initial exposure. All the things I mentioned above were also popular topics here on HN a year before Tailwind was created.
https://www.refactoringui.com/ https://heroicons.com/ https://twitter.com/steveschoger
I personally met him pre COVID at Laracon, Chicago. I bumped into him during lunch, and he was super cool and open to chat.
I have no affiliation with him, and have only followed him on Twitter after we met.
React is just the most prominent of them all.
For the amount of time that a typical web app lives, raw CSS is just a resiculous waste of time that sucks the joy out.