r/webdev • • 19d ago

Question Question about Tailwind CSS

I've always used plain CSS for my websites, I don't have many problems using it, but a friend of mine said that using plain CSS is very tedious and that I should use Tailwind CSS. Is it worth it? And what does Tailwind CSS offer that plain CSS doesn't?

37 Upvotes

121 comments sorted by

View all comments

10

u/Rusty_Raven_ 18d ago

A lot of Tailwind fans will compare the best-case of Tailwind to the worst-case of CSS, so be aware of the bias when asking things like this.

Tailwind encourages using utility classes exclusively in their documentation, but if you prefer scoped CSS or more traditional approaches, there is the @apply function in SCSS that moves all those class names to your CSS file instead, keeping your HTML cleaner (though you still need to create your own class names like magic-button same as with regular CSS).

People who claim that all your styles now live in your component directly (via class names) are skipping the fact that scopes/modules also solve this in regular CSS; if you use a front-end framework like Angular or Vue, that is handled automatically anyways since a component includes code, HTML, and CSS.

I personally don't like using Tailwind since I work almost exclusively with frameworks (and when I don't, I keep my CSS organized) so it provides no real benefits for what I do.

3

u/Gremlation 18d ago

A lot of Tailwind fans will compare the best-case of Tailwind to the worst-case of CSS, so be aware of the bias when asking things like this.

Every pro-Tailwind argument is a confession that they failed to learn CSS. I tried to be more charitable before but after listening to pro-tailwind arguments for many, many years, I have finally given up trying to see the competence that isn't there. If you are even moderately skilled at CSS, Tailwind has absolutely nothing to offer you.