Repository navigation
Conversation
Change the icon-only toggle from the "compact" size to the smaller "small" size in the StateControl component. Co-Authored-By: Claude <noreply@anthropic.com>
Limit the top-margin heading-alignment adjustment to the text variant (`.has-text`), since the smaller icon-only toggle no longer needs it. Co-Authored-By: Claude <noreply@anthropic.com>
|
Size Change: +59 B (0%) Total Size: 7.91 MB 📦 View Changed
|
Add a dedicated `show-text` class to the toggle when text is shown and target it in CSS, instead of relying on the components package's internal `has-text` class. Co-Authored-By: Claude <noreply@anthropic.com>
| } | ||
|
|
||
| .block-editor-global-styles-state-control { | ||
| .block-editor-global-styles-state-control:has(.show-text) { |
There was a problem hiding this comment.
The negative margin is only necessary for buttons with text that are 32px in size. We are relying on our own class because I did not want to depend on the has-text class, which is an internal class of the Button component.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Flaky tests detected in 2459c69. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/32839061750 can add a page link to an empty link field in
|
…tton-size # Conflicts: # packages/block-editor/src/components/global-styles/state-control.js
|
Oh, this issue is already addressed in #80505. I think this PR can be closed now. |
What?
Reduce the size of the icon-only toggle button in the Global Styles
StateControlcomponent fromcompacttosmall.Why?
To match the size of the dropdown toggle buttons used in other tools panels. The text button (with chevron) is unaffected.
How?
Change
size: 'compact'tosize: 'small'only for the icon-only toggle. The text variant keepscompact.Testing Instructions
Screenshots or screencast
Use of AI Tools
Claude Code (Opus) was used to make the change and draft this PR. All changes were reviewed by the author.