From 23ca5c93044a7b3088d7a96fbabc6ab7724770b4 Mon Sep 17 00:00:00 2001 From: Max Lehmann Date: Thu, 5 Dec 2019 08:48:11 +0000 Subject: [PATCH 01/10] Use compatibility flag and remove manual fixes for gems --- app/assets/stylesheets/application.scss | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 544da17cd..b245e7ed5 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,5 +1,5 @@ // The main application stylesheet - +$govuk-compatibility-govuktemplate: true; $govuk-typography-use-rem: false; // Components from govuk_publishing_components gem @@ -47,16 +47,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; - } -} From 428e8a4533493d4bed5c2ae4fbf3d8b83c63ce23 Mon Sep 17 00:00:00 2001 From: Max Lehmann Date: Thu, 5 Dec 2019 09:48:35 +0000 Subject: [PATCH 02/10] Explicitly turn off legacy colours --- app/assets/stylesheets/application.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index b245e7ed5..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'; From 8bbc4f83a37573e9aef3e0acc5b8a75565aa00bd Mon Sep 17 00:00:00 2001 From: Max Lehmann Date: Thu, 5 Dec 2019 09:51:14 +0000 Subject: [PATCH 03/10] Remove override mixin --- .../mixins/_govuk-template-link-focus-override.scss | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 app/assets/stylesheets/mixins/_govuk-template-link-focus-override.scss 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; -} From 4502dbcb4da96430536c96870b9eb47e5d251a51 Mon Sep 17 00:00:00 2001 From: Max Lehmann Date: Thu, 5 Dec 2019 09:47:37 +0000 Subject: [PATCH 04/10] Update back to top links --- app/assets/stylesheets/components/_back-to-top.scss | 5 ----- 1 file changed, 5 deletions(-) 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 { From e3f2cb2867da39db33cdce0f3615546b7fa73c6c Mon Sep 17 00:00:00 2001 From: Max Lehmann Date: Thu, 5 Dec 2019 09:49:13 +0000 Subject: [PATCH 05/10] Update download link --- app/assets/stylesheets/components/_download-link.scss | 4 ---- app/views/components/_download-link.html.erb | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) 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/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" %> - +