Skip to content

Commit

Permalink
Include ‘compatibility mode’ fix
Browse files Browse the repository at this point in the history
  • Loading branch information
36degrees committed Apr 18, 2019
1 parent 94b76fd commit afb9b18
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/components/button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,17 @@
color: $govuk-secondary-button-text-colour;
}

// alphagov/govuk_template includes a specific a:link:focus selector
// designed to make unvisited links a slightly darker blue when focussed, so
// we need to override the text colour for that combination of selectors so
// so that unvisited links styled as buttons do not end up with dark blue
// text when focussed.
@include govuk-compatibility(govuk_template) {
&:link:focus {
color: $govuk-secondary-button-text-colour;
}
}

&:hover,
&:focus {
background-color: $govuk-secondary-button-hover-colour;
Expand All @@ -183,6 +194,17 @@
color: $govuk-warning-button-text-colour;
}

// alphagov/govuk_template includes a specific a:link:focus selector
// designed to make unvisited links a slightly darker blue when focussed, so
// we need to override the text colour for that combination of selectors so
// so that unvisited links styled as buttons do not end up with dark blue
// text when focussed.
@include govuk-compatibility(govuk_template) {
&:link:focus {
color: $govuk-warning-button-text-colour;
}
}

&:hover,
&:focus {
background-color: $govuk-warning-button-hover-colour;
Expand Down

0 comments on commit afb9b18

Please sign in to comment.