Social Links: Restore the larger icon size for the Logos Only style by t-hamano · Pull Request #85506 · WordPress/gutenberg · GitHub
Skip to content

Social Links: Restore the larger icon size for the Logos Only style - #85506

Merged
t-hamano merged 7 commits into
trunkfrom
fix/social-links-logos-only-icon-size
Oct 30, 2026
Merged

t-hamano merged 7 commits into
trunkfrom
fix/social-links-logos-only-icon-size

Conversation

@t-hamano

@t-hamano t-hamano commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What?

Follow up to #63049.

Restores the 1.25em icon size of the Social Icons block's "Logos Only" style.

Why?

#63049 wrapped the Logos Only selector in :where() so that colors defined in theme.json could override the per-icon colors. However, the same selector also contains the rule that makes the logos larger, and lowering its specificity caused the default 1em icon size to win. As a result, Logos Only icons have been rendered at 1em instead of 1.25em.

How?

Keeps the color-related rules inside :where() so that #63049 keeps working, and moves only the icon size rule out of it.

Keeps the color-related rules inside :where() so that #63049 keeps working, and moves both icon size rules (the default 1em and the Logos Only 1.25em) to :root :where() with a specificity of 0-1-0, like the existing padding rules. This restores the 1.25em size for the Logos Only style, while letting themes override it via theme.json. For example:

"core/social-links": {
	"variations": {
		"logos-only": {
			"css": "& .wp-social-link svg { width: 1.5em; height: 1.5em; }"
		}
	}
}

Note that 1em has effectively been the Logos Only icon size since WordPress 6.6, so this change makes Logos Only icons on existing sites slightly larger.

Testing Instructions

  1. Insert a Social Icons block with a few icons.
  2. Select the "Logos Only" style and set the size to Small.
  3. On the front end and in the editor, inspect the icon link.
  4. On trunk, it is 16×16px. With this PR, it is 20×20px.
  5. Check other sizes (Normal: 24px → 30px, Large: 36px → 45px, Huge: 48px → 60px).
  6. Check that the Default and Pill Shape styles are unchanged.

Screenshots or screencast

Ipsum:

ipsum-before-after

Twenty Twenty-Five:

twentytwentyfive-before-after

Twenty Twenty:

twentytwenty-before-after

Use of AI Tools

This PR was investigated and authored with Claude Code, and reviewed by me.

claude and others added 2 commits October 24, 2026 12:14
Wrapping the Logos Only selector in `:where()` lowered the specificity of
its `1.25em` icon size below the default `1em` rule, so the larger size
stopped applying. Move the size rule out of `:where()` so it wins again.

Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018CPZ2BEgwGY3FgZ5TnS7pE
Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018CPZ2BEgwGY3FgZ5TnS7pE
@github-actions github-actions Bot added the [Package] Block library /packages/block-library label Oct 24, 2026
@t-hamano t-hamano self-assigned this Oct 24, 2026
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org>
Co-authored-by: talldan <talldanwp@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: +24 B (0%)

Total Size: 8.57 MB

📦 View Changed
Filename Size Change
build/styles/block-library/social-links/style-rtl.css 1.57 kB +1 B (+0.06%)
build/styles/block-library/social-links/style-rtl.min.css 1.51 kB +2 B (+0.13%)
build/styles/block-library/social-links/style.css 1.57 kB +1 B (+0.06%)
build/styles/block-library/social-links/style.min.css 1.51 kB +2 B (+0.13%)
build/styles/block-library/style-rtl.css 22.8 kB +5 B (+0.02%)
build/styles/block-library/style-rtl.min.css 19.4 kB +4 B (+0.02%)
build/styles/block-library/style.css 22.9 kB +5 B (+0.02%)
build/styles/block-library/style.min.css 19.3 kB +4 B (+0.02%)

