Skip to content

Commit 6f5b670

Browse files
HDS-4320 Dropdown Toggle Icon: Fix z-index issue with focus ring (#2638)
Co-authored-by: Alex <alex-ju@users.noreply.github.com>
1 parent 58d4dc9 commit 6f5b670

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/smooth-months-repair.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hashicorp/design-system-components": patch
3+
---
4+
5+
`Dropdown` - Fixed `z-index` bug which caused the focus ring of the toggle icon to not be visible when the component was nested in a container.

packages/components/src/styles/components/dropdown.scss

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius;
4242
border-radius: $hds-dropdown-toggle-border-radius;
4343
outline-style: solid; // used to avoid double outline+focus-ring in Safari (see https://github.com/hashicorp/design-system-components/issues/161#issuecomment-1031548656)
4444
outline-color: transparent; // We need this to be transparent for a11y
45+
isolation: isolate; // used to create a new stacking context (needed to have the pseudo element below text/icon but not the parent container)
4546

4647
&:hover,
4748
&.mock-hover {

0 commit comments

Comments
 (0)