Preventing Cumulative Layout Shift (CLS) and Flash Of Unstyled Content (FOUC)

More
2 years 4 weeks ago #67998 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

Please Log in or Create an account to join the conversation.

More
2 years 4 weeks ago #68004 by ced1870
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

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
2 years 3 weeks ago #68015 by Bruce27
Thank you! I will work with that.

Bruce

Please Log in or Create an account to join the conversation.

Time to create page: 0.211 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 1415 guests and no members online