From afb9b188e0a5bbf764774152de055bfa0462a5fb Mon Sep 17 00:00:00 2001 From: Oliver Byford Date: Thu, 18 Apr 2019 14:54:40 +0100 Subject: [PATCH] =?UTF-8?q?Include=20=E2=80=98compatibility=20mode?= =?UTF-8?q?=E2=80=99=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/button/_button.scss | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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;