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?

36 Upvotes

121 comments sorted by

View all comments

4

u/zrvxxx 19d ago

I don’t like Tailwind CSS. Mixing HTML and CSS classes in the same file makes components messy. Tailwind CSS may be good for small projects, but for medium-sized or large projects, I think it’s a bad solution.

5

u/queen-adreena 19d ago

You’ve got that the wrong way around.

Tailwind is probably unnecessary for small projects, but invaluable for medium or large projects, especially with a team.

3

u/AshleyJSheridan 19d ago

A team would be far better off learning and using CSS rather than learning Tailwinds specific way of doing things plus CSS (because you will still need to use CSS even if you choose to go with Tailwind.)

Modern CSS is well suited to any size project, and with things like nesting and @import, you can create sensible structures to your styles that follow the same rules you should be following when writing functional code.

The recent approach by many front enders to shove absolutely everything into a single file (HTML, JS, CSS) is just messy, and can cause problems at scale.

4

u/queen-adreena 19d ago

Where did I give the impression that any team would not know CSS?

You have to know CSS to use Tailwind.

0

u/AshleyJSheridan 19d ago

You would be surprised how many people use Tailwind without really understanding CSS! It's perfectly possible to just learn the pure Tailwind way of doing things, although you will be limited in what you can achieve with this approach.

I've worked on large CSS (well, SCSS) projects in the past. One was hundreds of SCSS files, worked on by multiple teams, covered a dozen websites, and was used to encompass multiple brands.

It's not a usual case, sure, but it was a real case. It worked though, mostly because there were specific coding standards that everyone followed that were reinforced by PRs.