Atomic CSS Puts Class Names in Every Page; 69% of Stylesheet Goes Unused Publicly
A developer measured the trade-off of atomic CSS across 76 public pages of the Nakodo site. Class attributes totaled about 1.3 MB, roughly 8.6 times the 154 KB stylesheet, and each page repeats around 17.4 KB of them. Of 1,739 class selectors in the stylesheet, 1,206 (69%) never appear on a public page, mostly because the shared file also styles logged-in app screens. The author chose to keep the single cached stylesheet rather than split it by route, since fonts rather than CSS bound first paint. The analysis also found that the longest class string, a button component, reaches 714 characters on every page, though brotli compresses the repetition heavily.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in