From a9359c64c6f4158ff818ace810cf742a7157b20b Mon Sep 17 00:00:00 2001 From: Patrick Cartlidge Date: Mon, 6 Nov 2023 14:17:08 +0000 Subject: [PATCH] Remove $legacy from govuk-colour govuk-frontend v5 deprecates the `$legacy` param in the `govuk-colour` mixin. Continuing to use it produces warnings for each instance of it in the CSS. It can be safely removed as alphagov/govuk-frontend#3576 notes that `it is non-operational and the parameter is only maintained to prevent compilation errors`. --- .../stylesheets/component_guide/application.scss | 2 +- .../components/_attachment.scss | 2 +- .../components/_checkboxes.scss | 2 +- .../components/_contextual-sidebar.scss | 2 +- .../components/_document-list.scss | 4 ++-- .../components/_govspeak-html-publication.scss | 6 +++--- .../components/_image-card.scss | 4 ++-- .../components/_intervention.scss | 2 +- .../components/_layout-header.scss | 8 ++++---- .../components/_related-navigation.scss | 2 +- .../components/_step-by-step-nav-header.scss | 2 +- .../components/_step-by-step-nav.scss | 10 +++++----- .../components/_subscription-links.scss | 2 +- .../govuk_publishing_components/components/_table.scss | 6 +++--- .../components/govspeak/_advisory.scss | 2 +- .../components/govspeak/_attachment.scss | 4 ++-- .../components/govspeak/_call-to-action.scss | 2 +- .../components/govspeak/_contact.scss | 2 +- .../components/govspeak/_example.scss | 2 +- .../components/govspeak/_footnotes.scss | 2 +- .../components/govspeak/_information-callout.scss | 2 +- .../components/govspeak/_place.scss | 2 +- .../components/govspeak/_tables.scss | 2 +- .../govuk_frontend_support.scss | 4 ++-- 24 files changed, 39 insertions(+), 39 deletions(-) diff --git a/app/assets/stylesheets/component_guide/application.scss b/app/assets/stylesheets/component_guide/application.scss index 82a5d112be..f71ab6117c 100644 --- a/app/assets/stylesheets/component_guide/application.scss +++ b/app/assets/stylesheets/component_guide/application.scss @@ -270,7 +270,7 @@ html { // Rouge syntax highlighting // Based on https://github.com/alphagov/tech-docs-template/blob/master/template/source/stylesheets/palette/_syntax-highlighting.scss -$code-00: scale-color(govuk-colour("light-grey", $legacy: "grey-4"), $lightness: 50%); // Default Background +$code-00: scale-color(govuk-colour("light-grey"), $lightness: 50%); // Default Background $code-01: #f5f5f5; // Lighter Background (Unused) $code-02: #bfc1c3; // Selection Background $code-03: darken($govuk-secondary-text-colour, 2%); // Comments, Invisibles, Line Highlighting diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss b/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss index 976f25e9b5..954b05df8f 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss @@ -7,7 +7,7 @@ $thumbnail-background: govuk-colour("white"); $thumbnail-border-colour: rgba(11, 12, 12, .1); $thumbnail-shadow-colour: rgba(11, 12, 12, .4); $thumbnail-shadow-width: 0 2px 2px; -$thumbnail-icon-border-colour: govuk-colour("mid-grey", $legacy: "grey-3"); +$thumbnail-icon-border-colour: govuk-colour("mid-grey"); .gem-c-attachment { @include govuk-font(19); diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss b/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss index 7ddc075695..857e155e9a 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss @@ -6,7 +6,7 @@ box-sizing: border-box; border-left-style: solid; border-left-width: 4px; - border-color: govuk-colour("mid-grey", $legacy: "grey-2"); + border-color: govuk-colour("mid-grey"); margin-top: govuk-spacing(2); margin-bottom: govuk-spacing(2); padding: govuk-spacing(2) govuk-spacing(4); 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 bcb1474ef2..3dcd5be66a 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss @@ -27,7 +27,7 @@ .gem-c-contextual-sidebar__cta { border-top: 2px solid $govuk-brand-colour; margin-bottom: govuk-spacing(6); - background-color: govuk-colour("light-grey", $legacy: "grey-4"); + background-color: govuk-colour("light-grey"); display: block; padding: 0 govuk-spacing(3) govuk-spacing(3); text-decoration: none; diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss b/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss index 17e4c85991..3760c31f09 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss @@ -53,7 +53,7 @@ } .gem-c-document-list__item-context { - color: govuk-colour("dark-grey", $legacy: "grey-1"); + color: govuk-colour("dark-grey"); } .gem-c-document-list__item-description { @@ -93,7 +93,7 @@ } .gem-c-document-list__item--highlight { - border: 1px solid govuk-colour("mid-grey", $legacy: "grey-2"); + border: 1px solid govuk-colour("mid-grey"); padding: govuk-spacing(6); margin-bottom: govuk-spacing(6); diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss b/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss index bbaaec649e..ff00386e4a 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss @@ -77,7 +77,7 @@ // and make all of thead and tfoot stand out thead, tfoot { - background-color: govuk-colour("light-grey", $legacy: "grey-3"); + background-color: govuk-colour("light-grey"); } thead th, @@ -122,7 +122,7 @@ // total and subtotal rows tr.subtotal > *, tr.total > * { - border-top: 3px solid govuk-colour("mid-grey", $legacy: "grey-2"); + border-top: 3px solid govuk-colour("mid-grey"); } tr.total > *, @@ -133,7 +133,7 @@ // the total is usually in the tfoot, so already has that background colour // but when it's used inside the tbody, it should also be highlighted tr.total { - background-color: govuk-colour("light-grey", $legacy: "grey-3"); + background-color: govuk-colour("light-grey"); } } // stylelint-enable selector-no-qualifying-type diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss b/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss index de05432e08..e60ef44cb6 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss @@ -187,7 +187,7 @@ font-size: 16px; font-size: govuk-px-to-rem(16px); margin: 0 0 calc(govuk-spacing(3) / 2); - color: govuk-colour("dark-grey", $legacy: "grey-1"); + color: govuk-colour("dark-grey"); @include govuk-media-query($from: tablet) { margin-bottom: 0; @@ -213,7 +213,7 @@ } .gem-c-image-card__list-item--text { - color: govuk-colour("dark-grey", $legacy: "grey-1"); + color: govuk-colour("dark-grey"); } .gem-c-image-card__list-item-link { diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss b/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss index 331722e13b..826f1606fa 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss @@ -4,7 +4,7 @@ @include govuk-text-colour; @include govuk-responsive-padding(3); @include govuk-responsive-margin(6, "bottom"); - background-color: govuk-colour("light-grey", $legacy: "grey-4"); + background-color: govuk-colour("light-grey"); border-left: 10px solid $govuk-success-colour; .govuk-body:last-of-type { diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss b/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss index 066cfaf0b8..78e74eaed5 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss @@ -5,7 +5,7 @@ @import "govuk/components/tag/tag"; .gem-c-layout-header--production .govuk-header__container { - border-bottom-color: govuk-colour("red", $legacy: "bright-red"); + border-bottom-color: govuk-colour("red"); } .gem-c-layout-header--integration .govuk-header__container, @@ -18,7 +18,7 @@ } .gem-c-layout-header--development .govuk-header__container { - border-bottom-color: govuk-colour("dark-grey", $legacy: "grey-1"); + border-bottom-color: govuk-colour("dark-grey"); } .gem-c-layout-header--no-bottom-border, @@ -124,7 +124,7 @@ } .gem-c-environment-tag--production { - background-color: govuk-colour("red", $legacy: "bright-red"); + background-color: govuk-colour("red"); } .gem-c-environment-tag--example { @@ -132,7 +132,7 @@ } .gem-c-environment-tag--development { - background-color: govuk-colour("dark-grey", $legacy: "grey-1"); + background-color: govuk-colour("dark-grey"); } .gem-c-environment-tag--staging, diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss b/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss index 5696a4ca21..de155fce71 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss @@ -14,7 +14,7 @@ .gem-c-related-navigation__sub-heading { @include govuk-font(16); - border-top: 1px solid govuk-colour("mid-grey", $legacy: "grey-2"); + border-top: 1px solid govuk-colour("mid-grey"); margin: 0; padding-top: govuk-spacing(3); } diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss b/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss index 71d987f586..49f0c34f45 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss @@ -6,7 +6,7 @@ position: relative; padding: 10px; - background: govuk-colour("light-grey", $legacy: "grey-4"); + background: govuk-colour("light-grey"); border-bottom: solid 1px govuk-colour("blue"); margin-top: govuk-spacing(3); diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss b/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss index 5feaea2179..f3ffefd2d1 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss @@ -3,7 +3,7 @@ $stroke-width: 1px; $number-circle-size: 30px; $number-circle-size-large: 35px; -$top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3"); +$top-border: solid 1px govuk-colour("mid-grey"); @mixin step-nav-vertical-line($line-style: solid) { content: ""; @@ -11,7 +11,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3"); z-index: 2; width: 0; height: 100%; - border-left: $line-style $stroke-width govuk-colour("mid-grey", $legacy: "grey-2"); + border-left: $line-style $stroke-width govuk-colour("mid-grey"); background: govuk-colour("white"); } @@ -263,7 +263,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3"); margin-left: calc($number-circle-size / 4); width: calc($number-circle-size / 2); height: 0; - border-bottom: solid $stroke-width govuk-colour("mid-grey", $legacy: "grey-2"); + border-bottom: solid $stroke-width govuk-colour("mid-grey"); } &::after { @@ -322,7 +322,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3"); .gem-c-step-nav__circle--number { @include step-nav-font(16, $weight: bold, $line-height: 29px); - border: solid $stroke-width govuk-colour("mid-grey", $legacy: "grey-2"); + border: solid $stroke-width govuk-colour("mid-grey"); .gem-c-step-nav--large & { @include step-nav-font(16, $tablet-size: 19, $weight: bold, $line-height: 29px, $tablet-line-height: 34px); @@ -532,7 +532,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3"); .gem-c-step-nav__context { display: inline-block; font-weight: normal; - color: govuk-colour("dark-grey", $legacy: "grey-1"); + color: govuk-colour("dark-grey"); &::before { content: " \2013\00a0"; // dash followed by   diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss b/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss index 2d5d5c073a..2285fb4370 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss @@ -96,7 +96,7 @@ .gem-c-subscription-links__feed-box { padding: govuk-spacing(3); margin-bottom: govuk-spacing(3); - background: govuk-colour("light-grey", $legacy: "grey-3"); + background: govuk-colour("light-grey"); .js-enabled &.js-hidden { display: none; diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_table.scss b/app/assets/stylesheets/govuk_publishing_components/components/_table.scss index e1e66102ca..7a3c10bef0 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_table.scss @@ -2,15 +2,15 @@ @import "govuk/components/table/table"; $table-border-width: 1px; -$table-border-colour: govuk-colour("mid-grey", $legacy: "grey-2"); +$table-border-colour: govuk-colour("mid-grey"); $table-header-border-width: 2px; -$table-header-background-colour: govuk-colour("light-grey", $legacy: "grey-3"); +$table-header-background-colour: govuk-colour("light-grey"); $sort-link-active-colour: govuk-colour("white"); $sort-link-arrow-size: 14px; $sort-link-arrow-size-small: 8px; $sort-link-arrow-spacing: calc($sort-link-arrow-size / 2); $table-row-hover-background-colour: rgba(43, 140, 196, .2); -$table-row-even-background-colour: govuk-colour("light-grey", $legacy: "grey-4"); +$table-row-even-background-colour: govuk-colour("light-grey"); .govuk-table__cell:empty, .govuk-table__cell--empty { diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_advisory.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_advisory.scss index 4abb817bc7..1dd7c7ec0c 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_advisory.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_advisory.scss @@ -25,7 +25,7 @@ $high-alert-border: #cc0000; } &.high-alert { - background-color: govuk-colour("light-grey", $legacy: "grey-3"); + background-color: govuk-colour("light-grey"); border: 1px solid $high-alert-border; } diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss index 2836daea52..bcefe0cdc2 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss @@ -49,8 +49,8 @@ } svg { - fill: govuk-colour("mid-grey", $legacy: "grey-3"); - stroke: govuk-colour("mid-grey", $legacy: "grey-3"); + fill: govuk-colour("mid-grey"); + stroke: govuk-colour("mid-grey"); } } diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss index 382a31dfa8..af5b29c50e 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss @@ -10,7 +10,7 @@ .gem-c-govspeak { .call-to-action { margin: 2em 0; - background-color: govuk-colour("light-grey", $legacy: "grey-3"); + background-color: govuk-colour("light-grey"); padding: 2em; &:first-child { diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss index a96fbba31d..84f5b04237 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss @@ -12,7 +12,7 @@ // .address is used by the `$A` markdown pattern .address, .contact { - border-left: 1px solid govuk-colour("mid-grey", $legacy: "grey-2"); + border-left: 1px solid govuk-colour("mid-grey"); padding-left: govuk-spacing(3); margin-bottom: govuk-spacing(6); margin-top: govuk-spacing(6); diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss index 095535f452..603baa00e1 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss @@ -8,7 +8,7 @@ .govspeak, // Legacy class name that's still used in some content items - needs to be kept until `.govspeak` is removed from the content items. .gem-c-govspeak { .example { - border-left: 10px solid govuk-colour("mid-grey", $legacy: "grey-3"); + border-left: 10px solid govuk-colour("mid-grey"); padding: 1em 0 1em 1em; margin: 2em 0; diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss index 8a12d1c17f..b982c84bf6 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss @@ -14,7 +14,7 @@ .govspeak, // Legacy class name that's still used in some content items - needs to be kept until `.govspeak` is removed from the content items. .gem-c-govspeak { .footnotes { - border-top: 1px solid govuk-colour("mid-grey", $legacy: "grey-2"); + border-top: 1px solid govuk-colour("mid-grey"); margin-top: govuk-spacing(6); padding-top: govuk-spacing(2); diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss index 82a383dbb6..959a26bd22 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss @@ -9,7 +9,7 @@ .govspeak, // Legacy class name that's still used in some content items - needs to be kept until `.govspeak` is removed from the content items. .gem-c-govspeak { .info-notice { - border-left: 10px solid govuk-colour("mid-grey", $legacy: "grey-3"); + border-left: 10px solid govuk-colour("mid-grey"); padding: 1em 0 1em 1em; margin: 2em 0; diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss index c45794c1d5..375927f52d 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss @@ -3,7 +3,7 @@ .gem-c-govspeak { .place { margin: 1.5em 0; - border-bottom: solid 1px govuk-colour("mid-grey", $legacy: "grey-2"); + border-bottom: solid 1px govuk-colour("mid-grey"); padding-bottom: 1.5em; .address { diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss index 9774affa3d..9c4eccab7e 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss @@ -25,7 +25,7 @@ td { vertical-align: top; padding: govuk-spacing(2) govuk-spacing(4) govuk-spacing(2) 0; - border-bottom: 1px solid govuk-colour("mid-grey", $legacy: "grey-2"); + border-bottom: 1px solid govuk-colour("mid-grey"); &:last-child { padding: govuk-spacing(2) 0 govuk-spacing(2) 0; diff --git a/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss b/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss index 504933a5d4..78c7a492cf 100644 --- a/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +++ b/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss @@ -11,9 +11,9 @@ $gem-secondary-button-colour: #00823b; $gem-secondary-button-hover-colour: darken($gem-secondary-button-colour, 5%); $gem-secondary-button-background-colour: govuk-colour("white"); -$gem-secondary-button-hover-background-colour: govuk-colour("light-grey", $legacy: "grey-4"); +$gem-secondary-button-hover-background-colour: govuk-colour("light-grey"); -$gem-quiet-button-colour: govuk-colour("dark-grey", $legacy: "grey-1"); +$gem-quiet-button-colour: govuk-colour("dark-grey"); $gem-quiet-button-hover-colour: darken($gem-quiet-button-colour, 5%); $gem-hover-dark-background: #dddcdb;