Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

How to use the new Sizing to prevent CLS.

  • Hi everyone!

    I’m using the new Sizing function to avoid CLS. I generally have a decent CLS score, but I’m trying to improve the perceived CLS for user experience.

    Specifically, I have a couple of pages where I have embedded videos with a shortcode like here: https://mayangateway.com/#about – I am using this plugin for the shortcode: https://wordpress.org/plugins/load-video-on-click/ which works well, the video loads only on click. This is a shortcode example:

    [load_video_on_click link=”https://www.youtube.com/watch?v=AQ3FoNHC6SU” image_placeholder=”356″]

    I’m using an image_place holder with these dimensions width: 640px and height 360px. And in the container – sizing, I’m also using these dimensions.

    But I have CLS on my desktop as you can see here: https://webvitals.dev/cls/pmRHGHMjlx4gLq9Wr71T – how could I set the dimensions in the container to avoid the CLS? or do I have to do it on the shortcode? If so, how?

    Thank you in advance for your help.

  • Hi there,

    if the shortcode is inside a container then you can set a Sizing -> Min height to that container block

  • Hi David, thank you for your speedy replay. Yes, the shortcode is inside a container. Should the Sizing -> Min height value be the same as the video’s height?

  • Hi Josue,

    Yes, the min-height value should be the same as the video’s height.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.