Live data from Hacker News

Why Tailwind CSS Won

matt-rickard.com

551–559 of 559 posts

Re: Why Tailwind CSS Won

#551

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.

u left out htmx.org ;)

Re: Why Tailwind CSS Won

#552
post #43

This is a good list. I would also add: * It removes the burden of having to come up with class names, and the mental overhead of deciding whether to create a new class or rely on the C in CSS. When writing plain vanilla CSS there's always a sense of friction and a need for careful planning (often resulting in me procrastinating it). That whole process is eliminated with Tailwind and I can just start styling the eleme…

Surprised to see your comment as the only one mentioning these points. Not having to make up class names (and groups of class names – ”-container”, ”-inner”, anyone?) that are anyway only used once is the greatest liberation I’ve had in my 20+ years of web development.

For styles that are reused a lot I just create small & composable components (which are also defined by the Tailwind classes so they match distances & colors). But there are typically just a handful of these in a project.

Re: Why Tailwind CSS Won

#553

Earlier quoted context omitted.

> That's good, it means in a few years Tailwind will be considered a dead tech. And that’s good because of what, beyond your own personal preference as to your Framework Of Choice?

It is good because Tailwind actively fights the engineering choices behind the web platform, it doesn't understand them, it doesn't build on top of them in synergy and alignment, but it counteracts and nullifies them with religious fervor and zeal. Tailwind projects read like the wall writings of a mad man, who is convinced they've discovered the secret of the Universe. And that secret is compiling absurdly large, GI…

Tailwind may be madness, but it’s manageable and maintainable madness.

The alternative is not sanity, but simply unmaintainable madness.

Re: Why Tailwind CSS Won

#554
I feel most people who hate Tailwind never had to deal with the problems it is trying to solve.

It does things in a brain dead way to protect you from other people’s idea of cleverness.

Also in corporate settings apps and sites don’t follow sensible rules, you think you’re gonna have a few sensible classes for a few different components?

Well marketing decided that they need 50 small variations of just one component, of course it makes no sense to you, but that’s the requirement so shut up and do it.

If you’re not using Tailwind you end up with 50 exceptions and your normal CSS quickly becomes unmaintainable.

Tailwind is the mad solution perfectly suited for a mad world, and only people who hate it are those who don’t have to deal with madness.

Re: Why Tailwind CSS Won

#555
post #297

I love tailwind, and I've been writing CSS professionally since CSS2.1. I have often debated with many developer friends why it has performed so well, and this article really missed some big reasons: 1. It's works extremely well with the current component-focused UI frameworks (react, svelte, etc). Subsequently, the verboseness that is often a complaint isn't an issue at all, but a feature. 2. Does everything out of…

I agree with all of your points. I am kind of shocked that I had to scroll so far down to see point #3 on this thread at all. CSS doesn't give the best toolset in order to do styling and organize styling. The locality of HTML structure and styling makes things far easier to work with. I would also throw in that front end coding feels far more fickle and arbitrary. Tailwind allows me to define a set of rules and then…

CSS cascades all the way from global to element’s style attribute

Re: Why Tailwind CSS Won

#556
I don't dislike Tailwind. I think it is a great tool if used correctly, but the majority of projects I've used it on, other devs eventually tend to overuse the @apply rule and end up just creating lots of custom classes. This literally defeats the entire purpose of Tailwind and I feel like that feature alone is what is most wrong about the library. If you're going to use their classes to write your own, you might as well write vanilla CSS. There's literally no upside to using Tailwind and it's actually a huge hindrance, as you now have to remember the rules of CSS plus all the Tailwind utility classes.

Re: Why Tailwind CSS Won

#557

Earlier quoted context omitted.

Well, I'm building websites and apps. And, as I'm sure you know, milliseconds are important in our craft. You can easily shave or add hundreds of milliseconds with HTML or CSS. And to be honest, I find your general line of inquiry here to be quite agressive and dismissive. I think, respectfully, a little more good faith could further our understanding of each other.

The question about what you're building such that you care about perf characteristics of CSS is an effort to understand you, I am sorry I failed to come across that way. Outside of consumer apps I am struggling to imagine a case where the HTML/CSS perf delta would be more important to capture than faster development time. I suppose part of why that doesn't seem like a good faith question is because you don't believe…

First, sorry for the response delay. I don't know why I didn't see your answer.

As for the case in point, in fact, I think CSS can be as fast if not faster. But that's totally for me to prove. Hehe.

That's why I'm working on a set of simple rules for efficient styling with CSS. A website with documentation, examples and tools is in the works. If you're interested, I can give you a heads up when it's online.

Feedback from Tailwind users is important and would absolutely be welcomed!

PS: thank you for the explanation.

Re: Why Tailwind CSS Won

#558

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.

Nah, if you follow people like Taylor Otwell, the creator of Laravel, he'll show you that PHP is still alive and well, as he buys his Lambo: https://twitter.com/taylorotwell/status/1534178479201259520

Re: Why Tailwind CSS Won

#559
I believe the primary reason that sets TailwindCSS apart is its inclusion of pre-defined margins, paddings, and colors. Starting with these built-in defaults is much simpler than having to consider all these design elements from scratch.
Post reply on HN