I use TailwindCSS for all of my projects. Here are three reasons why.
1. Most engineers are bad at CSS
I remember my first time working in a large codebase. CSS was an absolute mess with multiple !important
values fighting over one another. Most engineers suck at CSS and don't understand its cascading nature. It's a tragedy that CSS gets overlooked by most engineers, but it's rare to find engineers who truly devote themselves into learning it.
It only takes one bad engineer to ruin CSS for everyone else. With TailwindCSS, bad engineers can't ruin the codebase because their bad code is scoped to the components that they are working on and engineers do not have to think about the cascading nature of CSS.
2. There is TailwindUI Fallback (or other copy paste alternatives)
Main benefit of TailwindCSS is that we can copy paste other people's code and expect it to look the same. There is a big community of paid (i.e. TailwindUI) and free TailwindCSS components that engineers can copy paste into their code.
3. Isn't tied to JavaScript
CSS in JS has a lot of the same benefits as TailwindCSS. For example, we can scope the style changes to component so that bad CSS is harder to infect other parts of the codebase. The main downside to CSS in JS is that it's tied to JavaScript. TailwindCSS is language agnostic which makes it a safer choice because some engineers avoid JS like the plague.
Top comments (0)