Live data from Hacker News

Why Tailwind CSS Won

matt-rickard.com

191–200 of 559 posts

Re: Why Tailwind CSS Won

#191
post #34

Earlier quoted context omitted.

> So if you wish to change your design, you'll have to update multiple templates instead of one CSS rule. Changing the CSS to apply site-wide changes sounds great in theory but after working in front-end since IE6, this almost never happens in practice. You're never certain how the styles cascade and indirectly affect things so you're afraid of changing the core CSS. Styles isolated to components is a much more scala…

I do use tailwind and I find it terribly convenient for some things, but this argument still seems to mostly stem from too many people doing css who are not great at designing css and are doing things they really should not. How will I ever keep track of where I used px-6 and where md:px-4 in my templates and why, without semantic classes? Of course I can then build more solutions around that. Or I can accept that go…

> How will I ever keep track of where I used px-6 and where md:px-4 in my templates and why, without semantic classes?

How will you track that in `.hero-text__sticky-container--primary` vs `.text-with-image__card-primary`?

Re: Why Tailwind CSS Won

#192
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…

Having a prebuilt consistent design system that you don’t have to build out for each project, arguing over defaults among the team is a lifesaver.

But you don't need Tailwind for that. A "designsystem.css" file with custom properties would do the trick. Without any added third party tech.

Re: Why Tailwind CSS Won

#193

NGL tailwind is really nice to build new things and is absolutely amazing to create MVPs and small projects ... but once you got to the point where you open a file and see 20+ classnames stacked in every div, which makes them unreadable, its just a mess. Love-hate relationships with this tool, but the idea is very good and this article mentions biggest selling points - its easy and very fast to use.

I feel like people often forget the alternative, which is opening a component and have to read 200 lines of css (possibly spread out over several files)

Re: Why Tailwind CSS Won

#194
post #117

For getting designs up and running quickly, it really is great. 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. With lots of UI being components now, it doesn't really matter that it is verbose - I actually find that helpful. And even if you want to have a class that you use all over the place, j…

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

Re: Why Tailwind CSS Won

#195
post #165

Earlier quoted context omitted.

i think that’s what people’s argument FOR tailwind is: CSS can easily be a footgun, unless everyone on the team uses a sane DOM structure, CSS variables and well thought out CSS selectors. i’ve yet to witness a project without “!important” scattered throughout the codebase.

That's sad to hear. Good CSS with an intuitive DOM structure is simple to achieve yet so powerful. Hate to see devs give up that power.

Complex solutions are much, much easier than simple solutions.

Re: Why Tailwind CSS Won

#196
post #157

Earlier quoted context omitted.

Except for the whole "Cascading" part. I think I understand tailwind, but like the parent poster I'm really not a fan, because while CSS can be a footgun, it can also be quite clean when you use a sane DOM structure, CSS variables, and well thought out CSS selectors.

> quite clean when you use a sane DOM structure, CSS variables, and well thought out CSS selectors. I've yet to see a single project that doesn't fail on all three.

I'm sadly not surprised to hear that, same for another poster who had the displeasure of working with a codebase with !important sprinkled everywhere.

Truth is I've been spoiled on that front because I had the luck to work for many year in a company where the CTO was a very talented dude who lived and breathed HTML/CSS since the mid-2000's, and who was quite thoughtful about that kind of stuff, so I had a first-hand experience of a good codebase, mostly by avoiding external dependencies, using the standard browser behavior, and frequently consulting the MDN.

This is why it's a bit disheartening to see so many front-end framework working against the plateform, even even marketing against it, while CSS and browser tooling his so much more enjoyable and powerful than before.

Re: Why Tailwind CSS Won

#197

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. Tailwind maps onto CSS in a very straightforward way. I think you'd have to go out of your way to "learn Tailwind" without also improving your knowledge of CSS.

Except for the whole "Cascading" part. I think I understand tailwind, but like the parent poster I'm really not a fan, because while CSS can be a footgun, it can also be quite clean when you use a sane DOM structure, CSS variables, and well thought out CSS selectors.

[deleted]

Re: Why Tailwind CSS Won

#198
post #156
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_,…

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

Care to show one simple example where tailwind's amazing docs cover something MDN or css tricks and others do not?

Re: Why Tailwind CSS Won

#199

Earlier quoted context omitted.

>I think Tailwind is more accessible to many[*] less experienced or CSS-oriented developers. Umm... How? You have to know CSS and be quite proficient to understand how to map it to Tailwind. I don't understand this claim at all.

This is called a leaky abstraction. I believe I'm convinced that if an abstraction is leaky then it's garbage. For instance, if I really needed to know say, jvm assembler to code Java then Java would be garbage as an abstraction layer because it would simply be creating problems where they need not be. Java however is clean, which makes it useful. I don't need to know the next level down. C is clean. JavaScript is. P…

I don't view Tailwind as an "abstraction" in the same way that you might say Java is an abstraction over the JVM. If I'm writing Java then I'm only thinking about how Java works, not about the implementation details of the JVM. But when I write Tailwind I'm still very much thinking about the underlying CSS properties. Tailwind just gives me a much more convenient way to add the CSS styles that I already know, with significant reduction to my mental overhead.

It hadn't occurred to me that people might be learning Tailwind as if it's a replacement for having to learn or understand CSS. If you treat it that way then you're bound to have a bad time, much like people who treat git as a series of commands to be memorised without any understanding of git's underlying data model.

I'll also admit that I've only ever used Tailwind on small-to-medium sized solo projects, so I don't know how it would hold up on a big team. But then the CSS has been an agonising, unmaintainable mess on every big collaborative project I've ever worked on even without Tailwind, so what is there to lose?

Re: Why Tailwind CSS Won

#200
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…

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 resonate with my experience at all.

Post reply on HN