To Tailwind or Not
Tailwind is a popular utility first based CSS framework, something that front-end developers can use to make a page look more stunning and/or more consistent. A few interesting takes on tailwind, one of the most popular utility first css frameworks:
- Why Tailwind, a nuanced pro tailwind argument coming from someone who seems to have decided in the css in ja camp before
- Why Tailwind isn’t for me.
I am still not convinced about Tailwind. Heck, I’m even not a major fan of full BEM, although I use it when I am building more complex components with mutiple thightly coupled related parts. The principles behind IT CSS still form the basis of how I prefer to like CSS (note: the author of IT CSS, Harry Robert, is also maintaining a guideline on how to write maintainable CSS).
So why not Tailwind? First of all CSS has powerful features which you can choose to eliminate completely (css-in-js and Tailwind lesser so and i think this even applies to a strict application of BEM to a lesser extent), but also derives you of much power that CSS brings.
Secondly, the more you are not using e.g. the cascade, the more you need to re-implement the same on another level; eg tailwind (and obviously css-in-js) more or less requires you to have some component (think React, Vue, maybe a templating language) system; otherwise you’re repeating a lot of code. For a single project that might work, but in the real world a lot of apps and code bases don’t share the same tech stack, other than the stack provided by browsers, indeed HTML and CSS are always there to rely on.