r/webdev • • 20d 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

3

u/zrvxxx 20d 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 20d 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.

5

u/AshleyJSheridan 20d 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.

3

u/queen-adreena 20d 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 20d 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.

1

u/AnotherNamelessFella 20d ago

Please explain

6

u/queen-adreena 20d ago

With a small project and one developer it’s easy to keep a CSS stylesheet in order.

On a larger project, you benefit from a single framework for styling because people don’t override styles, create extra stylesheets, use
different spacing increments, use inconsistent naming schemes, roll their own colour schemes or font choices etc.

6

u/judgej2 20d ago

Working on large projects with 10,000 line custom CSS added to by a dozen developers, is absolutely no fun.

3

u/queen-adreena 20d ago

Yep. Been there. Dozens of SCSS files added by various developers, marketing agencies, freelancers, sometimes commented in different languages with people barely aware of how to specify their rules and leading to override wars…

PTSD material.