-
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
Buttons Block: Extra vertical space between buttons in the Editor #28647
Comments
Thank you for creating the issue @alaczek ! |
I did an inspect element on the backend and noticed this.
These margins should be collapsed making the backend look closer to the frontend. Commenting out the above margins. |
It turns out this is also the case with the default block-library styles (ex, Twenty Fifteen) - margins don't collapse between buttons in the editor, so each space between buttons has 2x margin, meanwhile on the frontend the margin is only applied to the bottom. Could the margin top set here be removed or set to 0, maybe? Twenty Twenty & Twenty Twenty-One will still need to update too, since they set their own margins. |
From what I am seeing the appender in between the buttons is having a hard time showing up and could be fixed. |
Getting the appender to show between buttons in small-gap situations feels like a separate issue to being able to controlling the gap, right? |
Yes. Here is the new issue for the in between appender: #44728 Closing this issue. |
Description
I noticed that when I insert Buttons block and set the buttons to 100% width, there's large vertical spacing between the buttons, to accommodate the block appender. This causes the editor view to be different than the preview. This behaviour is also different than if no width is set on the buttons - in that case no extra appenders appear between the buttons. This might be the intended behavior, but I found those differences confusing.
Step-by-step reproduction instructions
Expected behaviour
I didn't expect the extra vertical space in the editor when the button width is set to 100%.
Actual behaviour
I expected the spacing between the buttons to be the same in the preview and in the editor. I realize this will depend on the theme as well, but before this can be tackled in the theme, the issue of extra appenders needs to be hashed out.
Screenshots or screen recording (optional)
Editor view - large vertical spacing between buttons:
Preview - much smaller vertical spacing:
Here's a short video: https://www.loom.com/share/0f138caac58147a6ab0dc9564e950c9f
WordPress information
Device information
The text was updated successfully, but these errors were encountered: