CustomGradientPicker: Show the control point's focus ring with the design system's outline - #82834
Draft
R1shabh-Gupta wants to merge 2 commits into
Draft
Conversation
…sign system's outline
🤖 PR meta 🤖🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. |
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?
Part of #80138
Removes a transparent outline on the gradient control point that was canceling the design system focus ring, and replaces it with the
outset-ring__focus()mixin.Why?
The control point button's
&:focus, &.is-activerule setoutline: … solid transparent. Because that rule is nested under.gradient-bar, its compiled selector outranksButton's own focus rule by CSS specificity, so it was overridingButton's real design-system ring with a transparent one whenever a swatch was focused. In a normal browser this meant no visible ring at all beyond the swatch's own white halo.How?
Moved the transparent outline out of the shared
:focus, .is-activeblock and into its own:focus-only block using@include outset-ring__focus(). The box-shadow halo stays shared between both states.Testing Instructions
npm run storybook:devand open Components > CustomGradientPicker.Testing Instructions for Keyboard
Tab to a control point and confirm the focus ring is visible. Arrow keys still move the point along the gradient bar, and the swatch remains marked as active by its halo after focus leaves it for the popover.
Screenshots or screencast
Use of AI Tools
This PR was developed with the assistance of Claude Code.