Contents tagged “CLS”

Cumulative Layout Shift (CLS) is one of Google's Core Web Vitals, focused on unexpected movement of page content, annoying for users.

A layout shift occurs any time a visible element changes its position from one rendered frame to the next. […] Unexpected movement of page content usually happens because resources are loaded asynchronously or DOM elements get dynamically added to the page above existing content.

There are 10 contents with this tag:

  1. I have a client site with a header that is hidden when the user scrolls down, but shown again when the user scrolls up, which seems pretty comon nowadays.

    This triggers some CLS, even if the hide/show is done in less than 500 ms, as “continuous interactions such as scrolls, drags, or pinch and zoom gestures are not considered ‘recent input’”. 😞

  2. screenshot of Font style matcher

    Monica Dinculescu avatar Monica Dinculescu

    Font style matcher

    If you're using a web font, you're bound to see a flash of unstyled text (or FOUC), between the initial render of your websafe font and the webfont that you've chosen. This usually results in a jarring shift in layout, due to sizing discrepancies between the two fonts. To minimize this discrepancy, you can try to match the fallback font and the intended webfont’s x-heights and widths. This tool helps you do exactly that.

See all tags.