From d69703751aae38a2b34bc9baa2fd610046f55829 Mon Sep 17 00:00:00 2001 From: Ian James Date: Tue, 30 Mar 2021 20:46:06 +0100 Subject: [PATCH 01/16] Swap `extend` for CSS class in Magna Charta --- .../govuk_publishing_components/lib/govspeak/magna-charta.js | 2 +- .../components/govspeak/_charts.scss | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js b/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js index 45cf204f28..926fe1dad1 100644 --- a/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +++ b/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js @@ -188,7 +188,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {}; toggleStatus.classList.add('govuk-visually-hidden', 'mc-toggle-status') toggleStatus.setAttribute('role', 'alert') - link.classList.add('mc-toggle-button') + link.classList.add('govuk-body-s', 'mc-toggle-button') link.appendChild(toggleText) link.appendChild(toggleStatus) diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss index 0dfd191be2..63b034d44e 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss @@ -271,7 +271,6 @@ } .mc-toggle-button { - @extend %govuk-body-s; border: 1px solid $govuk-border-colour; color: $govuk-link-colour; cursor: pointer; From 312b4127faad7443c380072a80c9ea9fb4f9218e Mon Sep 17 00:00:00 2001 From: Ian James Date: Tue, 30 Mar 2021 20:47:48 +0100 Subject: [PATCH 02/16] Swap `extend` for CSS class in contextual sidebar And tweaked focus state to avoid a yellow bar on top of the red bar in the call to action. --- .../components/_contextual-sidebar.scss | 4 ++-- .../components/contextual_sidebar/_brexit_cta.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss b/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss index f61f8f19bc..7bbbff211b 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss @@ -6,7 +6,6 @@ $transition-campaign-dark-blue: #1e1348; } .gem-c-contextual-sidebar__brexit-heading { - @extend %govuk-heading-s; margin-top: govuk-spacing(3); margin-bottom: govuk-spacing(2); } @@ -24,7 +23,6 @@ $transition-campaign-dark-blue: #1e1348; } .gem-c-contextual-sidebar__brexit-text { - @extend %govuk-link; @include govuk-font(16); margin-top: 0; @@ -38,6 +36,8 @@ $transition-campaign-dark-blue: #1e1348; } .gem-c-contextual-sidebar__brexit-cta:focus { + box-shadow: 0 $govuk-focus-width $govuk-focus-text-colour; + .gem-c-contextual-sidebar__brexit-text { text-decoration: none; } diff --git a/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb b/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb index d5b9da5f91..f2cf1402d8 100644 --- a/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +++ b/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb @@ -16,7 +16,7 @@ data: data_attributes, aria: { label: "#{t("components.related_navigation.take_action_list.aria_label")} #{link_text}" }, lang: shared_helper.t_locale("components.related_navigation.transition.title") do %> -

<%= t("components.related_navigation.transition.title") %>

+

<%= t("components.related_navigation.transition.title") %>