To Tailwind or Not

An article, posted about one month ago filed in tailwind, css, frameworks & bem.

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:

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.

Op de hoogte blijven?

Maandelijks maak ik een selectie artikelen en zorg ik voor wat extra context bij de meer technische stukken. Schrijf je hieronder in:

Mailfrequentie = 1x per maand. Je privacy wordt serieus genomen: de mailinglijst bestaat alleen op onze servers.