Modern CSS Might Make Your Front-End More Complex
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
In a Smashing Magazine essay, Gabriel Shoyombo argues that replacing JavaScript with modern CSS can shrink a diff while making the system harder to reason about. His examples: a leftover ResizeObserver class that fights a container query, container-type changing margins, floats and width, and :has() selectors outweighing existing rules. In his own Chrome test with 5,000 rows, two harmless :has() rules together restyled 5,001 elements per toggle, about 7ms, and 31ms at 20,000 rows. It is one page, one browser, and he has filed a Chromium issue.