-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
BlockGap: Add axial gap option to global styles where available #42490
Conversation
Size Change: +137 B (0%) Total Size: 1.27 MB
ℹ️ View Unchanged
|
I think this would be great to add. |
Thanks for the reminder @scruffian! I was tweaking a couple of bugs over the past couple of weeks and this WIP slipped off my to do list. I'll give it a rebase this week and let's see if we can get it in. |
3dbd970
to
0acc9c4
Compare
I've given this a rebase, and I believe it's ready for review now 🙂 |
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.
This tested well for me. I was able to:
✅ Adjust row and column gap for Social icons block in global styles, both individually and using the single control
✅ Still use non-axial block control for likes of Column block
Thanks @glendaviesnz! I'll merge this in, but 🤞 we can swap over to using the new spacing controls you've merged before too long. |
What?
Add the ability to adjust axial (vertical and horizontal) block spacing / gap in global styles for those blocks that opt into it. For blocks that do not, default to a simple
UnitControl
for adjusting a single gap value.Why?
Some blocks already allow control over separate horizontal and vertical gap (notably Social Icons), so let's make it possible to control that in global styles where available.
How?
Conditionally render a
BoxControl
component for adjusting axial gap if the block allows it. Otherwise, default to a simpleUnitControl
.Note: this PR currently uses the
BoxControl
component, but I imagine we'll likely eventually swap it out for the presets-based spacing controls proposed in #42173.Testing Instructions
UnitControl
still works for adjusting spacing.Screenshots or screencast