Skip to content

Commit 208cc33

Browse files
Homaidksen0
authored andcommitted
fix hover accesibility toggle
1 parent a8a846e commit 208cc33

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

src/components/Dropdown/styles.module.scss

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@
2020
width: 100%;
2121
height: 100%;
2222
cursor: pointer;
23-
&:hover {
24-
border: 1px solid var(--accent-color);
25-
background-color: var(--accent-type-color);
26-
color: var(--accent-color);
23+
@media (hover: hover) and (pointer: fine) {
24+
&:hover {
25+
border: 1px solid var(--accent-color);
26+
background-color: var(--accent-type-color);
27+
color: var(--accent-color);
28+
}
2729
}
30+
2831
}
2932

3033
.options {
@@ -93,10 +96,13 @@
9396
}
9497
}
9598

96-
li[aria-selected="false"]:hover .icon {
97-
svg {
98-
background: var(--accent-type-color);
99-
border-radius: 2rem;
99+
// Only apply hover styles on devices with true hover capability (not touch devices)
100+
@media (hover: hover) and (pointer: fine) {
101+
li[aria-selected="false"]:hover .icon {
102+
svg {
103+
background: var(--accent-type-color);
104+
border-radius: 2rem;
105+
}
100106
}
101107
}
102108

0 commit comments

Comments
 (0)