Repository navigation
Conversation
Setting a text color also writes it to `elements.link.color.text` while the link color tracks the text color. Resetting the Color item clears both, but Reset all cleared only `color.text`. The leftover link color kept a link block such as Site Title in the old color, and stopped the next text color from reaching the link. Reset all now clears the link color when it still matches the text color, as the Color item's reset does. A link color set to something else is kept.
🤖 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. Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: +54 B (0%) Total Size: 9.05 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. Regression: updating a specific option will only change its value and will not corrupt others in
|
There was a problem hiding this comment.
🟢 Approval recommended
The narrow change follows existing reset semantics and includes regression coverage, with no blocking issues identified; tests were not executed.
No open issues 🎉
What changed in this PR
This PR aligns Typography’s “Reset all” behavior with the individual Color reset in the shared panel used by Global Styles and the block inspector.
Changes:
- Clears the link color when it matches the text color being reset, while preserving a different link color.
- Adds regression tests for both outcomes and a package changelog entry.
| File | Description |
|---|---|
| packages/block-editor/src/components/global-styles/typography-panel.tsx | Clears matching link colors during “Reset all.” |
| packages/block-editor/src/components/global-styles/test/typography-panel.browser.test.tsx | Tests matching-color removal and distinct-color preservation. |
| packages/block-editor/CHANGELOG.md | Documents the reset fix. |
Review effort: Balanced
What?
Noticed while testing #84671.
"Reset all" in the Typography panel now clears the link colour that follows the text colour, as resetting the Color item on its own already does.
Why?
Setting a text colour also writes it to
elements.link.color.textwhile the link colour tracks the text colour (added in #77279). Resetting the Color item clears both, but "Reset all" cleared onlycolor.text.On a block whose text is a link, like Site Title, the leftover link colour shows up two ways:
How?
resetAllFilternow also clearselements.link.color.textwhen it matches thecolor.textbeing reset, the same rule the Color item's reset uses. A link colour set to something else stays. Global Styles and the block inspector share this filter.Testing Instructions
Before
2026-10-22.20.01.56.mp4
After
2026-10-22.20.01.07.mp4
Use of AI Tools
Investigated and implemented with Claude Code; reviewed by me.