Normalize spacing in Layout hook controls#65132
Conversation
| .block-editor-hooks__layout-controls-reset { | ||
| display: flex; | ||
| justify-content: flex-end; | ||
| margin-bottom: $grid-unit-30; |
| .block-editor-hooks__layout-controls-units { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: $grid-unit-20; | ||
| } |
| } | ||
|
|
||
| .block-editor-hooks__layout-controls-helptext { | ||
| .block-editor-hooks__layout-constrained-helptext { |
There was a problem hiding this comment.
Renamed the class for consistency with the JS file name. (Naming it controls seems too broad to avoid collisions.)
| </div> | ||
| </> | ||
| ) } | ||
| { allowJustification && ( |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: -46 B (0%) Total Size: 1.78 MB
ℹ️ View Unchanged
|
| margin-bottom: 0; | ||
| } | ||
|
|
||
| .block-editor-hooks__layout-controls-reset { |
There was a problem hiding this comment.
Is there any chance any of these removed classes were used for additional styling?

Prerequisite for #64526
What?
Removes some excessive margin in the controls for the Layout block editor hook.
The following Core blocks use this hook:
How?
The structure is reworked a bit for efficiency — see inline comments.
Testing Instructions
Insert any of the affected blocks in the editor and see the block inspector. To enable the Justification control, it will be easiest to change this condition to
true:gutenberg/packages/block-editor/src/layouts/constrained.js
Line 131 in 60d338f
Screenshots or screencast