Repository navigation
Global Styles: Add block spacing to root block support UI - #42797
andrewserong merged 3 commits into
Conversation
|
Size Change: +286 B (0%) Total Size: 1.26 MB
ℹ️ View Unchanged
|
|
This tested well for me. The only thing I noticed is that blockgap.mp4Not sure where the 24px comes from 🤔 Block gap in the theme.json is set to 1.5rem. |
|
Thanks for testing @glendaviesnz!
Which theme did you have active? I'm assuming it was TwentyTwentyTwo if the theme.json has the value set to I'll do some more testing. |
It was TT1 blocks with the following added to theme.json settings: |
@glendaviesnz is that in The blockGap value should be in |
🤦 Doh - works as expected when put in the right place, ie. 'Reset all' returns the Block gap value in global styles to the value in theme.json |
glendaviesnz
left a comment
There was a problem hiding this comment.
This worked as advertised for me.
✅ Changes to block gap in global styles reflected in site editor canvas
✅ Changes saved to block gap in global styles reflected in site front end
✅ Resetting block gap in global styles resets to default value from theme.json
✅ Setting block gap at block level in global styles or page editor continues to work as expected
|
Thanks for the reviews @glendaviesnz, much appreciated! |
What?
Add
blockGap/ block spacing to the root Layout global styles panel.Why?
Now that the Layout refactor in #40875 has resolved the hierarchy of blockGap style output, we should be able to safely add back in the UI for the root level control.
How?
blockGapto the list ofROOT_BLOCK_SUPPORTShasGapValueandhasPaddingValuechecks so that they check against whether or not a user value has been provided. This resolves an issue at the root level for both style value types where the ToolsPanel dropdown menu would still display the item as though it had a value even after it has been reset.Testing Instructions
settings.spacing.blockGapis set to eithernullorfalseScreenshots or screencast