logoalt Hacker News

9devtoday at 4:42 PM2 repliesview on HN

> This is what CSS classes were made for.

That brings with it the problem of naming a thousand things in a consistent way that everyone on your team needs to understand and remember, otherwise you end up with tons of duplicated classes, parallel systems, and bike shedding. Have we, as an industry, not felt this pain often enough yet? Do we really need to keep banging our head against the wall to figure out it does hurt?

> Sure, sure. except for the inline styles everywhere.

There are no inline styles when using Tailwind. There are references to variables from the design system.

> And the fact that everything is literally being repeated all over the place.

If you find yourself repeating the same sequence of classes, it's time to create a component in your frontend framework if you use one, or a Tailwind utility class. And even if you just copy-paste the same class strings all over the codebase, transport compression will eliminate that pretty much entirely.


Replies

timrtoday at 5:45 PM

> That brings with it the problem of naming a thousand things in a consistent way that everyone on your team needs to understand and remember, otherwise you end up with tons of duplicated classes, parallel systems, and bike shedding. Have we, as an industry, not felt this pain often enough yet? Do we really need to keep banging our head against the wall to figure out it does hurt?

Of course. It's obviously better to have 10,000 different names that are all loosely, but not exactly the same as the CSS property they're trying to represent.

xigoitoday at 5:45 PM

> And even if you just copy-paste the same class strings all over the codebase, transport compression will eliminate that pretty much entirely.

The client still has to decompress it and waste processing power parsing all the repeated text.

show 1 reply