Social Icons: add top and bottom margin support#35374
Merged
Conversation
carolinan
approved these changes
Oct 6, 2021
Contributor
carolinan
left a comment
There was a problem hiding this comment.
Tested in the different editors and global styles, and with different alignments and justifications. Works well.
Contributor
Member
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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
marginandblockGapin 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.jsfiles for terms that need renaming or removal).