623ad87 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric fdd41e7 trunk % Change
timeToFirstByte 48.25 ms +7.15% -4.56% 47.9 ms +9.39% -3.44% 0.73%
largestContentfulPaint 80 ms +12.5% -0% 88 ms +0% -9.09% -9.09%
lcpMinusTtfb 33.55 ms +4.02% -6.11% 34.35 ms +14.7% -5.09% -2.33%
wpBeforeTemplate 24.08 ms +6.98% -2.24% 23.72 ms +11.13% -1.35% 1.52%
wpTemplate 19.84 ms +4.99% -4.99% 19.56 ms +6.39% -2.81% 1.43%
wpTotal 44.56 ms +6.1% -5.03% 44.2 ms +8.39% -3.76% 0.81%
wpMemoryUsage 7.70 MB +0% -0% 7.67 MB +0% -0% 0.43%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric fdd41e7 trunk % Change
timeToFirstByte 42.15 ms +4.51% -3.32% 38.3 ms +7.05% -1.31% 10.05%
largestContentfulPaint 96 ms +4.17% -0% 88 ms +4.55% -0% 9.09%
lcpMinusTtfb 54.6 ms +2.2% -2.11% 50.15 ms +1.1% -0.9% 8.87%
wpBeforeTemplate 21.9 ms +8.08% -1.37% 20.72 ms +2.08% -0.63% 5.69%
wpTemplate 16.58 ms +2.41% -4.52% 14.77 ms +5.01% -4.2% 12.25%
wpTotal 38.67 ms +4.78% -2.74% 35.42 ms +6.01% -1.72% 9.18%
wpMemoryUsage 6.39 MB +0% -0% 6.36 MB +0% -0% 0.53%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric fdd41e7 trunk % Change
mediaProcessingJpeg 418.71 ms +1.52% -1.35% 409.88 ms +2.22% -0.23% 2.15%
mediaProcessingAvif 6324.01 ms +0.83% -0.12% 6343.45 ms +0.22% -0.15% -0.31%
mediaProcessingJpegToAvif 4362.08 ms +0.18% -0.45% 4354.8 ms +0.34% -0.12% 0.17%

media-upload

Metric fdd41e7 trunk % Change
jpegUploadProcessing 1485.63 ms +34.53% -1.14% 1464.22 ms +0.7% -0.21% 1.46%
pngUploadProcessing 241.75 ms +2.9% -3.25% 247.81 ms +5.23% -3.83% -2.45%
largeJpegUploadProcessing 1466.85 ms +0.76% -0.49% 1460.54 ms +0.61% -0.92% 0.43%
multipleImageUploadProcessing 1599.52 ms +1.35% -0.93% 1626.56 ms +0.21% -0.88% -1.66%

post-editor

Metric fdd41e7 trunk % Change
serverResponse 281.25 ms +3.99% -12.49% 280.63 ms +7.04% -6.36% 0.22%
firstPaint 256.03 ms +29.64% -35.34% 238.42 ms +49.06% -16.92% 7.39%
domContentLoaded 550.46 ms +3.08% -1.23% 571.78 ms +0.77% -3.48% -3.73%
loaded 551.39 ms +3.03% -1.26% 572.73 ms +0.79% -3.44% -3.73%
firstContentfulPaint 336.33 ms +0.9% -1.64% 341.55 ms +4.71% -2.78% -1.53%
firstBlock 1660.69 ms +1.39% -0.5% 1701.22 ms +6.57% -1.29% -2.38%
type 12.38 ms +13.73% -4.93% 13.58 ms +8.91% -6.48% -8.84%
typeWithoutInspector 13.18 ms +11.31% -7.66% 14.45 ms +3.25% -12.39% -8.79%
typeWithTopToolbar 16.13 ms +8.99% -8.87% 18.45 ms +6.29% -6.12% -12.57%
typeContainer 6.07 ms +5.11% -4.61% 6.93 ms +5.92% -2.89% -12.41%
focus 71.01 ms +7.34% -1.44% 79.05 ms +9.75% -5.69% -10.17%
firstFocus 155.8 ms +0% -0% 187.52 ms +0% -0% -16.92%
selectAll 235.65 ms +2.23% -1.21% 297.18 ms +2.12% -9.12% -20.7%
undo 20.63 ms +8.24% -5.57% 22.26 ms +7.73% -2.88% -7.32%
listViewOpen 46.06 ms +9.68% -10.49% 48.79 ms +11.48% -10.51% -5.6%
inserterOpen 27.98 ms +3.25% -8.58% 28.54 ms +6.24% -2.17% -1.96%
inserterHover 7.75 ms +6.32% -7.61% 8.49 ms +10.13% -5.77% -8.72%
inserterSearch 6.77 ms +10.49% -6.94% 6.39 ms +3.6% -0.94% 5.95%
loadPatterns 420.87 ms +5.17% -2.85% 439.63 ms +8.03% -5.82% -4.27%
wpTotal 273.57 ms +3.98% -12.56% 273.4 ms +6.89% -6.55% 0.06%
wpMemoryUsage 14.73 MB +0% -0% 14.72 MB +0% -0% 0.1%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric fdd41e7 trunk % Change
serverResponse 494.8 ms +9.36% -2.31% 530.33 ms +1.59% -2.73% -6.7%
firstPaint 280.58 ms +19.71% -10.97% 254.91 ms +13.78% -3.2% 10.07%
domContentLoaded 918.06 ms +1.07% -3.1% 905.59 ms +0.97% -1.04% 1.38%
loaded 919.33 ms +1.06% -3.1% 906.85 ms +0.94% -1.05% 1.38%
firstContentfulPaint 508.51 ms +2.45% -3.4% 519.27 ms +0.97% -3.94% -2.07%
firstBlock 3763.54 ms +1.02% -0.98% 3697.13 ms +0.86% -1.45% 1.8%
type 17.85 ms +7.39% -6.72% 17.69 ms +7.86% -7.29% 0.9%
navigate 115.13 ms +12.69% -5.09% 122.12 ms +2.64% -8.58% -5.72%
loadPatterns 1249.28 ms +5.4% -4.09% 1175.81 ms +1.81% -3.37% 6.25%
loadPages 1014.53 ms +4.57% -0.41% 1034.55 ms +44.02% -2.77% -1.94%
wpTotal 485 ms +9.48% -2.46% 520.7 ms +1.56% -2.79% -6.86%
wpMemoryUsage 12.77 MB +0% -0% 12.73 MB +0% -0% 0.27%
wpDbQueries 44 +2.27% -0% 44 +2.27% -0% 0%

623ad87 Run

🏁 Flaky tests

Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

moves selected text into another paragraph in /test/e2e/specs/editor/various/draggable-blocks.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 2
+ Received  + 2

  Array [
    Object {
      "attributes": Object {
-       "content": "First third",
+       "content": "First second third",
      },
      "name": "core/paragraph",
    },
    Object {
      "attributes": Object {
-       "content": "Fourth second fifth",
+       "content": "Fourth fifth",
      },
      "name": "core/paragraph",
    },
  ]

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:1167:41
should not scale images smaller than the threshold in /test/e2e/specs/editor/various/big-image-size-threshold.spec.js, passed after 1 failed attempt.
Error: apiRequestContext.fetch: socket hang up
Call log:
  - → GET http://localhost:8889/wp-json/wp/v2/media?per_page=100
    - user-agent: Playwright/1.63.0 (x64; ubuntu 24.04) node/24.20 CI/1
    - accept: */*
    - accept-encoding: gzip,deflate,br
    - X-WP-Nonce: c30ddb4b84
    - cookie: wordpress_test_cookie=WP%20Cookie%20check; wordpress_logged_in_23778236db82f19306f247e20a353a99=admin%7C1793520983%7CqN7sakfOHXe8yOoGYqUk0ogBNdhiwHeSTWDaMJFbHRD%7C72f80fcabb851a1086e63ed36c604b446c457b577c094fa9654918060611a025; wp-settings-time-1=1793348390

    at RequestUtils.rest (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/rest.ts:111:39)
    at RequestUtils.listMedia (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/media.ts:24:30)
    at RequestUtils.deleteAllMedia (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/media.ts:85:27)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/big-image-size-threshold.spec.js:30:22
should switch to Template tab when a block was selected and we select the Template in /test/e2e/specs/site-editor/settings-sidebar.spec.js, passed after 1 failed attempt.
Error: apiRequestContext.fetch: socket hang up
Call log:
  - → GET http://localhost:8891/wp-json/wp/v2/template-parts
    - user-agent: Playwright/1.63.0 (x64; ubuntu 24.04) node/24.20 CI/1
    - accept: */*
    - accept-encoding: gzip,deflate,br
    - X-WP-Nonce: abf046a024
    - cookie: wordpress_test_cookie=WP%20Cookie%20check; wordpress_logged_in_da433b7faafd8180ebeb1624ceeeab7e=admin%7C1793520997%7CmJ76gHkzcef3Rebq5N94sew2ximEAYKtuwhzffXxCwi%7C85a716bc516f32a5a63b481d9ecb03c1f40384554fb571b9e6c9a23ed4602205; wp-settings-time-1=1793348679

    at RequestUtils.rest (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/rest.ts:111:39)
    at RequestUtils.deleteAllTemplates (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/templates.ts:35:31)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/settings-sidebar.spec.js:8:17

623ad87 Run

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Block] Social Affects the Social Block - used to display Social Media accounts and removed [Package] Block library /packages/block-library labels Oct 24, 2026
Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018CPZ2BEgwGY3FgZ5TnS7pE
@github-actions github-actions Bot added the [Package] Block library /packages/block-library label Oct 24, 2026
@t-hamano
t-hamano marked this pull request as ready for review October 24, 2026 13:01
@t-hamano
t-hamano requested a review from fabiankaegy as a code owner October 24, 2026 13:01
@talldan

talldan commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Note that 1em has effectively been the Logos Only icon size since WordPress 6.6, so this change makes Logos Only icons on existing sites slightly larger.

It's a shame there was the regression in 6.6 (my fault).

For me, I don't really understand why 1.25rem is the right value. At this size it's very difficult for a user to make 'Logos only' match the size and spacing of the other styles, and it means that in some designs it might look unusual if the user wants to mix both styles:
Screenshot 2026-10-26 at 2 06 08 pm

If it were 1.5rem then the size and spacing would match perfectly:
Screenshot 2026-10-26 at 2 06 40 pm

With how it is in trunk, the user can also bump up the size of the 'Logos only' icons to make them match (Large Logos Only vs Default looks the same as 1.5rem):
Screenshot 2026-10-26 at 2 09 26 pm

So personally I wonder if it's worth fixing this (and potentially breaking the styles of sites further).

@aaronrobertshaw aaronrobertshaw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the right size is only a hard question because the new rule locks it in at 0-3-1. If both svg size rules use :root :where() like the padding rules, 1.25em becomes a default themes can override.

:root :where(.wp-block-social-links .wp-social-link svg) {
	width: 1em;
	height: 1em;
}

:root :where(.wp-block-social-links.is-style-logos-only .wp-social-link svg) {
	width: 1.25em;
	height: 1.25em;
}

The base rule has to move too, or its 0-2-1 still wins.

Icon size Default style Logos Only 1em (trunk) 1.25em (this PR) 1.5em
Small 24px 16px 20px 24px
Normal 36px 24px 30px 36px
Large 54px 36px 45px 54px
Huge 72px 48px 60px 72px

A theme can then pick 1.5em to match the other styles, or 1em to keep today's look:

"core/social-links": {
	"variations": {
		"logos-only": {
			"css": "& .wp-social-link svg { width: 1.5em; height: 1.5em; }"
		}
	}
}

That fixes the regression without forcing one value on every site. It also fits the font size support I'm looking at for these blocks.

Additionally, I've also been working on migrating the Social Icon/s blocks to use our block supports. This particular area has been a little on the back burner due to needing to choose between font-size and width/height supports for sizing.

For now though we can at least make the styles here compatible with Global Styles.

claude and others added 3 commits October 27, 2026 14:27
…rides

Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018CPZ2BEgwGY3FgZ5TnS7pE
Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018CPZ2BEgwGY3FgZ5TnS7pE

# Conflicts:
#	packages/block-library/CHANGELOG.md
Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018CPZ2BEgwGY3FgZ5TnS7pE
@t-hamano

Copy link
Copy Markdown
Contributor Author

Thank you both for the reviews! The 1.25em value was added in #35586 to make the icons a little bigger, but I couldn't find a clear reason why that specific value was chosen. That said, to focus on fixing the regression for now, I've kept 1.25em and lowered the specificity of the size-related CSS.

@aaronrobertshaw aaronrobertshaw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for iterating here 👍

✅ With no overrides, Logos Only icons are 1.25em
✅ Default and Pill Shape keep 1em
✅ Editor and fontend match
✅ Block level & .wp-social-link svg rule in Additional CSS still wins
✅ Sizes are unchanged across nine themes covering block and classic themes

LGTM 🚢

We'll just need a quick rebase and changelog conflict to be resolved.

Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011g9URx4BWpCNVd6FVeYx4K
@t-hamano
t-hamano merged commit c337a25 into trunk Oct 30, 2026
82 of 83 checks passed
@t-hamano
t-hamano deleted the fix/social-links-logos-only-icon-size branch October 30, 2026 09:23
@github-actions github-actions Bot added this to the Gutenberg 24.4 milestone Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Social Affects the Social Block - used to display Social Media accounts [Package] Block library /packages/block-library [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants