top | item 47177358

(no title)

steve_adams_86 | 2 days ago

That's a good question, and I can't seem to think of what the maintainable solution that doesn't need as many tutorials would be.

CSS on its own is great, in a way, but also kind of awful if you don't fully grasp it. It used to be much worse, it got way better, but it still offers plenty of rough edges and foot guns.

Tailwind smooths some things over, but there are real tradeoffs. I prefer to use it quite often, but I don't have any illusions about it being better than plain CSS in any way other than it saving some time and brain cycles here and there. I don't think there's some perfect alternative hiding in obscurity, though. Tailwind is arguably popular because it often makes life easier. Not without drawbacks, but... I'd say it makes working on teams easier and there are a lot of community-generated themes, components, etc that make building things much faster and easier.

Hand rolled CSS is better if you're good at writing it, but in my experience, most people simply aren't.

Some people will disagree with me and say Tailwind is garbage, and that's fine, but they probably know CSS reasonably well. That makes a huge difference. Of the ~18M downloads per week, I would guess the vast majority of people using it have mostly copied and pasted stuff into their projects (or these days, let an LLM do it for them).

discuss

order

ido|2 days ago

    “I don't have any illusions about it being better than plain CSS in any way other than it saving some time and brain cycles here and there.”
Not contradicting you- just wanted to highlight this is a major benefit: when I have to do styling, saving me effort, time and “brain cycles” and just getting it out of the way so I can focus on “business logic” instead is almost the most important aspect (as long as the result isn’t terrible).

Maybe there are use cases where performance of web-styling is critical, but it certainly isn’t in mine.

steve_adams_86|2 days ago

Totally, that's a good point. The trade-off makes sense for heaps of people's needs. It's a big part of why it's so successful in my opinion.

Plain old CSS will let you create optimal styling solutions for HTML documents, which is nice, but... How often is that actually necessary or even tangible for any end-user experience?

Anyone who needs better solutions is likely working in some scenario, on some team, where the problem of slow style recalculations or excessive payload sizes could be identified and resolved easily enough anyway. It's a trade-off, but the escape hatch is a few steps away.

DANmode|2 days ago

Now I want to ask one of these robots to implement something in “hand rolled” CSS and see what it does.