Preventing Cumulative Layout Shift (CLS) and Flash Of Unstyled Content (FOUC)
Preventing Cumulative Layout Shift (CLS) and Flash Of Unstyled Content (FOUC) was created by Bruce27
Posted 1 year 1 month ago #67998
Using the Maximenu for my main menu, I get quite noticable Cumulative Layout Shift (CLS) and Flash of Unstyled Content (FOUC). I presume this has something to do with loading Google fonts.
It seems that the standard way of addressing this is to use a combination of Javascript and CSS, causing the element to remain hidden until the relevant font has loaded. Would this be the approach when using Maximenu, or is there another (perhaps simpler) way?
Thanks for the help!
Best regards
Bruce
It seems that the standard way of addressing this is to use a combination of Javascript and CSS, causing the element to remain hidden until the relevant font has loaded. Would this be the approach when using Maximenu, or is there another (perhaps simpler) way?
Thanks for the help!
Best regards
Bruce
by Bruce27
Please Log in or Create an account to join the conversation.
Replied by ced1870 on topic Preventing Cumulative Layout Shift (CLS) and Flash Of Unstyled Content (FOUC)
Posted 1 year 1 month ago #68004
Hi
for the Google fonts, you can disable the loading in the advanced options of the module, then Maximenu CK will not load them (they are still used for the menu, if loaded in the page)
this let you control how you want to load them in your page, with another extension of in your template
CEd
for the Google fonts, you can disable the loading in the advanced options of the module, then Maximenu CK will not load them (they are still used for the menu, if loaded in the page)
this let you control how you want to load them in your page, with another extension of in your template
CEd
Joomlack Webmaster and Developer
by ced1870
Please Log in or Create an account to join the conversation.
Replied by Bruce27 on topic Preventing Cumulative Layout Shift (CLS) and Flash Of Unstyled Content (FOUC)
Posted 1 year 1 month ago #68015
Thank you! I will work with that.
Bruce
Bruce
by Bruce27
Please Log in or Create an account to join the conversation.
Time to create page: 0.678 seconds