Repository navigation
Menu: Increase the checkbox checkmark size - #86974
Conversation
🤖 PR meta 🤖🎉 PropsIf 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. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: +39 B (0%) Total Size: 8.68 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome 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. should select synced pattern in
|
|
Seems okay! I still think there's a future experiment we can do, that couples stroke-width with font-weight, but that's independent of this change. |
|
I like the outcome, it looks better than the tiny and the resting state looks even according to its container. I might be lacking context, but I wonder if setting a custom size derails from a more consistent use of icons where the icon is designed for a 24px wrapper and the icon size should be instead a change in the SVG form. Regardless of the point above, the icon in Select and Comobobox should look the same. Noting it just in case but likely it's already in your mind. |
It does and it doesn't. When non-scaling-stroke is not applied, in principle every change in pixel size also changes the stroke-width, which is one of the things pairing stroke-width with font-weight would address. But, and I'll let Marco correct me if I'm wrong, I think a small change was pushed, which at least enforces a 1px stroke-width when the icon is smaller than 24px. |
Not to my knowledge (@jameskoster ?). AFAIK, since #84081, the stroke scales with the SVG, meaning that it's 1.5px when the icon is at size 24, 1.25px when the icon is at size 20, and 1px when the icon is at size 16. So in this case, the new version of the checkmark is drawn with 1.25px stroke width. |
|
I'm going to merge this PR since it's an improvement over |
79b4643 to
706337c
Compare
What?
Increase the
Menu.CheckboxItemcheckmark from 16px to 20px, without otherwise changing any spacing / layout metrics.Why?
Give the checkmark more visual weight within the 16px selection column.
How?
Set
size={ 20 }onIcon, give its wrapperposition: relativeand the SVGposition: absolute, and remove the 1px vertical translation.Testing Instructions
npm run storybook:devand open Components → @wordpress-ui → Menu → Checkbox Items.Testing Instructions for Keyboard
Screenshots or screencast
Local Checkbox Items story in Chrome, light theme, LTR. Both captures use the same 2528×1489 viewport and 192×256 crop. The baseline is
e485545c081.Use of AI Tools
Implemented and verified with Codex, including an independent local agent review.