How Tailwind helped me better understand CSS

Michael Messerli on November 18, 2019

This is my first post on Dev.to, and really anywhere, in an attempt to be more self-critical and share my experiences I've been building websites ... [Read Full]
markdown guide

So I know there's a lot of people that find all of this styling in the HTML a turn off and say you may as well be using inline style

👋 That's me in a nutshell. I think that things like Tailwind are actively harmful.

I'm pleased you managed to use it to learn something though.


I can totally understand this point of view. IMO, it's great and quick for bootstrapping, but I image in the long run you'd really want to create reusable components like I mentioned.

What exactly do you think it actively harmful?


It's teaching people that the whole concept of "separation of style and content" is irrelevant.

Imagine if your site had a christmassy theme (a not-uncommon client request). How many places do you have to change templates? If you're using a CMS with something like Gutenberg (also something I have strong objections to) then you're stuck with the HTML in the database. You can't do a search and replace in your templates to fix it.

Speaking of searching and replacing - if you want to replace all instances of "blue" with "red" that are on a person's username, in semantic CSS you'd edit one file and change "blue" to "red". In Tailwind, you'd edit any number of files, that you can't easily search for because "blue" is a very common word, and so is "user".

Absolutely. I don't think it should be used like this either.

code of conduct - report abuse