Preventing Cumulative Layout Shift (CLS) and Flash Of Unstyled Content (FOUC)
2 years 4 weeks ago #67998
by Bruce27
Preventing Cumulative Layout Shift (CLS) and Flash Of Unstyled Content (FOUC) was created by Bruce27
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
Please Log in or Create an account to join the conversation.
2 years 4 weeks ago #68004
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic Preventing Cumulative Layout Shift (CLS) and Flash Of Unstyled Content (FOUC)
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
Please Log in or Create an account to join the conversation.
2 years 3 weeks ago #68015
by Bruce27
Replied by Bruce27 on topic Preventing Cumulative Layout Shift (CLS) and Flash Of Unstyled Content (FOUC)
Thank you! I will work with that.
Bruce
Bruce
Please Log in or Create an account to join the conversation.
Time to create page: 0.211 seconds