Layout shift / CLS
Why CLS is high and how to fix it.
Updated 2026-05-09
Cumulative Layout Shift (CLS) measures how much elements move during page load. Dost's defaults score CLS < 0.1 — anything higher usually traces to one of these:
Common causes
-
Third-party app embeds with no reserved space (most common)
- Trustpilot widget, Klaviyo signup, chat bubbles
- Fix: wrap in a fixed-aspect-ratio div via Custom Liquid
-
Custom fonts loaded with
font-display: swapfor the heading- The heading reflows when the custom font swaps in
- Fix: heading and body fonts in Dost use
optionalby default (no swap). If you've changed this in Custom CSS, revert.
-
Images without
widthandheightattributes- Built-in sections always set them. Custom Liquid sections may not.
- Fix: add
widthandheightmatching the image's intrinsic dimensions
-
Header transparent → solid swap
- Brief padding shift when sticky kicks in
- Fix: usually invisible (transition handles it). If visible, ensure your hero image has a stable height.
Diagnose
Chrome DevTools → Performance tab → Record load → look for "Layout Shift" entries. Each entry shows the element that moved.
Tips
- Run Lighthouse mobile audit periodically. CLS drifts when you add apps.
- If CLS > 0.25, identify the worst offender and isolate (disable the app temporarily, re-test).
Need a hand? Contact support.
