-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fixed Social Icons shape, and horizontal and vertical alignments (fixes #28340) #28448
Fixed Social Icons shape, and horizontal and vertical alignments (fixes #28340) #28448
Conversation
#28340) Original issue was that when adding Social Icons to a Navigation block, the icons would be oblong instead of circle. The icons only misshapened when size Small or Normal was selected. I also noticed that when a horizontal Nav block was added, the social icons wouldn't align horizontally, and in a vertical Nav block, the social icons wouldn't align vertically.
Thank you for the PR! This is nice work! It does indeed fix the issue: Using I dove in to look at the issue, and it appears primarily to be because the Navigation block is a flex container, which means the margin that's attached to each social link defines the shape:
In flex containers, the
The benefit to using the auto margin is that it will always be vertically centered in the navigation menu, regardless of how tall the navigation menu is. What do you think? |
Seeing your solution, I think using margin in this fashion is the best way to address this issue; this is so much more elegant. I'll remove |
Congrats on your first PR! Going to merge this one for you. |
Congratulations on your first merged pull request, @Arash-11! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts: https://profiles.wordpress.org/me/profile/edit/ And if you don't have a WordPress.org account, you can create one on this page: https://login.wordpress.org/register Kudos! |
Thank you for helping a newbie like me and I'm happy I got an opportunity to work on this! |
Fixes #28340
Original issue was that when adding Social Icons to a Navigation block, the icons would be oblong instead of circle. The icons only misshapened when size Small or Normal was selected.
I also noticed that when a horizontal Nav block was added, the social icons wouldn't align horizontally, and in a vertical Nav block, the social icons wouldn't align vertically.