Live data from Hacker News

Why Tailwind CSS Won

matt-rickard.com

261–270 of 559 posts

Re: Why Tailwind CSS Won

#261

Yea Tailwind is so good. Yes you have to enter more class names into your html, but the payoff is you don't need to mess about with CSS at all unless you need something very specific. It also makes it so much easer to progressively update things to a new design, without worrying about 1 change in a CSS file potentially having an effect anywhere.

>It also makes it so much easer to progressively update things to a new design, without worrying about 1 change in a CSS file potentially having an effect anywhere. Don't you just have to worry about making sure your update is propagated to all the right class lists? Seems like trading one medium problem for 30 small ones.

Well for example if you have a style on anchors on a site. If you update the general style (even it its in a class) you have to worry about everywhere that thing is used and whether it will break it. They are all completely coupled.

I mean there are techniques to avoid that like BEM and co, but they rely on you and your colleagues following them, and in my experience are a huge ballache.

Its also sometimes hard to track styling issues down, looking through all of the properties etc. And if you get into SCSS and mixins it slowly gets out of control.

On the flip site with Tailwind, it's all there in front if you and easy to change. If you need to repeat something often, you can just create components / partials with reusable parts.

Re: Why Tailwind CSS Won

#262
I find it frustrating that web development moved away from encouraging developers to use a collection of consistent visual styles and basic components (like Bootstrap offered - and even Bootstrap itself is moving towards being a collection of utility classes).

It's very frustrating to have to make a lot of decisions around standard component styling on each new project.

Re: Why Tailwind CSS Won

#263

Earlier quoted context omitted.

+1. Let's say things how they are: Tailwind is a small catastrophe from an implementation, performance and maintenance point of views. It got few things quite well in being a more modern bootstrap, had a stellar marketing and it's color palettes are really well done and leagues above the default material ones. ...that being said... Tailwind's biggest pro is that it allows people that _don't_ know css that much to sty…

None of this mirrors my experience whatsoever. That’s “how things are” for me. I know CSS very well and Tailwind is probably the largest productivity boost I’ve encountered since, I don’t know, learning vim? It’s way faster than SASS/SCSS which is itself way faster than raw CSS. It also yields far more self-contained and more readily composable components than any other styling mechanism. Your comment doesn’t resonat…

This is where I wish we still have upvote numbers on HN. How many people agree with you vs parent and grandparent comment?

I've been doing web dev since I was a kid in mid 2000's and I think tailwind is phenomenal in enforcing style, portability, speed, etc. I recently started to writing a single .html file proof of concept for something and it was shocking how poor the experience is of `style="..."` is in comparison, or making up classes as you go.

Re: Why Tailwind CSS Won

#264
post #156

Earlier quoted context omitted.

> You're not learning anything valuable by learning Tailwind. 1. You need to know CSS to use Tailwind 2. I learned and understood quite a few of things I rarely use thanks to Tailwind's amazing docs. Docs that are non-existent for CSS 3. I'm reasonably good with CSS, but I could never come up with a consistent and minimal design system that Tailwind offers That said, to things everyone should read to up their CSS gam…

If you know CSS why are you using Tailwind which is esoteric CSS but worse? Just use CSS.

Are there any resources like tailwindui or shadcn ui that are built on plain CSS, that are actually consistent and high quality?

Re: Why Tailwind CSS Won

#265
post #117

Earlier quoted context omitted.

> Being able to think "Hmmm, I want a rounded button, with a border and a blue background" and just typing class="rounded border border-blue-600 bg-blue-500" and it's done. I'm not a frontend developer and don't really know much about these frameworks, but how is this different from just using style="actual css"? This just feels like inline styles reinvented for whatever reason.

It's exactly the same but denser. There's no benefit that Tailwind brings that you can't get from writing your own cleaner CSS files. It's like a cult.

Yes, the only thing it does is makes writing styles slightly faster and stops you having to name every different component

Re: Why Tailwind CSS Won

#266
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_,…

+1. Let's say things how they are: Tailwind is a small catastrophe from an implementation, performance and maintenance point of views. It got few things quite well in being a more modern bootstrap, had a stellar marketing and it's color palettes are really well done and leagues above the default material ones. ...that being said... Tailwind's biggest pro is that it allows people that _don't_ know css that much to sty…

Could you explain the performance problem ? I understand how you could get to the other claims, even if i disagree.

But i sincerely do not understand the performance one. If anything tailwind approach is mostly really good for performance, as rendering utility class directly on the element is still the fastest, by far, technique.

The only slight call here could be shadow dom scoped but that necessitate declarative shadow dom and create a lot of problem for performance until we get a fetch maps equivalent to import maps.

What have I missed?

Re: Why Tailwind CSS Won

#267
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_,…

Cool hot-take but it’s not true. You’re literally learning CSS when you learn tailwind. And no one (good) picks up a tool solely because it’s shiny, they pick it up because they find it has utility, which evidently LOTS of people do.

And if you don’t think it’s reusable then you at least need to bring an argument for why that’s so because the docs, personal anecdote, and the opinion of LOTS of people is completely opposite.

So: - You ARE learning CSS, you’re just putting it where it belongs: on the element it affects - It’s modernity doesn’t matter at all - It’s literally as reusable as raw CSS

I can’t downvote you, but you’re definitely wrong.

Re: Why Tailwind CSS Won

#268
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_,…

Tailwind 1.0 was great. Give me a few utility classes to style borders, fonts, backgrounds, and box shadows. Tailwind has descended into madness as they endlessly increase the scope.

Re: Why Tailwind CSS Won

#269

I never got how is "context switching" such a problem. I mean, can't you have like, two files opened side-by-side in different IDE panels? Is it really that hard to "look jump" from one another? This justifies the amount of overhead added by a library like this? If I can be blunt: I find this "argument" to be lazy as **. Sorry but "context switching" is just a fancy name for "having two files opened at the same time"…

I suppose one of the good things that Tailwind does is it stops you having to name every element and all the different variations. So you don't end up with wrapper, container, container-thin, image-wrapper etc etc.

But you really don't have to do that. Naming components only (as you already are) really is sufficient. And yes, specificity and flexibility can easily be managed/included with CSS, particularly now, with all the new widely supported features/selectors.

These solutions to an old "problem" are lighter, simpler and easier to maintain in the long run.

If you're curious, I'll be pleased to give you more concrete examples!

Re: Why Tailwind CSS Won

#270
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_,…

Me: Taylor Swift’s song are bland, run-of-the-mill pop. Swifties: Pfff *plonk gajillions for the tickets.

In cases like this I get curious and try to understand: why? I do not do CSS enough to arrive at the verdict about Tailwind, but my best understanding aligns pretty well with TFA. That and the fact that people wanted some framework that is popular and can be easily reused for results that look reasonably well. Bootstrap was it for a while, but Tailwind came and looked more modern.

Taylor Swift - still beats me.

Post reply on HN