- This topic has 3 replies, 2 voices, and was last updated 3 years ago by Andrew Misplon.
Tagged: CLS Google index
- AuthorPosts
- December 2, 2021 at 7:32 pm #16352
Feliciano B.V.ParticipantHi,
to improve the Google index “Cumulative Layout Shift (CLS)”, I need to remove the fonts:- polestar-icons.ttf
polestar-icons.woffOr Preload web fonts, or include “font-display: swap” in the @font-face style.
(https://web.dev/font-display/)How can I do it?
Thanks,
FelicianoDecember 2, 2021 at 7:51 pm #16353
Andrew MisplonKeymasterHi Feliciano
Thanks for reaching out.
I’m not sure
font-display
has a valid place when it comes to icon fonts. I don’t know that the tool being used can tell the difference between a font used for normal text and a font used for icons. A more detailed explanation of the issues surroundingfont-display
and icons can be found here: https://www.zachleat.com/web/font-display-icon-fonts/.To remove the icon font family, the following can be inserted using the Code Snippets plugin or a child theme functions.php file:
function polestar_child_dequeue_assets() { wp_dequeue_style( 'polestar-icons' ); } add_action( 'wp_enqueue_scripts', 'polestar_child_dequeue_assets', 11 );
If using Code Snippets you can set the snippet to run on the site front end only. Save and Activate when done.
The icons that will no longer be available can be seen here: https://github.com/purothemes/polestar/blob/develop/css/polestar-icons.css#L26-L142.
December 3, 2021 at 10:16 am #16355
Feliciano B.V.ParticipantThis reply has been marked as private.December 3, 2021 at 10:50 am #16356
Andrew MisplonKeymasterHi Feliciano
Glad to help.
Do you have drop-down menu items? Would you like to remove the down arrow that will be missing if you use the function above?
- AuthorPosts
The topic ‘Cumulative Layout Shift (CLS) bad index’ is closed to new replies.