Skip to content

Commit

Permalink
Merge pull request #1148 from alphagov/fix-hover-states-accordion
Browse files Browse the repository at this point in the history
Remove hover state for accordion sections on mobile
  • Loading branch information
NickColley authored Jan 17, 2019
2 parents c64847e + 037e1b6 commit 9a11120
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@

([PR #N](https://github.com/alphagov/govuk-frontend/pull/N))

- Remove hover state for accordion sections on mobile

([PR #1148](https://github.com/alphagov/govuk-frontend/pull/1148))

## 2.5.1 (Fix release)

🔧 Fixes:
Expand Down
5 changes: 5 additions & 0 deletions src/components/accordion/_accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@
// Section headers have a grey background on hover as an additional affodance
.govuk-accordion__section-header:hover {
background-color: govuk-colour("grey-4");
// For devices that can't hover such as touch devices,
// remove hover state as it can be stuck in that state (iOS).
@media (hover: none) {
background-color: initial;
}
}

// Setting focus styles on header so that summary that is not part of the button is included in focus
Expand Down

0 comments on commit 9a11120

Please sign in to comment.