Repository navigation
theme.json: Give negative outline offset for Button's focus styles - #187
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. 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. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
|
Thanks for this! Checked the generated global styles with this PR applied (Ipsum on 7.2-beta3-src):
Should the outline variation get |
|
Updated ✅ |
Test ReportPatch tested: acd294a (latest) Environment
Steps
Results
Why it was hard to see before: the focus outline uses Same results in Chromium and Firefox. Screenshots
✅ Works as expected; fixes #178 for all button types. I agree the outline variation's focus background looking like the filled button is a separate issue, best followed up on #178. Use of AI tools: tested with help from Claude Code (Playwright scripts and computed-style checks); results reviewed by me. |
juanfra
left a comment
There was a problem hiding this comment.
Thanks for working on this! I tested, and it works well
Since elements.button already sets -4px, could we just remove these two outline.offset overrides? So that we avoid having it in two places
Can we also maybe try to include a fix for the new finding in this PR as well?
|
Updated ✅ Removed the redundant offset rule & corrected outline variant's focus style. Screen.Recording.2026-11-03.at.2.26.55.PM.mov |
juanfra
left a comment
There was a problem hiding this comment.
Thanks for the updates! The outline focus looks great now.
I left one last comment.
| }, | ||
| "outline": { | ||
| "offset": "4px" | ||
| "offset": "-4px" |
There was a problem hiding this comment.
I think we should be safe to remove this as it's covered here.
There was a problem hiding this comment.
Ah right... missed it.
Updated with it removed ✅
Also verified locally & doesn't make any changes.
The Button block's focus outline gets a negative offset, so it sits inside the button like the Search block's button does. Synced from WordPress/ipsum#187. See #66352. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Button block's focus outline gets a negative offset, so it sits inside the button like the Search block's button does. Synced from WordPress/ipsum#187. See #66631. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This updates Ipsum from `17a7ada71378a21c36670d67725b3ca632845a9f` to `bc2e5af700e28980f251d97f58cf80c72ee50a13` on its `trunk` branch. A full list of changes included in this commit can be found on GitHub: WordPress/ipsum@17a7ada...bc2e5af - theme.json: Give negative outline offset for Button's focus styles (WordPress/ipsum#187) - Fix view transitions ignoring prefers-reduced-motion (WordPress/ipsum#198) - Register the pattern utility classes as block styles (WordPress/ipsum#180) - Fix the PHPStan level 10 errors that core reports (WordPress/ipsum#171) - Provide style.min.css for production (WordPress/ipsum#61) - Use the border radius shorthand in the patterns (WordPress/ipsum#206) - Describe every pattern and offer the format patterns as starter patterns (WordPress/ipsum#181) - Move what theme.json can express out of the block css strings (WordPress/ipsum#185) - Clean up editor-only attributes and serialization in the patterns (WordPress/ipsum#204) - Add DESIGN.md with the theme's design model (WordPress/ipsum#186) - Inline the theme stylesheet (WordPress/ipsum#63) - Design guide: Return all theme patterns after the registry has read them (WordPress/ipsum#192) This commit also includes changes that only exist in core: - Ipsum is added to the `cssmin:themes` Grunt task, so the build makes the `style.min.css` that the theme now enqueues. The built file is ignored. - The theme's `node_modules` directory is ignored, and left out of core's build. - The theme gets its own stylesheet build process, with `build` and `watch` commands that minify `style.css` into `style.min.css`, set up through a new `package.json`, `package-lock.json` and `.nvmrc`. - A new `contributing.txt` documents the build process and the `test-and-zip-default-themes` workflow now tests and runs that build for Ipsum. - Regression tests for the design guide ability are added in core, with a child theme fixture, because Ipsum's repository has no PHPUnit setup. Follow-up to r60934, r64677, r64678, r64679, r65224. Props yashjawale, shailu25, onemaggie, westonruter, josephscott, juanfra, mehtadev, mikachan, ravipatel, wildworks, courane01, poena, gziolo. Fixes #66631. See #66352. git-svn-id: https://develop.svn.wordpress.org/trunk@65366 602fd350-edb4-49c9-b593-d223f7449a82
This updates Ipsum from `17a7ada71378a21c36670d67725b3ca632845a9f` to `bc2e5af700e28980f251d97f58cf80c72ee50a13` on its `trunk` branch. A full list of changes included in this commit can be found on GitHub: WordPress/ipsum@17a7ada...bc2e5af - theme.json: Give negative outline offset for Button's focus styles (WordPress/ipsum#187) - Fix view transitions ignoring prefers-reduced-motion (WordPress/ipsum#198) - Register the pattern utility classes as block styles (WordPress/ipsum#180) - Fix the PHPStan level 10 errors that core reports (WordPress/ipsum#171) - Provide style.min.css for production (WordPress/ipsum#61) - Use the border radius shorthand in the patterns (WordPress/ipsum#206) - Describe every pattern and offer the format patterns as starter patterns (WordPress/ipsum#181) - Move what theme.json can express out of the block css strings (WordPress/ipsum#185) - Clean up editor-only attributes and serialization in the patterns (WordPress/ipsum#204) - Add DESIGN.md with the theme's design model (WordPress/ipsum#186) - Inline the theme stylesheet (WordPress/ipsum#63) - Design guide: Return all theme patterns after the registry has read them (WordPress/ipsum#192) This commit also includes changes that only exist in core: - Ipsum is added to the `cssmin:themes` Grunt task, so the build makes the `style.min.css` that the theme now enqueues. The built file is ignored. - The theme's `node_modules` directory is ignored, and left out of core's build. - The theme gets its own stylesheet build process, with `build` and `watch` commands that minify `style.css` into `style.min.css`, set up through a new `package.json`, `package-lock.json` and `.nvmrc`. - A new `contributing.txt` documents the build process and the `test-and-zip-default-themes` workflow now tests and runs that build for Ipsum. - Regression tests for the design guide ability are added in core, with a child theme fixture, because Ipsum's repository has no PHPUnit setup. Follow-up to r60934, r64677, r64678, r64679, r65224. Props yashjawale, shailu25, onemaggie, westonruter, josephscott, juanfra, mehtadev, mikachan, ravipatel, wildworks, courane01, poena, gziolo. Fixes #66631. See #66352. Built from https://develop.svn.wordpress.org/trunk@65366 git-svn-id: http://core.svn.wordpress.org/trunk@64505 1a063a9b-81f0-0310-95a4-ce76da25c4cd






Description
Fixes #178
This PR updates outline offset for
core/buttonstyles so that focus outline appears inside the button similar to search widget's button.Screenshots
Before
After
Testing Instructions
Use of AI Tools
None used.