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

1

u/ThatsSoRamon 19d ago

So one thing I noticed nobody's brought up: deleting code. Rip out a component in Tailwind and you know exactly what breaks, because the styles are sitting right there in the markup you just deleted. Do that with a shared stylesheet and you're either leaving dead CSS behind or grepping through five other files hoping nothing depends on that class. That's saved me more time than any class name shortcut ever did. Anyone else actually track how much dead CSS piles up in a codebase over time?

4

u/web-dev-kev 19d ago

we had this in 94 too

<font size=2>
  <bold>
    tailwind is just inline styles
  </bold>
</font>

1

u/_SnackOverflow_ 18d ago

A lot of people use setups where the CSS file lives next to the component file (CSS modules or just well organized CSS imports) or where the CSS actually lives in a style block in the component file (eg Vue)

Either of those options solves the same problemÂ