Recently an article titled Why Tailwind Won hit the front page of Hacker News, kicking off a heated debate about this polarizing CSS framework. Some developers can’t get enough of Tailwind; to others, it’s a blight upon our profession and the worst thing since the <blink> tag.
Haters be damned. I love Tailwind, I’m using it on every project where I have the choice, and I’d be happy to never write a line of vanilla CSS again. According to one commenter this means I’m in a cult, but hey, I’m happy, and this Kool-Aid tastes delicious. Here’s why I’m letting Tailwind fill my sails.
I’ve been building websites for something like twenty years now, since I first learnt basic HTML at the age of roughly twelve. From an early age I understood that you should never, ever, ever write your HTML like this:
These so-called “inline styles” are verbose, ugly, repetitive, and generally read like shit. The correct approach, so I was taught, is to replace those style attributes with a meaningful “semantic” identifier, typically class: