Skip to content

Post Template: Resetting BLOCK SPACING incorrectly applies is-layout-flow #73073

@ddryo

Description

@ddryo

Description

Issue: When "Block spacing" is reset in the Post Template (the "Post Template" block within the Query Loop), "is-layout-flow" is added. As a result, the child blocks cannot have their layout and margins reset to 0, causing the design to break.

  • Expected behavior: Upon reset, layout-related classes should not change, or should revert to theme settings/default values, and is-layout-flow should not be applied.

  • Actual behavior: Immediately after the reset operation, is-layout-flow is applied to the wrapper of the Post Template, and the styles change.

Step-by-step reproduction instructions

  1. Edit the archive page template with the Twenty Twenty-Five theme.
  2. In the Query Loop block, click "Change design" and select "More posts".
  3. This design has a default gap of 0.
  4. From the sidebar, change and reset the BLOCK SPACING.
  5. You can see that there is now space between the lists.

When checked with the developer tools, this is due to the influence of "is-layout-flow".

Screenshots, screen recording, code snippet

Image

Environment info

  • WordPress 6.3
  • Theme: Twenty Twenty Five

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions