Repository navigation
Block Styles: Show the active style variation in forced colors mode - #86378
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: +329 B (0%) Total Size: 8.61 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. Undo restores the post selection when another synced entity is loaded (RTC WebSocket) in
|
# Conflicts: # packages/block-editor/CHANGELOG.md
t-hamano
left a comment
There was a problem hiding this comment.
LGTM! It's unfortunate that the current UI isn't ideal and requires a local override, but I think this approach is fine for now.
|
There was a conflict while trying to cherry-pick the commit to the wp/7.2 branch. Please resolve the conflict manually and create a PR to the wp/7.2 branch. PRs to wp/7.2 are similar to PRs to trunk, but you should base your PR on the wp/7.2 branch instead of trunk. |
…rs mode (#86450) * Block Styles: Show the active style variation in forced colors mode (#86378) * Block Styles: Show the active style variation in forced colors mode * Add PR link to changelog entry Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> (cherry picked from commit 653a734) * Add changelog link --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org>
…ordPress#86378) * Block Styles: Show the active style variation in forced colors mode * Add PR link to changelog entry Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
What?
Follow-up to #85948.
Shows which style variation is active in the block inspector when forced colors mode is on.
Why?
The active style variation is marked only by a solid background, and forced colors mode discards it, so the active button looks the same as the others. #85948 does not reach these buttons, because they switch between the
solidandoutlinevariants and have no pressed state.How?
The fix is local to this control and not in
Button, becausesolidonly means "selected" here. The active style uses the same system selection colors as the pressedButtonin #85948, so the two selection states match in forced colors mode.Testing Instructions
active.darkand confirm the active style is still filled and readable.Testing Instructions for Keyboard
Screenshots or screencast