top | item 46615410

(no title)

TheCapeGreek | 1 month ago

errr, this sounds backwards, no?

Tailwind is better when you actually try to put the utility classes in your own components, sure. But the reason Tailwind got popular over Bootstrap in the last 5 years is because people got sick of hand-tweaking Bootstrap components and fighting it to do so when they can only run basic CSS sticks together.

(I'm aware modern CSS is really good even on its own, and most of us under-utilise it. But I think it has become clear that most people just don't want to learn it)

discuss

order

al_borland|1 month ago

When I see people use Tailwind they are adding a dozen classes to something to do what a single class in Bootstrap does.

On a component that only needs to be defined once, no big deal. But if you need to add this collection of classes on 20 elements, adding a bunch of Tailwind sounds messy and error prone.

Tweaking Bootstrap here and there sounds a lot better than using 100% tweaks. Tailwind seems like a tweak library. Add 10 tweaks to each element and you start to have a design on your hands. I often question why it exists vs raw CSS.

TheCapeGreek|1 month ago

Which leads us to: Tailwind supports making your own components, and encourages it. But devs, either pressed for time or lazy, or by always getting a slightly too unique design from their design team, don't do it.

At the same time, not everything is a reusable component, so yeah, shove a couple dozen tailwind classes there and call it a day. Still better and less messy than hand-wringing custom selectors or custom element styling - else Bootstrap would be better for tweaking than "100% tweaks".

It's the usual OOP debate on inheritance vs composition.

Tailwind is composition, and it's clearly the favoured approach.