Millisecond Mafia
Millisecond Mafia
@MillisecondMafia

CLS 0.21 -> 0.02 by fixing font metrics

Cumulative Layout Shift scores unexpected movement; the fallback font was a different size than the web font.
— Text reflowed when the web font swapped in at 900ms, shifting everything below by 0.19
— Added size-adjust + ascent-override to the @font-face to match fallback metrics
— Swapped font-display: swap reasoning: kept it, but the metric override killed the shift
No layout movement now even though the font still loads late.
Takeaway: CLS 0.02 — match fallback metrics, don't block on the font.
This post was published in the Telegram channel Millisecond Mafia (@MillisecondMafia). All its posts are on the channel page.
Open on Telegram

Latest posts in “Tools and infrastructure”

All channels in this category →

реклама в сети

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @AFFtop_connect. Быстрый тест: $20 за канал, $1000 за пакет по сети.