From 62fbc07bff447364f3d0969f9b6c2cb3e44b7fa4 Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Mon, 30 Dec 2019 14:08:28 +0000 Subject: [PATCH] Use `--end` class for header nav Uses `govuk-header__navigation--end` class which does away with the need for a custom override. Based on suggestion by @quis: https://github.com/alphagov/notifications-admin/pull/3181#discussion_r361977771 --- app/assets/stylesheets/govuk-frontend/overrides.scss | 11 ----------- app/templates/admin_template.html | 3 ++- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/app/assets/stylesheets/govuk-frontend/overrides.scss b/app/assets/stylesheets/govuk-frontend/overrides.scss index 4269c4181..6b703f1fe 100644 --- a/app/assets/stylesheets/govuk-frontend/overrides.scss +++ b/app/assets/stylesheets/govuk-frontend/overrides.scss @@ -1,16 +1,5 @@ // Overrides for certain GOV.UK Frontend styles to make its components match this application's design -// Notify's header navigation aligns to the right -.govuk-header__navigation { - text-align: right; - - // reset the alignment of each item to left-to-right - .govuk-header__navigation-item { - text-align: left; - } - -} - // Additional padding-bottom override, following the GOV.UK Frontend spacing scale: // https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale .govuk-\!-padding-bottom-12 { diff --git a/app/templates/admin_template.html b/app/templates/admin_template.html index 4398a1900..9a00bbad2 100644 --- a/app/templates/admin_template.html +++ b/app/templates/admin_template.html @@ -124,7 +124,8 @@ {{ govukHeader({ "homepageUrl": url_for('main.show_accounts_or_dashboard'), "productName": "Notify", - "navigation": navigation + "navigation": navigation, + "navigationClasses": "govuk-header__navigation--end" }) }} {% endblock %}