Tailwind Considered Harmful
I've been writing web applications for more than 10 years. I've built back ends in PHP, Rails, Python, and Node. I've crafted front ends with HTML/CSS/JS, JQuery, Vue, and React. I've been in the trenches of build system hell with custom Webpack configs, and dabbled with full blown frameworks like NextJS and Laravel.
I love being a web dev. I get to learn new things every day and build cool stuff. This joy for what I do has carried me far. I ran a startup for over 10 years building both native and web apps and now I work for a giant corporation with a wonderful team of talented people. At my most recent performance review I was told that I operate with the impact and velocity of two developers. I don't say this to brag, but to hopefully give some credibility to what I'm about to write:
*At least for the way my brain works.
I follow a lot of web devs on Mastodon along with multiple web dev blogs and hashtags. I've found some awesome people on there and usually have a good time. But there are some posting nonsensical takes that have rubbed me the wrong way. I won't call out anyone specifically, but I've been reading comments like this almost daily for a few months now:
I'll admit it. I had a pretty negative reaction the first time I learned of Tailwind. The syntax looked ugly, the utility class system seemed constraining, and it all seemed pointless compared to regular CSS or Sass. But then I gave it a shot on a side project. At first, my suspicions seemed correct. It was annoying to constantly check the docs to figure out how to map my CSS knowledge to Tailwind classes. I almost threw the whole thing out, but after only a few hours, something interesting happened.
A UI took shape at record speed. The mental overhead of managing various CSS files and classes disappeared. Once I got the hang of it, the speed at which I could create and iterate on most simple UI elements was far beyond anything I'd achieved in the past. But I'm not here to sell you on Tailwind. If you don't like it, then that's totally fine! I've stumbled into a good rhythm with it and can now iterate extremely fast on most designs while keeping my code maintainable. It works well for me, but it may not for you.
I like CSS. I'm pretty good at it. I still write it, even in projects where Tailwind is used heavily. The ideal blend I've found is Tailwind for the simple stuff, CSS for the rest.
Tailwind is a tool. It can be used and abused like every other tool. The CSS purists out there who claim that Tailwind is for people who don't know CSS are only saying so to make themselves feel superior. Have you ever worked in a project with thousands of lines of legacy CSS written by someone who didn't really know what they were doing? I have. It's not fun. And neither is a large project containing bad Tailwind code. Bad code is bad code. You can write terrible CSS and you can write terrible Tailwind. One does not prevent the other.
Side note: I've been that developer writing bad code. Heck, I'm probably doing it now! So don't sweat it. We all have to learn somehow.
So if you hate Tailwind, then more power to you. Go write that post on dev.to and try to convince the world you're right. I'll probably read it. I'll probably agree with some of the reasons why you dislike Tailwind. But what's best for you and your project isn't what's best for everyone. Demeaning comments about people who choose different tools than you aren't productive. Give people the benefit of the doubt. Try to learn why they made the choices they did. It'll make us all better developers.
Some of my other controversial takes:
- Typescript is love.
- Rails is bad.
- React rules.
Power to the Rails devs. I'm glad you love it. I'm trying, but I just don't get it yet.
Power to the pure JS evangelists who scoff at the constraints placed on them by Typescript. I get it. Typescript can be annoying, but I can't go back to the loosely typed anarchy that is JS.
And the people who hate React... Yeah. Idk, It's fine for me. 🤷 I do want to give Svelte a try though.
You all have your reasons for using the tools you love. I'd like to learn from you without being put down for making different choices. It's not that serious.
-Tyler