-
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
Social Icons: add top and bottom margin support #35374
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in the different editors and global styles, and with different alignments and justifications. Works well.
Thanks for testing @stacimc !
Hmm, very interesting. Good spotting. I can replicate this with the Columns and Social Links blocks where there's a preceding block in the editor and the frontend.
It's coming from layout.php.
Totally agree. It seems to be affecting any block that opts in to gap support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for writing up the issue @ramonjd!
Description
This PR adds top and bottom margin support to the Social Icons block 🎉
Here is a film demonstrating margins in action in conjunction with the block spacing support we enabled in #35236
like-me-seymour.mp4
Testing
Opt into
margin
andblockGap
in yourtheme.json
, e.g.,Add a new post, and insert a Social Links icon. Insert as many social media icons as takes your fancy. Add a test URL to each so that they appear on the frontend.
Play around with the block spacing and margins, to be found under the Dimensions Panel in the sidebar controls.
Check that the saved post looks good in the frontend. Also ensure the corresponding inline styles are applied:
Also test in the Site Editor by editing the Layout > Dimensions of the Social Icons block.
Note: there is a known issue with layout styles in the Site Editor/Post Content Block
Types of changes
Opting in to top and bottom margin support for the Social Links block.
Checklist:
*.native.js
files for terms that need renaming or removal).