Live data from Hacker News

Tailwind vs. Semantic CSS

nuejs.org

1–10 of 211 posts

Re: Tailwind vs. Semantic CSS

#2
Author here. I implemented the commercial Tailwind "Spotlight" template with Semantic CSS and compared the differences in weight, amount of HTML and CSS, rendering speed, and best practices. I was surprised to find _that_ much overhead in Tailwind. Curious to hear your thoughts.

Re: Tailwind vs. Semantic CSS

#3
I find Tailwind really good for prototyping designs and iterating quickly, and as the design becomes more crystallised then I moved to semantic css and start to clean up the complexity. Once I've figure out that patterns and components required...

Re: Tailwind vs. Semantic CSS

#4
post #3

I find Tailwind really good for prototyping designs and iterating quickly, and as the design becomes more crystallised then I moved to semantic css and start to clean up the complexity. Once I've figure out that patterns and components required...

Makes perfect sense. Prototypes are all about doing something very fast and all hacks allowed. Cleanup later.

Re: Tailwind vs. Semantic CSS

#5
This is one of the first Tailwind vs * articles that isn't bad. It makes a good case in the analysis.

For a lot of applications (like a blog), what the author calls "semantic CSS" is the right thing to do. But there comes a point at which it is no longer feasible. We have a long history of SMACSS, object oriented CSS, BEM, CSS Modules, scoped CSS, and now Tailwind to make it work.

> Because mastering CSS requires practice. It takes several failed attempts before you get it.

Explaining the popularity of something by simply proclaiming "git gud" isn't a very strong point. For newer CSS devs, it does take away the woes of clashing naming and a badly structured cascade. The rest remains and the results remain shite. Similarly, I haven't seen a pattern where good CSS authors do not like Tailwind.

Re: Tailwind vs. Semantic CSS

#7
I just moved our website from semantic to tailwind after I didn’t understand the semantic bits anymore.

Main problem was: the semantic css was elegant, but understanding it again after half a year of not editing the page took super long.

Tailwind is clear. The code looks uglier but I instantly know what’s going on. No hidden things. And no fear in editing a piece of html that it will break sth else.

Huge upside.

Re: Tailwind vs. Semantic CSS

#10
For Tailwind all I ever do is copy big blobs of tailwind "styling" text (classnames) into my components from someone else's "tailwind components." Tailwind themselves even offer a component library.

I always thought semantic css was easier and made more sense, and when we were using Style Components we could still go ahead and have the styling right there in the javascript code if we wanted, best of both worlds, really.

But right now the whole industry loves tailwind so I use tailwind. So I use react, er, nextjs. So I use webpack. So I use yarn, or wait we're back on npm now right?

Post reply on HN