DEV Community

Discussion on: Why I switched from normal CSS to Tailwind CSS

Collapse
 
facundocorradini profile image
Facundo Corradini

Nice writeup, love how you talk about the pros and cons instead of blindly following the trend.

One aspect of Tailwind that's rarely discussed is its handling of complexity. Sure, it pretty much avoids specificity and therefore deals with one of the challenging aspects of CSS... but that also makes media queries quite hard to work with. You just keep adding classes and classes for each viewport size, which is a sub optiman solution.

In my opinion, this is going to be its downfall. CSS is getting increasingly complex in that direction. Media queries nowadays go far beyond screen sizes, into multiple accessibility issues such as dark mode, reduced motion, high contrast, etc. And it's about to become even more complex with container queries, layers, scopes... things that I can't really see Tailwind (or the utility-first / utility-only architecture) handling satisfactorily.

But that's me. In the very near future (~ 2 years) we may go into a valorization of the "normal" CSS specialist to handle the incredibly complex contexts of modern CSS. Or not. But if we do, Tailwind is going to be rapidly obsolete.