Skip to content

Commit

Permalink
Fix(web): Remove Accordion Header active background change on non-hov…
Browse files Browse the repository at this point in the history
…er devices

- Do not flicker on touch screens when tapping on
the item header of the Accordion component
- CSS for active state of Accordion__itemToggle is
now applied only for devices with hover capability

Solves DS-1365
  • Loading branch information
pavelklibani committed Aug 6, 2024
1 parent 305b252 commit 3591208
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/web/src/scss/components/Accordion/_Accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@
}
}

// 3.c
// stylelint-disable-next-line selector-max-specificity -- High specificity to override the hover state selector 3.b.
.Accordion__itemHeader .Accordion__itemToggle:active:first-of-type::before {
background-color: theme.$accordion-item-background-color-active;
@media (hover: hover) {
// 3.c
// stylelint-disable-next-line selector-max-specificity -- High specificity to override the hover state selector 3.b.
.Accordion__itemHeader .Accordion__itemToggle:active:first-of-type::before {
background-color: theme.$accordion-item-background-color-active;
}
}

.Accordion__itemSide,
Expand Down

0 comments on commit 3591208

Please sign in to comment.