Whenever I activate WP Rocket, some fonts of my website breaks and loads incorrectly.
I have given the access of my website to WP Rocket and they replied the following:
I’m still finding multiple references like this one in the home page when bypassing WP Rocket:
font-family:var( –global-body-font-family, inherit );
I was also able to confirm that the way the property:value pair has been written is indeed invalid, and I was just wrong about which aspect makes it invalid.
It’s not the spaces that are actually the problem, it’s the parentheses — this shows how they should be positioned:
font-family:var(–global-body-font-family), inherit;
Our RUCSS generation tool cannot parse the invalid syntax, so it tries to “correct” it and that’s how it ends up looking like this:
font-family:’var( –global-body-font-family’,’inherit )’;
And it will continue to do this until you actually correct the original references and put the parentheses in the proper place (with help from either Kadence support or the WordPress Support Forums).
As far as the WP Rocket side goes, I’ve applied a temporary workaround with the helper plugin from Modify the CSS generated by Remove Unused CSS (using it to preserve the original style rules and override the modified version that ends up in the Used CSS).
So once you actually figure out how and where you need to go to fix the original property:value pairs, you could then just disable the helper plugin.
Any idea how to solve this CSS error? They said, Kadence theme has invalid CSS properties.
WP Rocket blamed Kadence (Full conversation): *Login to see link