News for hackers. Stuff that matters.
Re:Scrollbars Are Becoming a Problem by gonzo41 on Thursday October 12, 2023 @10:10PM (#37865739)
There's also the consideration that a decent style sheet can be ~100 - 200 lines long. Yet I see ~5000 line css files that have so much custom formatting for JS frameworks that build everything with divs, rather than using semantic HTML5 which has accessibility baked in.
Re:Scrollbars Are Becoming a Problem by MereInterest on Thursday October 12, 2023 @10:38PM (#37865912)
It seems like there's two wildly different ways that CSS gets used. In one style, a CSS class is a semantic category of things on the page, and the style sheet defines how it looks. In the other, a CSS class has no semantic meaning, and the style sheet defines a list of options to choose from. It's the difference between `<div class="user-comment>` and `<div class="bg-lt-gray-fg-dark-gray-bold-text">`.

The first type of CSS can be written succinctly, but the second cannot.