Archived topic
Cumulative Layout Shift
3 replies · Started by Ashish on April 23, 2021
Hi,
Im getting a CLS of 0.478 on my post pages. Link in private information.
it is complaining on the <p> and <h3> tag. I checked on Google PageSpeedIndex.
Can you please assist?
Hi there,
the H3 element ('How to make Paneer mix vegetable') has a lot of inline styles attached to it - see here:
<h3><span style="display: inline !important; float: none; background-color: #ffffff; color: rgba(128, 128, 128, 0.9); font-family: 'Yanone Kaffeesatz',sans-serif; font-size: 24px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: center; text-decoration: none; text-indent: 0px; text-transform: uppercase; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;" data-darkreader-inline-bgcolor="" data-darkreader-inline-color="">How to make Paneer mix vegetable</span></h3>
I am not sure how that code is being gnerated but that looks to be the cause of the CLS. Can you remove the inline styles ?
Hi David,
Thank you for pointing it out. I removed the CSS Optimisations of Rocket and regenerated the External CSS file from our theme options. And it worked like magic. There is zero CLS now. Perfect.
You guys are magicians.
Glad to hear that