最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

css - Remove WordPressGutenberg button styles for ACF blocks

programmeradmin0浏览0评论

Is there a way to remove the default styling of the gutenberg editor?

I am building a custom theme using ACF blocks, part of one of the blocks has a button that is being displayed from the template file.

<button type="button" class="button">Button Text</button>

Everything on the front end looks fine and my styles for ".button" are being used correctly.

The problem I have is when editing these blocks in the editor there is a class called "wp-core-ui" being added to body tag which overrides all my .button styles.

When I remove this class via chrome dev tools everything works as it should from what I can see but this doesn't seem like a clean solution as it could be affecting parts of the site I've not noticed yet.

发布评论

评论列表(0)

  1. 暂无评论