Social Icons: Fix styling when oriented vertically#37986
Closed
ndiego wants to merge 1 commit intoWordPress:trunkfrom
Closed
Social Icons: Fix styling when oriented vertically#37986ndiego wants to merge 1 commit intoWordPress:trunkfrom
ndiego wants to merge 1 commit intoWordPress:trunkfrom
Conversation
ntsekouras
reviewed
Jan 18, 2022
Contributor
ntsekouras
left a comment
There was a problem hiding this comment.
👋 @ndiego, thanks for the PR!
It's worth noting that this happens only when you haven't selected any content-justfication option before, and you just change the orientation to vertical.
The problem lies in the default value of this prop in the layout abstraction. In editor we handle it here, but in the server we need a similar treatment of align-items in this line.
After that change, we would need to test other blocks with flex layout for any regression, though I don't believe there will be any..
Member
Author
|
Ah I see, I will make that update later this morning. Thanks for the review. |
8 tasks
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
When the Social Icons block is oriented vertically, the individual links span the entire width of the content area and do not maintain their correct width. This issue appears to be a regression in the latest version of Gutenberg since the issue is not present in WordPress 5.9 RC2.
What's strange is that the CSS provided by the Social Icons block has not changed in recent months, so this issue must be caused by something else. I have not been able to isolate it. The root of the issue is that in the editor,
align-items: flex-start;is added to the block. On the frontend, this CSS does not exist. This PR simply adds it back.How has this been tested?
Screenshots
Without the fix in this PR with Gutenberg 12.4 RC1 active in the TT2 theme:

With the fix, the icons display correctly:

Types of changes
Bug fix
Checklist:
*.native.jsfiles for terms that need renaming or removal).