- This topic has 9 replies, 4 voices, and was last updated 4 years, 11 months ago by
David.
-
AuthorPosts
-
March 23, 2021 at 8:31 am #1706799
Dan
Hello, on this site, https://adventuresofmel.com/ I am using lightweight social icons, it is the only source of CLS issues for this site. Is there a way to implement the social icons in the widget areas without using the plugin as it seems it’s been abandoned? I just need simple icons like the plugin provides that doesn’t kill the site with CLS issues.
ThanksMarch 23, 2021 at 5:22 pm #1707241Elvin
StaffCustomer SupportHi there,
You can try 2 things.
You can try to preload its fonts by using this code on a Hook Element hooked to wp_head.
<link rel="preload" href="https://adventuresofmel.com/wp-content/plugins/lightweight-social-icons/fonts/fontello.woff" as="font" type="font/woff2" crossorigin>or you can prevent FOUT by editing the plugin’s CSS file.
https://wordpress.org/support/topic/preload-font-fontello-woff/#post-14092979March 24, 2021 at 2:49 am #1707588Dan
Hey, I tried what you suggested and the CLS issues still remain. If I remove the plugin they still all go away.
March 24, 2021 at 5:53 am #1707783David
StaffCustomer SupportHi there,
try adding this CSS to your site:
.lsi-social-icons { min-height: 52px; }It should preset the height of the container so it doesn’t rely on the loading of the icons to define its height.
March 24, 2021 at 6:09 am #1707808Dan
Thanks! That solved 99% of the issues, there is still some very small issue with each of the icons not. But it’s negligible.
March 24, 2021 at 7:11 am #1708130David
StaffCustomer SupportTry updating the CSS to this:
.lsi-social-icons { min-height: 52px; } .lsi-social-icons li { min-height: 40px; }April 9, 2021 at 4:11 am #1727409Dan
Hey, this actually worked perfectly this time, Thank You!
April 9, 2021 at 5:50 am #1727497David
StaffCustomer SupportGlad to hear that!
April 27, 2021 at 2:59 am #1750507Melanie
I need to apply the same fix but I don’t know where or how to add something to the CSS. Can you show me where I add this? Thanks
April 27, 2021 at 3:55 am #1750565David
StaffCustomer SupportHi there,
that code may need to differ for your particular site.
But you can give it a try.This doc explains some methods for adding CSS:
https://docs.generatepress.com/article/adding-php/
But the simplest method is to copy the code provided here:
https://generatepress.com/forums/topic/cls-issue-with-lightweight-social-icons/#post-1708130Go to Customizer > Additional CSS in the field, start a new line and paste the code in there.
-
AuthorPosts
- You must be logged in to reply to this topic.