diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 544da17cd..c57b7470c 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,6 +1,7 @@ // The main application stylesheet - +$govuk-compatibility-govuktemplate: true; $govuk-typography-use-rem: false; +$govuk-use-legacy-palette: false; // Components from govuk_publishing_components gem @import 'govuk_publishing_components/all_components'; @@ -47,16 +48,4 @@ $govuk-typography-use-rem: false; @import 'views/help-page'; @import "views/guide"; -// TODO: This style overrides one coming from govuk-template -// which turns the focused text colour blue instead of the expected black -// on all components with its global 'a:link:focus' declaration. This -// code should be removed when govuk-template is no longer used. -a[class^="gem-c-"], -*[class^="gem-c-"] a - { - &:focus { - color: $govuk-focus-text-colour !important; - text-decoration: none; - } -} diff --git a/app/assets/stylesheets/components/_back-to-top.scss b/app/assets/stylesheets/components/_back-to-top.scss index 0169d4475..7d110405b 100644 --- a/app/assets/stylesheets/components/_back-to-top.scss +++ b/app/assets/stylesheets/components/_back-to-top.scss @@ -3,11 +3,6 @@ margin-bottom: govuk-spacing(3); margin-left: govuk-spacing(3); margin-right: govuk-spacing(3); - - &:focus { - @include govuk-template-link-focus-override; - } - } .app-c-back-to-top__icon { diff --git a/app/assets/stylesheets/components/_download-link.scss b/app/assets/stylesheets/components/_download-link.scss index 8d5a3ae54..f8529cbf9 100644 --- a/app/assets/stylesheets/components/_download-link.scss +++ b/app/assets/stylesheets/components/_download-link.scss @@ -4,10 +4,6 @@ margin-top: govuk-spacing(3); margin-bottom: govuk-spacing(3); - &:focus { - @include govuk-template-link-focus-override; - } - @include govuk-media-query($from: tablet) { margin-top: govuk-spacing(6); } diff --git a/app/assets/stylesheets/components/_important-metadata.scss b/app/assets/stylesheets/components/_important-metadata.scss index 36c68d014..689c43e78 100644 --- a/app/assets/stylesheets/components/_important-metadata.scss +++ b/app/assets/stylesheets/components/_important-metadata.scss @@ -31,10 +31,6 @@ .app-link { color: govuk-colour("white"); - - &:focus { - @include govuk-template-link-focus-override; - } } } diff --git a/app/assets/stylesheets/components/_published-dates.scss b/app/assets/stylesheets/components/_published-dates.scss index 5775c0a73..3187e1e55 100644 --- a/app/assets/stylesheets/components/_published-dates.scss +++ b/app/assets/stylesheets/components/_published-dates.scss @@ -9,17 +9,6 @@ .js-enabled & { display: inline-block; } - - &:focus { - @include govuk-template-link-focus-override; - } - -} - -.app-c-published-dates__history-link { - &:focus { - @include govuk-template-link-focus-override; - } } .app-c-published-dates__change-history { diff --git a/app/assets/stylesheets/components/_publisher-metadata.scss b/app/assets/stylesheets/components/_publisher-metadata.scss index c82bcec9c..7b2d6cff2 100644 --- a/app/assets/stylesheets/components/_publisher-metadata.scss +++ b/app/assets/stylesheets/components/_publisher-metadata.scss @@ -4,11 +4,10 @@ padding-top: govuk-spacing(3); } -.app-c-publisher-metadata__other a { - font-weight: bold; +.app-c-publisher-metadata__other { - &:focus { - @include govuk-template-link-focus-override; + .govuk-link { + font-weight: bold; } } diff --git a/app/assets/stylesheets/helpers/_parts.scss b/app/assets/stylesheets/helpers/_parts.scss index 310af2d2e..39c653e45 100644 --- a/app/assets/stylesheets/helpers/_parts.scss +++ b/app/assets/stylesheets/helpers/_parts.scss @@ -24,10 +24,6 @@ li { list-style: none; margin-bottom: 0.75em; - - a:focus { - @include govuk-template-link-focus-override; - } } } diff --git a/app/assets/stylesheets/mixins/_govuk-template-link-focus-override.scss b/app/assets/stylesheets/mixins/_govuk-template-link-focus-override.scss deleted file mode 100644 index a32091473..000000000 --- a/app/assets/stylesheets/mixins/_govuk-template-link-focus-override.scss +++ /dev/null @@ -1,9 +0,0 @@ -// TODO: Remove when appropriate -// govuk_template overrides the styles set by -// govuk-frontend 3.0.0. This mixin is intended as a temporary fix -// to ensure focus styles are as expected in apps using govuk_template - -@mixin govuk-template-link-focus-override { - @include govuk-focused-text; - color: govuk-colour("black") !important; -} diff --git a/app/assets/stylesheets/mixins/_white-links.scss b/app/assets/stylesheets/mixins/_white-links.scss index 202aba360..99de7d32b 100644 --- a/app/assets/stylesheets/mixins/_white-links.scss +++ b/app/assets/stylesheets/mixins/_white-links.scss @@ -7,7 +7,7 @@ } a:focus { - @include govuk-template-link-focus-override; + @include govuk-focused-text; } a:active { diff --git a/app/views/components/_download-link.html.erb b/app/views/components/_download-link.html.erb index f3b7e2301..2f0bd3fc4 100644 --- a/app/views/components/_download-link.html.erb +++ b/app/views/components/_download-link.html.erb @@ -2,7 +2,7 @@ link_text ||= "Download File" %> - +