3

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.

2
  • Did you ever come across a solution to this?
    – Chris Pink
    Commented Aug 23, 2023 at 14:43
  • I've been around the houses with this so I used the brute force method (hack) $('body').removeClass('wp-core-ui') Nothing has broken so far ;-)
    – Chris Pink
    Commented Aug 23, 2023 at 15:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.