Repository navigation
Conversation
The color, typography and style variation cards hardcoded their frame colors, so under a dark theme the selected ring, border and hover outline were invisible, the focus ring used wp-admin's accent color, and the typography card was white on white. Follow the pattern preview frames from #87426: the border and hover use the neutral interactive stroke tokens, the selected ring the neutral interactive foreground, and the focus ring the focus stroke, both at the focus width, with a surface band between ring and preview. The selected and focus rules come after hover, so hovering no longer hides them. The card element no longer draws its own focus outline. Without the site's own colors, the preview uses the surface and content tokens `Card` uses, so the typography card and the Browse styles label stay readable in any theme. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🤖 PR meta 🤖📦 Bundle sizeSize Change: +227 B (0%) Total Size: 8.86 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. Overlay menu interactions in Safari (@WebKit) in
|
This branch has not been deployed
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.
What?
See #87680. Follows #87426.
The variation cards in
@wordpress/global-styles-ui(the color and typography pickers, and Browse styles) now use design tokens, so they work in dark themes.Why?
The cards hardcoded their frame colors. In a dark theme, the selected ring, border and hover were invisible, and the typography card was white on white.
How?
The same tokens as the pattern previews in #87426:
--wpds-color-stroke-interactive-neutraland its-activestate.--wpds-color-foreground-interactive-neutral.--wpds-color-stroke-focus. The card no longer draws a second ring.Carduses.This also fixes hovering a focused card hiding its focus ring.
Related: #87815, #76850.
Testing Instructions
npm run test:unit -- --project=browser packages/global-styles-ui/src/variations/test/variation.browser.test.tsx.Testing Instructions for Keyboard
Tab to a card. One focus ring shows, and it stays when hovered.
Screenshots or screencast
To be added.
Use of AI Tools
Claude Code (Claude Opus 5.5) wrote the code, the tests and this description.
🤖 Generated with Claude Code