News for hackers. Stuff that matters.
Re:Why Tailwind CSS Won by jongjong on Wednesday August 16, 2023 @07:38AM (#37145532)
Agree 100%. CSS is so good nowadays. Tailwind is yet another over-engineered hack of a framework foisted upon us. A solution looking for a problem.

You don't need it. Do devs these days even know about Web Components and shadow DOM? You can define per-component styles now with CSS selectors to target any child elements within the component and you can do it in such a way that the styles are contained within the component... And for cases where you want to inherit styles, you can just use the regular light DOM.

All these frameworks are re-inventing the wheel and making it worse. Or it's like attaching a horse to pull a perfectly good car.

Re:Why Tailwind CSS Won by dtagames on Wednesday August 16, 2023 @08:14AM (#37145852)
++ for mentioning web components and the shadow DOM. They are the end of the road for prepackaged frameworks, IMHO.
Re:Why Tailwind CSS Won by ng12 on Wednesday August 16, 2023 @11:06AM (#37148238)
Web components are a decade old, what do you think has changed or will change to make them more popular than frameworks?

I think unless there are massive improvements to the developer experience the best hope for web components is as an implementation detail for a higher-level framework.

Re:Why Tailwind CSS Won by dtagames on Wednesday August 16, 2023 @12:54PM (#37149923)
Good question. I probably should have qualified my statement. I can think of a lot of cases where an organization is better off building custom components on something like Lit (close to bare metal), rather than trying to shoehorn Angular or React into what you want. On the other hand, having a lot of predefined pieces and methods is also helpful to some people.

For me, I've been bitten and I would pick web components over a fixed framework for a clean sheet project. I don't think many devs have really tried to work with web components or they might get the bug, too!

PS: I wrote an intro series on this topic on Medium[0].

[0] https://medium.com/gitconnected/getting-started-with-web-com...

Re:Why Tailwind CSS Won by jongjong on Wednesday August 16, 2023 @07:07PM (#37155075)
I also think not many devs have tried to work with web components and that likely explains its current lack of popularity. Many mid-level devs are not even aware of its existence or they mistakenly think of it as some low-level tech meant only for framework engineers or deep system engineering type people.

That said, having taught some introductory web development courses in the past few years, I sense that new devs entering the industry are interested in simpler solutions and not particularly keen to get into React. The React learning curve is much steeper than it once was now that it has so meany features and the benefits are not so clear to someone who is starting from scratch.

Re:Why Tailwind CSS Won by ng12 on Wednesday August 16, 2023 @09:37AM (#37146803)
You're trying to sell me Web Components as a solution to over-engineered hacks?