Keep buttons steady on focus and align the 404 search form - #92
Open
henriqueiamarino wants to merge 2 commits into
Open
henriqueiamarino wants to merge 2 commits into
henriqueiamarino wants to merge 2 commits into
Conversation
The button element gained a 1px dotted border on focus that its resting state never had, so every focused button grew two pixels and the search input stretched with it. The dotted focus signal moves to the outline, which never affects layout, with the ink color so the ring reads on the page ground. The Button block keeps its dotted focus border, which is safe there: its resting state already carries a border of the same width. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Same placeholder, same button-inside layout — the two forms should not differ. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
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. |
carolinan
self-requested a review
September 23, 2026 09:57
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





Closes #90.
Two commits, both from @carolinan's report:
The layout shift — reproduced and pinned down:
styles.elements.buttondeclared a 1px dotted border on its focus states while the resting button has no border. WordPress only emits border/outline for the:focus-visiblepseudo (the:focusrule emits colors alone), which is why the shift appears on keyboard focus and click-focus in browsers that promote it — matching the 'mouse and keyboard' repro steps. Measured on trunk: tabbing to the search button grows it 47→49px and the input stretches with it. The dotted focus signal now lives on the outline — dotted 1px at the existing 4px offset, in the ink color — which never affects layout. Measured on this branch under the same keyboard focus: dotted ring renders, border stays 0, shift is 0. The Button block's dotted focus border is untouched; it is metric-safe there because that block's resting state already carries a 1px border.Form parity: the 404 template's search block now matches the search results form — placeholder and button-inside layout — answering the question raised in the issue. (Design change made by @henriqueiamarino in the editor, merged to the pattern.)
🤖 Generated with Claude Code