Home › Forums › Weaver Xtreme Theme › Cumulative layout shift
- This topic has 6 replies, 4 voices, and was last updated 2 years, 7 months ago by
Weaver.
-
AuthorPosts
-
January 19, 2024 at 23:28 UTC - Views: 34 #73831
waverly
ParticipantFor every screen other than the narrow mobile screen (like 480px wide) I align photos left or right. To prevent a very small amount of text being displayed on the narrow screen alongside the aligned photo, i have used the following fix:
.blog.is-phone .wvrx-posts .alignleft {float:none !important;margin-left:auto !important;margin-right:auto !important;}
.single.is-phone .alignleft, .blog.is-phone .wvrx-posts .alignleft {float:none !important;margin-left:auto !important;margin-right:auto !important;}
.single.is-phone .alignright, .blog.is-phone .wvrx-posts .alignright {float:none !important;margin-left:auto !important;margin-right:auto !important;}
It works great, but apparently creates layout shift problems.
Ideas?
January 19, 2024 at 23:52 UTC - Views: 32 #73832User
ModeratorCan you please provide a site URL for checking?
Regards!
January 20, 2024 at 00:53 UTC - Views: 30 #73833waverly
ParticipantJanuary 20, 2024 at 01:53 UTC - Views: 26 #73834scrambler
ModeratorI am not sure I follow.
In the page you gave us, I do not see any layout shift when reducing the browser to phone size.
I also do not see your rule being applied to anything.
So you may want to elaborate
January 20, 2024 at 05:15 UTC - Views: 25 #73835waverly
ParticipantI don’t see the layout shift either, but Google apparently does. As it only seems to occupy a fraction of a second, it is unlikely to be visible to the naked eye.
January 20, 2024 at 07:10 UTC - Views: 25 #73836User
ModeratorUsing Lighthouse to test the site:
Mobile:
Cumulative Layout Shift = 0.101Their main culprit with 0.037 is:
The Hunt For Jessie September 9 October 2022 RECIPES FOR LOVE AND MURDER – Sea… <div class="atw-content-2-col atw-cf">Desktop:
Cumulative Layout Shift = 0.365Their culprit with 0.325 is:
FEATURED POSTS TV Spinoffs – One Real, Three Imagined 21 December 2023 Set in … < div id="container" class="container container-page relative font-inherit">For details see:
https://pagespeed.web.dev/analysis/https-areathirtythree-com-blog/kt28m6zpa8?form_factor=mobileHope this helps where to look, as it seems to be the containers, not just the contents.
Regards!
January 20, 2024 at 19:59 UTC - Views: 12 #73837Weaver
KeymasterYou have some sort of “optimizer” that is moving the loading of Weaver’s (and other plugins) CSS to the end, which is almost certainly the cause of the shift as the layout is being built using some default CSS values which then get overridden when the real style CSS is finally loaded.
-
AuthorPosts
- You must be logged in to reply to this topic.

