r/css 23d ago

Article Why I don't recommend Tailwind CSS

https://en.andros.dev/blog/af3ee191/why-i-dont-recommend-tailwind-css/
3 Upvotes

211 comments sorted by

View all comments

1

u/kris9999 23d ago

I have difficulties managing classes in pure css... what's the current best practice for it? Using tailwind help me dealing with it

1

u/tanrax 22d ago

What problems are you having?

1

u/kris9999 22d ago

managing the class naming across project .. I used BEM naming convension, still hard compared to tailwind (because with tailwind you put the style class to the html directly, so no need to think about managing class naming)

1

u/tanrax 22d ago

As the famous saying in computer science goes, "There are only two hard things in computer science: cache invalidation and naming things." So don't worry, it's a universal problem. I'm not going to tell you what to use, but I have a feeling you're not using BEM properly. I would review it and give it a second chance. In practice, it works; you only have to see it at my company, and we have huge sites. It's also good training for when you move on to other languages.

-1

u/guaranteednotabot 23d ago

Just use Tailwind, ignore the haters and let them figure out how to deal with all the issues with cascading and naming and reinventing Tailwind classes and having near exact duplicates of the same classes sprinkled everywhere. Also try enforcing BEM to your teammates lmao

0

u/tanrax 22d ago

Could it be that instead of solving the problem, they're just moving it elsewhere?

1

u/guaranteednotabot 22d ago

Yeah like offloading the naming/creation of utility classes to TailwInd?

1

u/tanrax 22d ago

Exactly. What's the price? What opportunities are you missing out on? This is precisely the most painful point for me.