diff --git a/src/components/button/_button.scss b/src/components/button/_button.scss index f4b3482c47..d132662375 100644 --- a/src/components/button/_button.scss +++ b/src/components/button/_button.scss @@ -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; @@ -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;