Skip to content

Add horizontal margin support for group block when direct descendant of a non constrained parent block - #84647

Open
Vedant-Gandhi wants to merge 3 commits into
WordPress:trunkfrom
Vedant-Gandhi:feat/group-horizontal-margin-in-row
Open

Vedant-Gandhi wants to merge 3 commits into
WordPress:trunkfrom
Vedant-Gandhi:feat/group-horizontal-margin-in-row

Conversation

@Vedant-Gandhi

Copy link
Copy Markdown
Contributor

What?

Allow setting horizontal margin in Group block when it is nested inside a non-constrained(stack,row,etc) block.

Why?

#60997

How?

Add an opt-in marker to store the sides/margin based on the parent block.

Testing Instructions

  1. Add a row/stack block.
  2. Add a group block inside it.
  3. Add some content and ensure you can view the vertical and horizontal margin for group block

Screenshots or screencast

  • When in non constrained block
image
  • When used as root element
image

Use of AI Tools

I have used Claude Sonnet 5.5 or reviewed the issue as well as using it as an assistant to write the code. It has also been used to write comments in the code as well as review the test cases and update them as needed. I have thoroughly reviewed the code and ensured it does not introduce any side effects on other components apart from the feature being introduced.

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Vedant-Gandhi <vedantgandhi28@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

🏷️ Labels

This pull request needs exactly one label indicating its type, and has 0.

  • Required: any label starting with [Type].
  • Found: none.

Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Block editor /packages/block-editor [Package] Block library /packages/block-library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant