15 reasons I enjoy @tailwindcss: 1
15 reasons I enjoy @tailwindcss:
1. I don’t have to spend time naming classes.
2. I can jump into a project that uses it immediately.
3. The final CSS is automatically as small as possible. No unused styles are shipped to prod.
4. Fantastic docs.
5. I don’t have to jump between files, or keep a CSS and HTML file’s classes in sync.
6. I get autocomplete for Tailwind styles in my editor (Tailwind CSS IntelliSense extension).
7. I can quickly build attractive UIs without a designer.
8. It encourages writing consistent styles. I don’t have to hunt for existing custom classes.
9. I can change/remove a style without any worry about breaking other stuff.
10. I can style faster. It reduces decision fatigue and saves keystrokes.
11. I can hover over a Tailwind classname and see the resulting CSS in my editor (Tailwind CSS IntelliSense extension).
12. I don’t have to worry about styles leaking. They’re applied directly.
13. I can rapidly prototype in my browser's DevTools using Tailwind classes.
14. Thoughtful defaults encourage consistent, professional-looking styling.
15. It’s just predefined CSS classes. No new syntax required.
That's 15 reasons I like Tailwind. But it's certainly not perfect.
Here are 4 things I dislike about Tailwind:
1. “Noisy” HTML (mitigated by composing UI via focused, well-named, reusable components, plus use the inline fold extension in VS Code.)
2. Gotta learn a lot of Tailwind class names (but at least I learn them once, instead of new for each project)
3. Takes a few minutes to set up on each project.
4. It’s hard to sell. People confuse it with “inline styles”. Many people hate it, even though they haven’t used it.
Oh, and here's a common concern: “Tailwind leads to repeating the same Tailwind styles.”
Solution: If a set of Tailwind styles is frequently repeated, I create a reusable component. Doing so eliminates the repeated HTML too.
So is Tailwind perfect? Nope.
But it is worth it? I'd say yes.