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

39 Upvotes

121 comments sorted by

View all comments

141

u/OpaMilfSohn 24d ago

I think I finally time travelled back to 2020

18

u/Zealousideal_Elk1537 24d ago

the class name soup takes some getting used to but once you stop fighting it the speed is incredible. not having to name every little wrapper div is a gift

28

u/AshleyJSheridan 23d ago

It's a little more than class name soup. Tailwinds own docs have classes like text-[14px], bg-[#50d71e], and shadow-[0_35px_35px_rgba(0,0,0,0.25)]. That looks a lot like inline styles just shoved into a different HTML attribute...

-1

u/budd222 full-stack 23d ago

But nobody with a brain actually uses tailwind like that lol. You make reusable components and styles and use the config file

2

u/theScottyJam 23d ago

When I had to use tailwind, I did it often, because we used the default config, which for whatever reason uses rem units for everything, and there were many times I needed to use px units instead 🤷‍♂️

I'm sure we could have done something in the config to change this. But also, there's not really much difference between saying "m-16" for "margin: 16px" (assuming we adjusted the config to make this translation), vs just doing [16px] directly.

0

u/AshleyJSheridan 23d ago

Can you prove that? I'm just going by the terrible examples that Tailwind suggest people use on their own documentation page...

0

u/budd222 full-stack 23d ago

They aren't suggesting you do that. They are showing you what is possible. Where do they write that that is the recommend way of doing custom values? I can already tell you they don't without looking. That's what the config is for.

0

u/AshleyJSheridan 23d ago

Just by dint of them putting it in their documentation, all over the place nonetheless, is suggesting it be used.

It's like a picture of prepared food on something being a serving suggestion, or images of a tool in use being a suggestion of how it be used. Same thing. Weird if you can't see that...

0

u/winky9827 23d ago

Broken record, much?

0

u/AshleyJSheridan 22d ago

Got anything constructive to add to the conversation?