Skip to content

Post Editor: iframe editor canvas padding is overridden by zero in the classic theme #76863

Closed

Description

@t-hamano

Description

When a classic theme is active, the body element is expected to have 8px padding.

In WP 6.9:

Image

However, this padding is unintentionally overridden by zero in WP 7.0 and Gutenberg:

Image

This causes the text to stick to the edge of the canvas, which can make it look slightly unappealing and affect text editing.

I've identified that this issue was caused by #73971. Specifically, the zero-padding here became apparent because global styles were internally enabled in the classic theme.

Step-by-step reproduction instructions

  1. Activate Twenty Twenty
  2. Open the post editor
  3. Narrow your browser width or switch to tablet view

Activity

  1. added
    [Type] BugAn existing feature does not function as intended
    [Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.
    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json
    on Mar 27, 2026
  2. t-hamano commented on Mar 27, 2026

    @t-hamano
    ContributorAuthor

    This zero padding also affects full-width blocks. The block overflows because a negative margin of 8px is applied to the left and right, despite the canvas having no padding.

    Image
  3. moved this from 📥 Todo to 🏗️ In Progress in WordPress 7.0 Editor Taskson Mar 27, 2026
  4. changed the title [-]Post Editor: iframe editor canvas padding is overridden to zero In the classic theme[/-] [+]Post Editor: iframe editor canvas padding is overridden by zero in the classic theme[/+] on Mar 27, 2026
  5. moved this from 🏗️ In Progress to ✅ Done in WordPress 7.0 Editor Taskson Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions