Skip to content
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 block: reduce or remove gap CSS for logos-only style #35581

Closed
sophiegyo opened this issue Oct 13, 2021 · 4 comments · Fixed by #35586
Closed

Social Icons block: reduce or remove gap CSS for logos-only style #35581

sophiegyo opened this issue Oct 13, 2021 · 4 comments · Fixed by #35586
Assignees
Labels
[Status] In Progress Tracking issues with work in progress

Comments

@sophiegyo
Copy link

It'd be lovely if we could either reduce the gap CSS for the social icons ul container, or potentially reduce the padding on either/and the li and a elements when the block is set to show logos only.

I was pointed to this PR which refers to the spacing between icons in the block: #34493

When you set a Social Icons block to show as logos only, the same gap: 0.5em applies:

socialgap1

As @jasmussen mentioned in that PR, the gap ends up pretty big now - it looks fine when any other style (eg: default) is selected though:

socialgap2

What is your proposed solution?

Could we reduce or fully remove that gap CSS for logo-only styles? The gaps are decidedly smaller without it:

socialgap3

@jasmussen
Copy link
Contributor

Nice one, I can take a look. Here are the two styles, side by side:
Screenshot 2021-10-13 at 11 01 00

The gap is actually the same, but the social logos definitely feels more spaced out:

Screenshot 2021-10-13 at 11 01 06

Screenshot 2021-10-13 at 11 01 11

Exactly as you say, it's because the logos only version has an extra 4px all around, making the total icon 8px taller on both axes. If I remove that padding, it looks like this:

Screenshot 2021-10-13 at 11 01 30

Would that be good?

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 13, 2021
@jasmussen
Copy link
Contributor

#35586 fixes this one. In addition to making the spacing smaller, it also increases the icon size a little bit. That was the original intent, and appears to have been lost in one of the refactors. Happy to revisit that one if need be.

@sophiegyo
Copy link
Author

#35586 fixes this one. In addition to making the spacing smaller, it also increases the icon size a little bit. That was the original intent, and appears to have been lost in one of the refactors. Happy to revisit that one if need be.

Oh, increasing the icons a bit may be worth it! There is both a margin set both on the a element inside the li and on the li itself within the ul. I didn't check closely if those two margins also exist for blocks where styles other than logos only, but they're definitely also helping to contribute to the larger gap. I was wondering if adjusting the margin on both a and li as well would be worth it - what's your opinion?

@jasmussen
Copy link
Contributor

jasmussen commented Oct 14, 2021

I was wondering if adjusting the margin on both a and li as well would be worth it - what's your opinion?

In the latest version of the block editor, those margins :should: be removed entirely and replaced by gap, which is a more ergonomic way of spacing the items out. I noticed the PR I created has been approved, so I'm tempted to land it, but I'm always happy to follow up on any side effects or missing pieces. What do you think?

Edit: I'm going to go with that for now, but I'm easy to find 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants