Zero-CLS font loading via predictive height reservation
When a web font loads and replaces the fallback system font, text reflows because the two fonts have different character widths. Lines break at different points, paragraphs change height, and everything below shifts. This is Cumulative Layout Shift (CLS) and it hurts your Core Web Vitals score.
Content below the text blocks shifts when font swaps
When a web font loads and replaces the fallback system font, text reflows because the two fonts have different character widths. Lines break at different points, paragraphs change height, and everything below shifts. This is Cumulative Layout Shift (CLS) and it hurts your Core Web Vitals score.
Content below stays perfectly still. Zero CLS.
min-height is set to the larger
of the two predicted heights. This guarantees that no matter which font is currently
rendering, the container is tall enough to hold the text without overflow.
min-height is smoothly transitioned to auto, preventing
permanently oversized containers.