top | item 37986993

(no title)

thinkxl | 2 years ago

It's an unfair comparison because Tailwind as a library is composed of tooling, documentation, design patterns, good practices and obviously CSS. The same is for other libraries, e.g., Bootstrap.

I agree that using Tailwind--without extra effort--will end up with "meaningless" (not really) classes in the HTML.

But semantics should be prioritized in HTML rather than CSS or class names. What's the benefit of having semantic classes when your HTML is inaccessible and unsemantic? e.g., using `a` instead of `button`, `img` with unsemantic alternative text.

discuss

order

tipiirai|2 years ago

Accessibility is important. No question about it. But this article is not about the whole UI/UX stack. It focuses on benefits on what semantic CSS offers. aka "naming things" vs "not naming things".

thinkxl|2 years ago

From this

> But this article is not about the whole UI/UX stack.

And this

> It focuses on benefits on what semantic CSS offers. aka "naming things" vs "not naming things".

That's the problem, you are focusing on giving semantic names to classes while giving an inferior UX on your example. If the inferior UX saves me a few KBs on size and a few milliseconds in load time, I'd still prefer good UX.

A fair comparison should be good UX with semantic CSS.