DEV Community

[Comment from a deleted post]
Collapse
 
andi23rosca profile image
Andi Rosca • Edited

Apart from what other people have said, I want to say that in my opinion it is not CSS's purpose to instill semantic meaning to HTML.
The purpose of CSS is to style stuff, and for me tailwind is a much more painless way to write and to read CSS. I can infer at a glance how something will look like just by reading the classes.

And generally CSS and HTML feel very coupled to me, gone are the days when a website is mostly just data and CSS is just specifying a few things to make the data more tidy. For better or for worse websites have more complex design needs, and you sometimes need to write extra html tags just to make a certain design possible. So to me they are very intertwined and makes sense to keep them in the same "place".

Semantic meaning lost from using utility classes can be gained back either with attributes such as data-chat-notification or when using a component based library like React, Vue etc. through component names.

There is also the @apply directive for when you need to create reusable styles like cards, notifications, sections, etc. So tailwind gives you best of both worlds imo.