From 0042022f1d5ec7db103322908a3bd67eb384558d Mon Sep 17 00:00:00 2001 From: beeps Date: Mon, 6 Nov 2023 11:33:53 +0000 Subject: [PATCH 1/6] Add transitional crown lockup - Adds logo lockup of St Edward's crown with integrated GOV.UK text - Removes HTML and classes that used to wrap the logo group as these are no longer needed - Adjust the vertical offset of the logo to align with productName text - Tweak attributes to ensure logo is available to assistive technologies --- .../src/govuk/components/header/_index.scss | 17 ++----- .../src/govuk/components/header/template.njk | 47 ++++++------------- .../govuk/components/header/template.test.js | 10 ++-- .../govuk-frontend/src/govuk/template.test.js | 10 ++-- 4 files changed, 32 insertions(+), 52 deletions(-) diff --git a/packages/govuk-frontend/src/govuk/components/header/_index.scss b/packages/govuk-frontend/src/govuk/components/header/_index.scss index 3e2f64640e..9756c472d8 100644 --- a/packages/govuk-frontend/src/govuk/components/header/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/header/_index.scss @@ -34,10 +34,14 @@ .govuk-header__logotype { display: inline-block; + position: relative; + top: -2px; // Add a gap after the logo in case it's followed by a product name. This // gets removed later if the logotype is a :last-child. margin-right: govuk-spacing(1); + fill: currentcolor; + vertical-align: top; // Prevent readability backplate from obscuring underline in Windows High // Contrast Mode @@ -53,14 +57,6 @@ } } - .govuk-header__logotype-crown { - position: relative; - top: -1px; - margin-right: 1px; - fill: currentcolor; - vertical-align: top; - } - .govuk-header__product-name { @include govuk-typography-responsive($size: 24, $override-line-height: 1); @include govuk-typography-weight-regular; @@ -288,11 +284,6 @@ background: transparent; } - // Hide the inverted crown when printing in browsers that don't support SVG. - .govuk-header__logotype-crown-fallback-image { - display: none; - } - .govuk-header__link { &:link, &:visited { diff --git a/packages/govuk-frontend/src/govuk/components/header/template.njk b/packages/govuk-frontend/src/govuk/components/header/template.njk index 123a408fec..ef64eb1424 100644 --- a/packages/govuk-frontend/src/govuk/components/header/template.njk +++ b/packages/govuk-frontend/src/govuk/components/header/template.njk @@ -4,38 +4,21 @@ {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>