3 ms·
> Tailwind looks ugly, but there are no hidden abstractions or structures in the code Verily, Tailwind is the assembly language of CSS. No structure, no semant
by nine_k 17d ago
> Tailwind looks ugly, but there are no hidden abstractions or structures in the code
Verily, Tailwind is the assembly language of CSS. No structure, no semantics, no abstractions, only twiddling specific bits of visual representation.
To turn to it is to admit that your product lacks the structure and the design vision that allow to use some abstraction ("semantic classes"), and that all you can usually do is to patch some areas of it, disconnected from the rest, and unable to touch the rest (lest it goes down in flames). Assembly is definitely suitable for patching.
This is often the endgame of old large products that changed hands and directions many times, without much care.
- vehemenz 17d agoThis seems like a radical, unsupported conclusion to draw from a single frontend architecture decision. Maybe there's an overwhelmingly positive case to be made for high-abstraction CSS with hidden structures. Outside those few select cases, we've known the tradeoffs for 25 years, and the added complexity is rarely worth it.
- nine_k 17d agoA right abstraction adds simplicity. I enjoyed working with a semantically styled frontend project as recently as 2024. It also used a React component library, which helped insulate per-component styles, while sharing the common parts.
- nextaccountic 16d ago> no abstractions, It has. It's called @apply. It works fine. The Tailwind author is wrong about recommending people to avoid @apply. The Tailwind community at large is mostly wrong about it too (except people that like and use @apply). I don't know how anti-abstraction came to become popular, but if you like semantic classes you can still use Tailwind. (why use Tailwind? It has some nice defaults and a coherent design language) https://css-tricks.com/tailwinds-apply-feature-is-better-than-it-sounds/ https://css-tricks.com/tailwinds-apply-feature-is-better-tha... The anti-abstraction crowd, that push for repeating the same boilerplate over and over again, honestly grinds my gears. Even assembly doesn't make writing boilerplate its ideology (it has macros, and actual subroutines)