admin管理员组

文章数量:1122846

I noticed that the live website version can often be different to preview in Gutenberg. For example, this CSS is added as additional/custom CSS through Styles menu:

.no-link-underline:link {
  text-decoration: none;
}

And then the class is applied to Hyperlink Group plugin's as additional class in Advanced settings.

Effect? Underlines are removed on the website, but they still show in the preview editor. A similar thing happens with e.g. custom .list li::before styling that adds an image.

Why is the styling different in the preview? How to avoid that? I tried refreshing browser cache and readding the block, but to no avail.

Additional notes:

  • the .no-link-underline class is not listed among classes when inspecting the element in Gutenberg. It is part of the element in HTML while in editor though. And bunch of other custom CSS rules are applied correctly.
  • I have CSS combining/minifying LiteSpeed Cache plugin (no cache enabled). Disabling it earlier didn't help.

本文标签: block editorHow to force Gutenberg to follow all custom CSS styling in preview