-
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
Site Editor: Can't remove group block margins #36797
Comments
Are you confident that this is not the blockGap? |
@carolinan If you're describing classname styling, then you're completely right. I do see a top gap described as If you're talking about using the block gap settings feature, from my understanding, it handles the spacing between items within a block. https://wp.me/p2AvED-nIl From what I can tell, the margins described in this issue are appearing on the group block itself, and not a result of its children. I'm also unable to find a block gap settings option for the group block. |
BlockGap adds spacing both on top of a block and horisontal spacing between inner blocks, if inner block support has been added, like with the columns. A while back I opened an issue about adding documentation for blockGap because it is confusing -Nobody was able to pick that up so I started a PR myself. |
Thanks for the context Carolina! |
If that group block is a top level item, than it's expected, the gap between blocks is added using margins (top margins) because there's no "gap" support in regular divs (no flex or grid). That said, we do have a related that is being worked on here #36680 |
A little later to the party here, but as @youknowriad mentioned, this is due to |
This came up in the eleventh call for testing for the FSE Outreach Program:
Noting here as a more explicit +1 to Nick's suggestion to add this to the Dimensions UI for the Group block! |
Noting that a recent PR was closed related to this experience: #37105 TLDR: the spacer block is seen as the interim solution for now. Going to leave this open to revisit in the future though. |
Hi, just wanted to add that this is a confusing and difficult issue for people who wish to add contrasting colour blocks or have two blocks with different colours next to each other, for example. I was quite confused at first because it seems in the editor like this white line is just the gap where you're to click to add a new block But on the font end we get this: Where there is a white line between our colour blocks. (Messing about with colours, not an actual design folks!) So if a designer wanted to have different colour blocks together, perhaps mixing pale and dark colours, they would have this white line interruption. I did find that changing "spacing": { in the .json file in the theme folder to 0.rem effectively solves the issue, but I was expecting something a little less technical and also in a way it's also ugly as the gap adds space and room and is pleasant, it just needs to be the same colour as the block (below, I guess?) |
I can no longer reproduce this - as the margin controls on the group block allow us to remove that gap |
Description
When adding group blocks to the site editor, there's always an accompanying top margin. There doesn't appear to be an obvious way to remove it.
I stumbled across this issue while building a test site for the editor. I wanted add group blocks to the top level document to organize my page layout, but the margins kept introducing unwanted white space.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Frontend
Site Editor
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: