amphtml
amphtml copied to clipboard
amp-ad triggering layout shifts, causing CLS to increase
What's the issue?
amp-ad if used in top-slots seem to push content down, causing layout shifts. It isn't visible, but can be seen by devtools debug overlays
How do we reproduce the issue?
- Set DevTools to disable cache, 3g, cpu throttle
- Set DevTools to highlight layout shifts (devtools--> Rendering)
- Load this url
Look out for the blue flash across all content below the ad:

Disclaimer - I can't proof the ad is at fault here, but seems like the likely root cause. Alternatively it might also be something with the sidebar overlay.
@martinschierle I don't believe this is amp-ad related. I do see a warning related to the amp-sidebar usage (relating to where it is in the DOM). Does the issue persist if that is fixed?
Sorry I failed to repro this anymore. Feel free to reopen.