Vitals 101
Vitals 101
@CoreVitals101

The sneaky layout shift caused by web fonts

Here's a CLS — Cumulative Layout Shift — cause people miss for months: custom fonts. Your page loads with a backup system font, then your real font arrives and swaps in. If the two fonts are different widths, every line of text reflows and the layout jumps. Google counts that jump.

Think of it like trying on two jackets that are 'the same size' but fit completely differently.

How to tame it:
— Add font-display: swap so text is readable immediately, then accept a tiny swap
— Better: use size-adjust in your @font-face to match the fallback's width to your real font
— Best for stability: font-display: optional — if the font is slow, the browser just keeps the fallback, zero shift

Try this: Pick your body font and add a matching system fallback like Arial. Closer widths mean a smaller, calmer swap.
This post was published in the Telegram channel Vitals 101 (@CoreVitals101). 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 за пакет по сети.