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
- In a page add a group block, then add another group block through insert after. You can also give different background color to each group to differential it from each other
- Now check the page in frontend you will see a gap between the two group, the group gap is defined by the css generated by wordpress, that we define in theme.json using "blockGap" value, for example
.wp-container-61d7f03e905db > * + * { margin-top: var( --wp--style--block-gap ); margin-bottom: 0; }
- Now in the sidebar settings panel of the second group block, put the value 0 for "Block spacing" field, see this screenshot for example https://prnt.sc/26b0h0k
- Now again look in frontend, the margin-top value should be now 0, but it still remain the same, because nothing overwriting css is being added. I have created a sample page to understand what kind of issue we get due to this problem https://uniquesweb.co.in/betatguten/testing-gap/, you can see in the grid I created using groups, and after first box, every box is getting a bit lower and are not aligned to each other.
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
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