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

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
by Bruce27

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

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

by ced1870

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

Thank you! I will work with that.

Bruce
by Bruce27

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

Time to create page: 0.624 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 355 guests and no members online