Hacker News new | ask | show | jobs
by hmcq6 878 days ago
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.

1 comments

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.