How to decrease Cumulative Layout Shift caused by an app?

Solved

How to decrease Cumulative Layout Shift caused by an app?

akosbalog
Tourist
5 0 3

Hi everyone,

 

I'm trying to fix a high Cumulative Layout Shift (CLS) score of 0.15 on my website phenomestraps.com. I'm using Dawn theme. I've found that covet.pics instagram gallery app loading time causes the layout shift.

 

Can you help me, how can I fix it? How can I add a fixed height spaceholder, or something like that?

 

Thanks in advance!

Accepted Solution (1)

tim
Shopify Partner
4505 536 1642

This is an accepted solution.

I wonder why app does not do it. The solution is to add the following code to the "Custom CSS" of the covet app section:

.covet-pics-shopify-section {
  min-height: calc(33.33vw + 28px );
}

(not that fixed px height value would not help as section height changes with window width)

 

In my browser it gives CLS of 0:

Screenshot 2025-05-01 at 11.50.28 AM.png

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com

View solution in original post

Replies 3 (3)
akosbalog
Tourist
5 0 3

Can you help me how to do that?

akosbalog
Tourist
5 0 3

where should it be added? I've tried adding to the custom CSS, but didn't help

tim
Shopify Partner
4505 536 1642

This is an accepted solution.

I wonder why app does not do it. The solution is to add the following code to the "Custom CSS" of the covet app section:

.covet-pics-shopify-section {
  min-height: calc(33.33vw + 28px );
}

(not that fixed px height value would not help as section height changes with window width)

 

In my browser it gives CLS of 0:

Screenshot 2025-05-01 at 11.50.28 AM.png

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com