Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/multi-selector-doubled-focus-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@astryxdesign/core': patch
---

[fix] MultiSelector: remove the trigger button's own focus outline so it no
longer doubles the field wrapper's focus ring. The wrapper renders a single
`:focus-within` ring, matching `Selector` and the other bordered inputs.
@freddymeta
11 changes: 6 additions & 5 deletions packages/core/src/MultiSelector/MultiSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,12 @@ const styles = stylex.create({
lineHeight: 'inherit',
color: 'inherit',
cursor: 'pointer',
outline: {
default: 'none',
':focus-visible': `${borderVars['--border-width']} solid ${colorVars['--color-accent']}`,
},
outlineOffset: '0',
// The wrapper (inputWrapperStyles.base) renders the focus ring via
// :focus-within when this button is focused, matching
// TextInput/NumberInput/Selector. The button must not draw its own
// :focus-visible outline or the two stack into a doubled ring over the
// trigger.
outline: 'none',
borderRadius: radiusVars['--radius-element'],
},
triggerPlaceholder: {
Expand Down
Loading