Hacker News new | ask | show | jobs
by globular-toast 878 days ago
Tailwind is an abomination.

Of course it's easier to use. Pressing the bold button in MS Word is easier than setting up styles etc, but one makes it easy to create an impossible to maintain mess that could have been made by a primary schooler, and one makes it possible to create a consistent style that looks professional.

The only reason I think Tailwind is becoming popular now is it's exposing a bunch of things like rounded corners and drop shadows that are still cool but unlike Bootstrap you can slightly tweak your rounded corners easily. It'll still lead to everything looking the same, then people will probably ditch it and go back to really minimalist styles like HN to look cool again.

3 comments

Tailwind is opinionated, meaning it encourages a structure that helps devs avoid common potholes.

You may not like its choices but saying it creates a mess has been the opposite of my experience.

One of the main pitfalls I have noticed no longer running into is that the structure tailwind encourages prevents issues with CSS selector specificity. As a result I’ve definitely noticed fewer instances of ‘!important’ in code review.

You could instead learn what patterns should be avoided and why. This means you can make meaningful judgements on whether it's ok to use those tools on occasion (like goto in C).

Tailwind is a mess by default. People didn't invent separation of style and content for no reason. They did it because what they were doing before was as mess. This is that same mess.

"You could instead learn what patterns should be avoided and why."

In an ideal world yes. But in the real world nobody knows everything, we have deadlines, and no company actually sets aside time to onboard you on CSS.

But also, it takes a while to establish a pattern. Using tailwind wasn't my decision and it took a while of working with it before I noticed that I was rejecting fewer PR's for `!important`. It took a little longer to establish the cause was tailwind and the reasoning behind why.

But also, how are people supposed to learn with all this noise? Most of the critique of tailwind in this thread is incredibly surface level.

I really dislike tailwind too, but I think there is lot of value for lots of people in the idea of having all the styles contained with the template and thus making copy-pasting of code easier without having to deal with the pesky 'Cascade' part of CSS.

Personnaly, I love the cascading part when used correctly, along with the 'latest' evolution of CSS such as 'calc()', variables, on top of using CSS selectors.

Inline CSS already lets you have the styles in the template.
> The only reason I think Tailwind is becoming popular now

I think it just matches the way some people think. Nothing more than that.

It's one of many approaches that works well for some people and not for others.