-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused code 🧹
.block-editor-hooks__layout-controls-units { | ||
display: flex; | ||
flex-direction: column; | ||
gap: $grid-unit-20; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced with an VStack
.
} | ||
|
||
.block-editor-hooks__layout-controls-helptext { | ||
.block-editor-hooks__layout-constrained-helptext { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed the class for consistency with the JS file name. (Naming it controls
seems too broad to avoid collisions.)
{ __( | ||
'Customize the width for all elements that are assigned to the center or wide columns.' | ||
) } | ||
</p> | ||
</div> | ||
</> | ||
) } | ||
{ allowJustification && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and tests well 👍
margin-bottom: 0; | ||
} | ||
|
||
.block-editor-hooks__layout-controls-reset { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any chance any of these removed classes were used for additional styling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, we're good 👍
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