Global styles: remove block gap control#39601
Conversation
1. It's not supported at the root level in ROOT_BLOCK_SUPPORTS 2. It doesn't work at the individual block level in global styles
|
Size Change: -94 B (0%) Total Size: 1.21 MB
ℹ️ View Unchanged
|
aaronrobertshaw
left a comment
There was a problem hiding this comment.
This tests as advertised for me. 👍
✅ Confirmed on trunk that blockGap isn't displayed at the root global styles level
✅ Confirmed on trunk that blockGap global styles for individual blocks didn't work e.g. Social Icons
✅ Didn't find any reference to gap on published page
✅ After checking out this branch blockGap controls did not show at root or individual block levels
The changes LGTM. I may be missing a little context on the reasoning behind this PR so might pay to wait for @andrewserong's approval.
There was a problem hiding this comment.
This is testing well for me, too, thanks for putting it together so quickly @ramonjd! 🤞 we'll be able to re-introduce the feature before too long 😀
| Block spacing is no longer available in global styles | Block spacing is still available within the post and site editors, just at the individual block level |
|---|---|
![]() |
![]() |
LGTM! 🚀
1. It's not supported at the root level in ROOT_BLOCK_SUPPORTS 2. It doesn't work at the individual block level in global styles
|
Hey folks, while removing this from the "blocks" global styles is a good call here, I'm a bit confused about why we need to remove it from the global level. I see that you mention that it didn't work, can we fix that instead? I know that when I removed the CSS variables from the blocks block gap behavior, I intentionally kept the variable as a fallback in the generated styles to be able to support defining the block gap at the root level. |
|
@ramonjd @andrewserong @aaronrobertshaw this was a very intentional and important feature of global styles to help design visual rhythm :D |
|
Thanks for the heads up @youknowriad and @mtias Revert commit here: #39845 Was a bit of a shotgun approach admittedly. I'll look more closely at what is not working and create issues/fix it. Related: |
|
Thanks! |
Thanks for following up, @ramonjd! Yes, just confirming that the intention is definitely to fix it and have it working properly in time for WP 6.0. |



What?
Remove the block gap controls from Global Styles sidebar. Props to @andrewserong for noticing.
Why?
How?
BANISHED!
Testing Instructions
Before checking out this branch, ensure that blockGap doesn't:
Publish a page after you've set a few Global Style block gap values. Check the source of the published page for any trace of your
gapvalue. Any?git checkout -t origin/remove/global-styles-block-gap-controlScreenshots or screencast
Before
After