Skip to content

CLS: Initial Layout Shift #12314

@benschwarz

Description

@benschwarz

I was hoping to open a discussion around CLS, Lighthouse and RUM measurement.

From a Chrome/CrUX/Core Web Vitals perspective

CLS is collected while a user interacts with the page. Scrolling, SPA navigations, Custom Accordion elements(I guess?) could cause a layout shifts. Chrome collects CLS (alongside other metrics) and delivers them to Google for use in the search ranking evaluation, also surfaced publicly via CrUX.

From a Lighthouse perspective

CLS is measured using the viewable area of the browser (the initial viewport), any elements that are rendered, then shifted will count towards CLS.


By definition, CLS is Cumulative, so when there isn't a user at the wheel, reported metrics will be very different to Core Web Vitals reported by CrUX. That isn't something that can be directly fixed, but it's a discrepancy that isn't clearly defined in Google documentation AFAIK.

Some questions:

  • Should CLS in Lighthouse be renamed (my suggestion: Initial Layout Shift) to more accurately describe what it measures?
  • Would it make sense for Lighthouse to scroll the page during test, so that Layout Shifts are collected for the whole page? (Giving people an idea of WHICH pages cause the most Layout Shifts)

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions