Site logo

Archived topic

CLS & Text Logo in Main Navigation

10 replies · Started by FullyInstrumented on March 4, 2021

Viewing posts 1–11 of 11

I struggled with the CLS score of my site moonpicker.com; stuck and need help.

The case is I put the text logo of my site in the navigation bar but it affects the way it forms its final shape.

I think it loads longer (affecting CLS) due to lacking CSS that rules it.

The screenshot is here: https://prnt.sc/10ctvtg

While the additional CSS is the following:

body {
	margin: 0%; /* Space around site. */
	position: relative;
}

.no-sidebar .inside-article > *, 
.no-sidebar #comments,
.no-sidebar .paging-navigation {
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
}

button, html input[type="button"], input[type="reset"], input[type="submit"], a.button, a.button:visited,
.nav-links > * {
    border-width: 1px;
    border-style: solid;
    border-color: inherit;
}

.nav-links > * {
	padding: 5px 15px;
}

.entry-header {
	text-align: center;
}

.site-description {
	margin-top: 1em;
}

.post {
	margin-bottom: 4em;
}

.site-main .gallery, fieldset legend, p {
	margin-bottom: 2em;
}

/* Slideout navigation */

.slideout-navigation button.slideout-exit {
	font-size: 18px;
	margin-top: 5px;
}

.sf-menu > li.slideout-toggle {
	float: left;
}

.slide-opened .main-navigation.offside {
		transform: initial;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
		z-index: 100 !important;
}

.slideout-overlay {
	background-color: rgba(0,0,0,0.1);
	z-index: 99;
}

#generate-slideout-menu .close-slideout.sfHover a {
	color: inherit;
}

.slideout-navigation .main-nav {
	border-bottom: 1px solid rgba(0,0,0,0.1);
}

.slideout-navigation .slideout-widget {
	padding: 15px 15px 0;
	font-size: 15px;
}

.site-logo {
width: 100%;
height: auto;
}
.site-header {
    min-height: 150px;
}

Thanks in advance.

Hi there,

the issue comes from the litespeed critical CSS. You need to make sure that either the Themes CSS and your custom CSS is included in the Critical CSS or make sure that Themes CSS and your Custom CSS is not being loaded asynchronously.

By the way, my another site, fullyinstrumented(dot)com shows a weird search icon (on the navigation bar) when it's mobile. Kind of failed to show the image. Equally, it shows the words "fl" when checked in https://developers.google.com/speed/pagespeed/insights/.

Any help would be appreciated.

Go to Customizer > General and change the Icon Type to SVG

It doesn't work. Even worse. Makes my CLS worse.

Here is the screenshot when the SVG is selected https://prnt.sc/10fsbzk

Now, I turn to the font option to get the CLS score better.

Can you share a link to your site ?

Hi there,

Can you turn the SVG option back on so we can debug a bit more here?

Thanks!

Turning the SVG option will downgrade my CLS. Downgrading CLS can suddenly drop my traffic as well as earnings. I can give you the same problem. Here it is moonpicker.com. It's my site as well. We use the same generate press theme.

When SVG enabled, sometimes the CLS score for mobile good but sometimes poor. The same thing with the desktop, sometimes it's good and poor.

Thank you in advance.

This archived topic is closed to new replies.