Site logo

Archived topic

Remove unused css and menu off canvas

2 replies · Started by Diogenes on July 12, 2021

Viewing posts 1–3 of 3

Hello.

I am trying to remove unused CSS to improve my score in mobile pagespeed, but I am having problems with the off canvas menu.

What CSS classes should I exclude from optimizing unused CSS in my cache plugin (litespeed cache with UCSS optimization)?

I excluded these classes but it still looks bad when I display the off canvas menu.

offside-js--is-open
offside-js--is-left slide-opened
generate-slideout-menu
slideout-overlay
is-open
sticky

I appreciate the help.

I answer myself.
I excluded all these classes in UCSS whitelabel in the Litespeed Cache plugin and it apparently worked:

.offside*
.no-csstransforms3d
*.slideout*
button.slideout-exit
.slide-opened
#generate-slideout*
.nav-aligned*
.sf-menu
.gen-sidebar-nav
.off-canvas-toggle-label
.has-inline-mobile-toggle
#site-navigation
.main-navigation.toggled
.main-navigation
.main-nav*
dropdown-menu-toggle
.gp-icon*
.nav-aligned*
.do-overlay
.menu-item-has-children
.inside-navigation

Glad to hear and thanks for sharing the solution!

This archived topic is closed to new replies.