[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/tech/ - Technical SEO

Site architecture, schema markup & core web vitals
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1796026442818.jpg (68.99 KB, 1024x682, img_1796026432543_kd8q1s6z.jpg)ImgOps Exif Google Yandex

3ad81 No.2562

I ran into this on a massive e-commerce rebuild last year. Everyone was obsessed with getting that perfect LCP score, but they forgot that forcing text to appear immediately via font-display swap often triggers a huge CLS when the custom web font finally kicks in. It looks fine for a split second until the whole page jumps because the fallback font has different metrics than the brand font. You really need to match the fallback metrics using size-adjust or similar properties in your @font-face declaration. It's a bit of extra work in the CSS, but it stops that annoying jitter during loading.

@font-face {font-family: 'BrandFont';src: url('/fonts/brand.woff2') format('woff2');font-display: swap;size-adjust: 95%;}


[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]