I don’t like Tailwind. I avoid using it on my client projects. And when I feel motivated, I’ll make a case to remove it from a project where it’s already in use. This isn’t to say using Tailwind is bad or means you are bad at CSS (quite the opposite in many cases!), I just personally don’t find it useful when implementing a web layout.
The problem with stating this opinion is that it’s not benign within the web development community. Critiques of CSS utilities and frameworks such as Tailwind are often met with bandwagon attacks from its community. Why is that?
CSS as a language is the butt of many jokes. It’s impossible to center something. It’s hard to keep track of declarations overriding one another in the cascade. You can even buy a mug that dunks on it (full disclosure: I own this mug). Programmers expect CSS to operate within the patterns they’ve learned for other languages, and when it doesn’t, the frustration begins. It’s also worth noting that many of the common complaints do not take modern CSS patterns into account (e.g., you can center a div in so many ways now with only 1-2 declarations).
Jeremy Keith makes the argument that the frustration stems from the fact that CSS is simple but not easy:
I think that’s what’s happened with some programmers coming to CSS for the first time. They’ve heard it’s simple, so they assume it’s easy. But then when they try to use it, it doesn’t work. It must be the fault of the language, because they know that they are smart, and this is supposed to be easy. So they blame the language. They say it’s broken. And so they try to “fix” it by making it conform to a more programmatic way of thinking.
Those “fixes” manifested as CSS-in-JS, Material, Bootstrap, and Tailwind, to name a few. If you peruse web dev Twitter for any length of time, you’ll find the communities that evangelize these frameworks are mainly self-described programmers or developers. Oftentimes, they are used as a panacea to all their CSS woes; simply bolting it onto a project is their one-way ticket to not having to see CSS, let alone writing it.
These frameworks aren’t inherently bad. They lower the barrier to actually put working CSS on a website. They’re especially handy when it comes to rapid prototyping; spinning up basic UI has never been easier. The API-like patterns are familiar to many developers.
The important bit is that they hinder deep learning of CSS. This is not to say that every developer needs to have intimate knowledge of CSS when launching a personal project, but that major businesses need to invest in hiring front-end designers that specialize in this area. Many self-proclaimed full-stack developers don’t know how to write good and/or modern CSS. Hiring and promotion evaluations require developers to show deep skill in a variety of languages, but CSS is not often included. For many engineering teams, design is just a flourish, and a developer with rudimentary skill in CSS is good enough as long as they can tack on a framework that takes care of most of the heavy lifting. That heavy lifting, unfortunately, doesn’t account for the human time and care needed for things like accessibility. The joke for many designers is that it’s incredibly easy to see what kind of site uses something like Bootstrap because no effort was put into customizing it.
While many in web development may have nuanced thoughts on React or Ruby or Javascript, the general consensus around CSS is overwhelmingly that it’s not a valuable language to learn because it doesn’t adhere to their preconceived notions of how a programming language should operate. Many would argue that it is not, in fact, a programming language at all.
But why is CSS so undervalued when it’s a necessary component of most websites and applications? Heydon Pickering writes that it’s partially due to the femininity of CSS:
In my experience, men especially earn kudos for their knowledge of JavaScript or Python, but little from CSS skills. CSS, which makes things look ‘pretty’, is considered feminine (don’t tell that to a peacock).
CSS being a feminine language isn’t a bad thing. Quite the contrary, I’d argue that all programming is feminine as it was pioneered by women (who were then pushed out by men). And while the web development community is still very much governed by men, a larger portion of the top voices in the front-end space are more feminine-identifying than in other areas. Consequently, these same voices are the ones that are brigaded with hate after daring to disagree with dominant ideas.
There are surely plenty of people of marginalized gender experience in all programming spaces, but they don’t have as much opportunity to surface new ideas. CSS is only allowed some slight breathing room simply because other programmers don’t even consider it to be part of web development. The distinction is even clearer when you consider the differences between front-end and backend salaries. CSS having any validity in the field while maintaining its feminine image is a threat to the notion that programming is a masculine exercise.
So when it comes down to the root of the problem, perhaps it isn’t CSS itself but our unwillingness to examine our sexist ideas of what is worthy in web development.