Live data from Hacker News

Why Tailwind CSS Won

matt-rickard.com

441–450 of 559 posts

Re: Why Tailwind CSS Won

#441
post #140

Gray beard's 5c: Tailwind is a farce and a catastrophe. It's as modern as the style parameter is, and it's as reusable as a moving a dirt pile from one corner to the next. You're not learning anything valuable by learning Tailwind. Learn CSS, that will stick with you for the next 20 years. It amuses me when a library is implemented 'with tailwind', which means it's totally useless to the people _not using tailwind_,…

In five years, there will be another framework that replaces this one, and still most people won't need to write CSS.

Re: Why Tailwind CSS Won

#442

Earlier quoted context omitted.

You're not learning anything valuable by learning Tailwind. Learn CSS, that will stick with you for the next 20 years. You can't use Tailwind without knowing (quite a lot of) CSS. There's nothing in Tailwind that makes CSS easier or that obfuscates the technical understanding you need to make things with CSS. If you want to make a horizontal flexbox layout knowing "display: flex; flex-direction: row; flex-wrap: wrap;…

Except when using Tailwind, you're learning Tailwind nomenclature and syntax and approach - which really isn't modern CSS, at all. Today's CSS - if anyone would take the time to actually learn it as they do JavaScript - doesn't need something like Tailwind to make it powerful, scalable and manageable. I write plain CSS today, which is then scoped to components or bundles of interactivity, and all of those point to ma…

I write plain CSS today, which is then scoped to components or bundles of interactivity, and all of those point to major, top-level control sheets that help determine the mode (light/dark/high contrast) and the theme. We tweak small changes up high to effect large platform changes throughout, saving time, energy and headache of the hunt/peck exercise.

I do similar things with Tailwind, making global changes by updating a config file instead of a base CSS file. It's not hard and it works well. To be honest, it's not something that really comes up very often. I don't see this as a particular advantage of Tailwind or CSS. I care much more about the day-to-day dev experience.

Prior to using Tailwind I spent about 20 years trying every system you can imagine to manage styles across large websites/apps. I still use the skills I learned when Tailwind doesn't cover an edge case I need. It's fine. Before that I spent about 5 years doing the same with tables and font tags (Adobe Pagemill was awesome). Of all the systems I've used, Tailwind is the easiest to keep neat and tidy. Maybe I'm a terrible dev and other people find CSS really easy to manage, but having spent two decades talking about it with other frontend engineers I'm reasonably certain that's not a common skill. Tailwind makes life much easier for most people.

Re: Why Tailwind CSS Won

#443

Earlier quoted context omitted.

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 compo…

++ for mentioning web components and the shadow DOM. They are the end of the road for prepackaged frameworks, IMHO.

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

#444

Earlier quoted context omitted.

You don't need to give every div and container a unique ID. Why ever do that? Many things never need their own ID. Are tons of divs and containers needed? When I find myself needing containers I usually find out I've not been thinking about arrangement very well.

If the options are "never encounter a problem" versus "when I encounter a problem I realize that it's actually a superficial symptom of a more substantial problem someone made hours/days/weeks/months ago," I will take the former 100% of the time.

Assigning an ID to every single element means never encountering a problem? I imagine that results in everything being a special case, much of the point of CSS missed, and in this special case Tailwind might even work as it's consistent with everything being a mess.

Re: Why Tailwind CSS Won

#445

Earlier quoted context omitted.

Assuming you work with a build system that can generate source maps...

This is easy and should not be a problem. It also is the kind of help/solution that should be implemented first, before any librairies or frameworks are added.

"should" is often the enemy of "speed" even when it's the _correct_ way to build a system. I think most of us here have experienced that at businesses of varying sizes.

Re: Why Tailwind CSS Won

#446

I work every day with web projects, and the notion "Tailwind won" in any capacity sounds like a thunder from a clear sky. If we see more articles to that effect and this is not an outlier, it means the Tailwind cult is in its "red dwarf" stage, where the community becomes smaller, but denser and more convinced than ever that the entire world is a copy of their small bubble. That's good, it means in a few years Tailwi…

If you listen to Twitter: nobody uses PHP anymore, everyone's high on Tailwind, React is dying and Svelte is soon-to-be king.

Well obviously you should know better than to listen to what people say on Twitter, since it's dead.

Re: Why Tailwind CSS Won

#448

Earlier quoted context omitted.

This has been my general opinion on Tailwinds all along. When it first came out I thought it was kinda harmless, it's basically like some of the utility classes that always inevitably get made/used and that's great. But this idea that all styling should be done in HTML is antithetical to the whole reason CSS came to be in the first place, IMO. I can see why people like it to an extent, but I just don't really get the…

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, stra…

> 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.

Re: Why Tailwind CSS Won

#449
post #134

Earlier quoted context omitted.

If you know the convention it's quite easy. I don't know Tailwind but with Bootstrap it would be m = margin, y = y axis, b = bottom, sm/lg = screen size, 4/5/6 = size

4/5/6 what? Bananas? And what exactly is “screen size”? Does it refer to physical size, or number of pixels? Does it count width, height, or both?

[deleted]

Re: Why Tailwind CSS Won

#450

Earlier quoted context omitted.

It's worse than that. Tailwind imposes a ton of context switching by putting the style inline with you data. It's just that this switching happens when working on the data, instead of on the style.

> It's just that this switching happens when working on the data, instead of on the style. You mean you have to think about how the data you're styling looks while actually looking at the data you're styling? Sounds terrible. /s

You have to think about how the data looks like while you are editing the data. But I do think my comment was clear.
Post reply on HN