ended6월 3일· 1 sources

Why Sticky Headers Jump When Fonts Load—And How to Stop It

폰트 로딩이 Sticky Header를 깨뜨리는 이유―그리고 이를 고치는 법

Why it matters

Sticky headers are broken on slow network connections due to asynchronous font loading—a bug that's nearly impossible to reproduce locally but destroys UX in the wild. The culprit is the font-swap behavior that reflows the header after your measurement, creating a mismatch between your spacer and the actual header height. Understanding this timing issue reveals a simple solution: remeasure the header after fonts load using the `document.fonts.ready` API.

1
Sources
+0
24h
Growth
109d
Active
sticky headerfont loadinglayout shiftdocument.fontscustom fonts

Sources

Related Issues