Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom block padding/margins being added twice in Gutenberg editor #290

Open
JariRengeling97 opened this issue Nov 28, 2024 · 0 comments
Open

Comments

@JariRengeling97
Copy link

JariRengeling97 commented Nov 28, 2024

Hi all,

When we create a custom block and enable the spacing options for the custom block the spacing styles are added twice in the Gutenberg editor.

Scherm­afbeelding 2024-11-28 om 10 42 54

In the screenshot above you see the padding stylings are added two times. If we remove style="{{ $block->inlineStyle }}" from the block view file it looks good in the editor but then on the front-end the spacing styles are not being showed.

I did fix it now by using:

<div
  class="{{ $block->classes }}"
  @if(!is_admin())
    style="{{ $block->inlineStyle }}"
  @endif
>

But I don't think this is the best solution to fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant