-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Very high CLS scores on web.dev despite stable layout, inconsistent with Chrome/Node CLI #11601
Comments
Thanks for splitting this out @widmanski :) For future Lighthouse investigators, even at a very slow throttling preset locally I could not reproduce the layout shifts in DevTools or in Lighthouse that we see in PSI. Not sure what's going on. |
I cannot reproduce the super high CLS (>3) in PSI or web.dev measure. @widmanski are you still seeing a CLS this high on your end? The CLS is still not 0 though, its ~0.032. Looking at the performance panel, these layout shifts are caused by the hero image moving around, but Chrome does not add them to CLS because the lighthouse/lighthouse-core/computed/layout-shift-variants.js Lines 107 to 111 in d19b646
Since the |
@adamraine thanks for looking into this. Since posting the issue, the website was reengineered somewhat. I don't think the hero image should cause CLS - it's only animated using css transforms. My understanding is that the low CLS may be caused by layout shifts caused by fonts loading causing the sizes to change, on elements above the hero? |
The latest version of Lighthouse will list possible root causes for layout shifts. In your case the large layout shift may be caused by a style update from https://chylak.com/dist/assets/style-3c439e926f7af83ed637.css In any case, there does appear to be content shifting towards the bottom of the page so don't think there is a bug here. |
Provide the steps to reproduce
What is the current behavior?
CLS scores returned by LH of https://web.dev are very high - > 3
Example test JSON: https://gist.github.com/widmanski/07c0eeb3b0630364b3641f9ff782a0a5
CLS scores returned by LH run in Chrome (LH 6.2.0) is
0
or via Node CLI (LH 6.4.1) are <0.05
The elements that are listed as affecting CLS are as follow:
What is the expected behavior?
The CLS score returned by LH run via web.dev should be consistent with the actual user experience, and with scores returned by other versions of LH.
The site is very fast and stable overall - getting really good LCP, TTI, and other metrics.
The site uses animations - but apart from the hero element, it's just css
transform
s oropacity
.Would love to get to the bottom of this - please let me know if I can provide any more info.
Separately, the site seem to also trigger the Accessibility bug reported here.
Environment Information
The text was updated successfully, but these errors were encountered: