News for hackers. Stuff that matters.
Re:Tailwind CSS v3.3 by ghc on Wednesday March 29, 2023 @08:29AM (#35356250)
Nobody's going to engage with those arguments because they miss the point. Tailwind is CSS, ergo it wouldn't work if what you're saying wasn't possible.

Writing good CSS for interfaces in a web application of significant complexity is expensive and time consuming. Tailwind solves that problem very well. Other CSS frameworks have done so as well over the years -- I wouldn't call Tailwind unique -- but the micro-class approach it takes is perfect for modern interface templating systems like Vue, where you tend to abstract at the component level instead of at the style level.

Re:Tailwind CSS v3.3 by emmacharp on Wednesday March 29, 2023 @08:41AM (#35356386)
How is that better from enclosing CSS in a component file with a class as first selector?

I see that bad developers could make mistakes, but besides that, which is kind of easy to lint, the only advantage I see is the need to maintain only one file instead of two.

What do I get wrong?

Re:Tailwind CSS v3.3 by adamhp on Wednesday March 29, 2023 @09:06AM (#35356677)
It is quite fast to make changes and see immediate visual results. There's basically one less step to making css changes. What you call "lazy" in your OP, the rest of us comfortably call "useful".

If I need to add some padding, I slap on some p-4, my browser refreshes, and I see the result.

I don't really get the spiritual debate. It's a tool, use it or don't.

Re:Tailwind CSS v3.3 by emmacharp on Wednesday March 29, 2023 @09:24AM (#35356931)
You can do the exact same thing with CSS. It does not matter if the code is added to HTML or CSS.

And for me, at least, this is not a spiritual debate. On the contrary, this is a very practical debate. The popularity of the tool and the signal it conveys absolutely has consequences on all of the development community. Whether I like Tailwind or not, I have to maintain projects that were done with it, I get asked about it, etc.

I think that saying "it's just a tool" is kind of short-sighted. It's a paradigm. And as such, its practical implications are far reaching.

Re:Tailwind CSS v3.3 by imbnwa on Wednesday March 29, 2023 @09:57AM (#35357343)
>The popularity of the tool and the signal it conveys absolutely has consequences on all of the development community

I'm stuck on some rather legacy (read: fashionable 5 years ago) stack either way, but its interesting that I'm conducting an interview later today where the applicant ensured to exhibit a Next/Tailwind/TS app that runs on Vercel.

I can't blame them either, I remember interviewing two summers ago and being asked if I had experience with Next straight out the gate despite it not being mentioned anywhere in the job description.

Re:Tailwind CSS v3.3 by graboidhunter on Wednesday March 29, 2023 @09:51AM (#35357274)
It is a philosophical debate about the relationship between HTML and CSS.

The "traditional" approach to authoring HTML and CSS is predicated upon on idea of separating concerns. The idea is that your HTML should not depend on your CSS, and your CSS should not depend on your HTML.

The "utility-first" approach reacts by claiming this is wrong. It goes on to reason that either HTML depends on CSS or CSS depends on HTML, but neither are independent. This is what Adam Wathan calls "dependency direction."[0]

0. https://adamwathan.me/css-utility-classes-and-separation-of-...

Re:Tailwind CSS v3.3 by emmacharp on Wednesday March 29, 2023 @10:13AM (#35357572)
Again, it's not only philosophical nor spiritual. It has numerous practical implications for any dev engaged in Web work.
Re:Tailwind CSS v3.3 by graboidhunter on Wednesday March 29, 2023 @11:06AM (#35358337)
The debate is philosophical. The debate has practical implications. These two ideas are not mutually exclusive.
Re:Tailwind CSS v3.3 by emmacharp on Wednesday March 29, 2023 @04:02PM (#35362601)
I should have said: "it's more than a philosophical debate".
Re:Tailwind CSS v3.3 by ghc on Wednesday March 29, 2023 @10:24AM (#35357731)
Tailwind solves a communication problem, not a technical problem. It's extremely common on large teams to have people come and go. The more complex your CSS is, the more time it takes to train someone new. Think of it as a standard library for CSS.
Re:Tailwind CSS v3.3 by emmacharp on Wednesday March 29, 2023 @11:02AM (#35358286)
But we can have a native, standard library for CSS. No need for Tailwind if this is the problem to solve.
Re:Tailwind CSS v3.3 by ghc on Wednesday March 29, 2023 @02:36PM (#35361338)
A standard library without widespread adoption is just a library. Adoption is the hard part.
Re:Tailwind CSS v3.3 by emmacharp on Wednesday March 29, 2023 @04:03PM (#35362621)
You can make it mirror Tailwind's nomenclature if you want it.