-
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
'Block spacing' term is unclear - could be clearer to indicate it effects spacing between blocks inside element. #37768
Comments
Thanks for opening up this issue @uniquesolution! The block spacing control is designed to control the spacing of the blocks within the group block rather than the space or margin surrounding the group block (margin support has been discussed previously in #37105 and #37344). In #37360 @youknowriad merged a fix for an outstanding issue raised in #36521 where adjusting the block spacing/gap did also affect the block's margin, which had unintended side effects. In the link in https://uniquesweb.co.in/betatguten/testing-gap/ it looks like there's some other column-like styling at play there that's outside of the styling provided by Gutenberg? The group block currently uses the default layout that expects children to be stacked vertically, so that could be part of the reason for the styling conflict there. If you need to override the margins for all children to be Kapture.2022-01-11.at.16.24.09.mp4Notes:
Please let me know if I've missed anything in the scenario you've described! |
For the group block, I don't think that it is clear from the text label "block spacing" that this setting is for inner blocks, |
Yes @carolinan , you are right, the correct word should be "Inner block spacing" I think. In this particular case of group block. |
"Inner block spacing" is an interesting idea. I'm also wondering if some of the dimension controls could benefit from an |
Description
Block spacing setting for group block is not working in block editor in wordpress 5.9 RC1 version
When we provide a value in block spacing field of settings panel of a group block, it should follow that gap value and put top margin accordingly, but instead its not adding any css inline or through class, instead its using the default value of "blockGap" provided in the theme.json file.
It should overwrite the theme.json value and use the value we provide in "Block spacing" field.
Step-by-step reproduction instructions
.wp-container-61d7f03e905db > * + * { margin-top: var( --wp--style--block-gap ); margin-bottom: 0; }
Screenshots, screen recording, code snippet
No response
Environment info
Wordpress version 5.9 RC1, with default theme twenty twenty two.
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: