News for hackers. Stuff that matters.
Re:Why Tailwind CSS Won by LapsangGuzzler on Wednesday August 16, 2023 @09:55AM (#37147038)
I stayed away from Tailwind for the exact reasons you described until i joined a company that used it heavily and now I really see the value of it. I’m weary of new tools and cargo cult but Tailwind won me over.

It really shines for apps that are changing rapidly and are at risk for generating dead CSS, which has been a problem in pretty much every commercial codebase I’ve ever worked on. Tailwind adds a simple, straightforward, one-way-to-do-things approach that creates a much more maintainable experience in HTML templates that results in zero dead CSS code.

It’s absolutely not for people that need fine-tuned CSS APIs like animations, etc. But for building a product rapidly, it’s become a go-to for me.

Re:Why Tailwind CSS Won by LocalPCGuy on Wednesday August 16, 2023 @10:36AM (#37147718)
I get the challenge of dead CSS, I think there are strategies for managing that in complex apps without "ditching" CSS. And my understanding of Tailwinds is that it starts to break down for larger/complex apps also (but I've only used it on smaller things personally so that's just based on things I've read).

I never try to be dogmatic about new things - so I'd try it again. I just haven't seen the benefits yet myself and so default to the cons I expressed earlier.

Re:Why Tailwind CSS Won by LapsangGuzzler on Wednesday August 16, 2023 @10:55AM (#37148051)
> there are other strategies

True, but those usually involve adding some sort of linter to ensure that your style sheets are clean, which is an additional build step, which is an opportunity for a build to fail. Tailwind gives me this out of the box and doesn’t require any sort of manual lifting because it does this automatically.

> Tailwind starts to break down for larger/complex apps also

This hasn’t been the case for us, I’m on a team of about 50 devs contributing to a 2 year old monolith and Tailwind hasn’t once gotten in my way.

Re:Why Tailwind CSS Won by LocalPCGuy on Wednesday August 16, 2023 @01:20PM (#37150344)
Thanks for the data point re: larger apps. Like I said, haven't had that experience with Tailwinds specifically so I can only go by the various things I read about those who have. I'm sure it's like any other tool - it can be used or abused.
Re:Why Tailwind CSS Won by yencabulator on Wednesday August 16, 2023 @11:15AM (#37148384)
> at risk for generating dead CSS

For what it's worth, in SvelteKit CSS is per-component and you get warnings for unused CSS selectors.