Skip to content

Commit

Permalink
Ensure hover styles dont override focus styles
Browse files Browse the repository at this point in the history
  • Loading branch information
NickColley committed May 3, 2019
1 parent a5244c2 commit a3db9e5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/details/_details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
}

.govuk-details__summary {
@include govuk-focusable-text-link;
// Make the focus outline shrink-wrap the text content of the summary
display: inline-block;

Expand All @@ -28,6 +27,12 @@
// Style the summary to look like a link...
color: $govuk-link-colour;
cursor: pointer;

&:hover {
color: $govuk-link-hover-colour;
}

@include govuk-focusable-text-link;
}

// ...but only underline the text, not the arrow
Expand All @@ -40,10 +45,6 @@
text-decoration: none;
}

.govuk-details__summary:hover {
color: $govuk-link-hover-colour;
}

// Remove the default details marker so we can style our own consistently and
// ensure it displays in Firefox (see implementation.md for details)
.govuk-details__summary::-webkit-details-marker {
Expand Down

0 comments on commit a3db9e5

Please sign in to comment.