Skip to content

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

@t-hamano

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

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
    No fields configured for issues without a type.

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions