DUPLICATE: Contextual Spacing: "Remove default margins" applies in the block editor, custom spacing doesn't

Problem

With Remove default margins enabled and custom values set under Contextual Spacing, everything works on the frontend. In the block editor, however, the default margins are removed but the custom spacing is not applied, so the editor ends up with no vertical spacing at all.

Steps to reproduce

  1. Theme Styles → Contextual Spacing: enable Remove default margins (e.g. for h1–h6, p, ul, ol) and set values for Heading and Paragraph (screenshot attached)
  2. Open a post in the block editor and add some headings, paragraphs and lists

Expected

The block editor shows the same spacing as the frontend.

Actual

Headings, paragraphs and lists sit directly on top of each other.

Why this matters

Clients edit their content in the block editor. Without any spacing, they start inserting empty paragraphs to separate blocks, which then end up in the frontend output.

Suggestion

Apply the contextual spacing rules in the block editor as well, so editor and frontend match.

If that’s not feasible, Remove default margins should not affect the block editor at all. I can’t think of a use case where a block editor without any spacing is the desired result. Keeping the editor’s default spacing is far less harmful than removing it without a replacement.

Hi Jonas,
Thanks for the report.

We’ve already reproduced this issue, and it’s tracked in our internal bug tracker. The existing thread is

We’ll update it once the issue is fixed. I’ll close this thread since it’s a duplicate.