Performance: Font weight
MEDIUM IMPACT
Font weight affects how text is painted and can influence rendering speed and layout stability.
body { font-weight: 400; }
h1 { font-weight: 700; }
p { font-weight: 400; }body { font-weight: 100; }
h1 { font-weight: 900; }
p { font-weight: 700; }| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Many font weights | No extra DOM nodes | Multiple reflows on font load | High paint cost due to font rendering | [X] Bad |
| Few font weights | No extra DOM nodes | Single reflow on font load | Lower paint cost | [OK] Good |