Skip to content

Commit

Permalink
Remove $legacy from govuk-colour
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
patrickpatrickpatrick authored and MartinJJones committed Apr 15, 2024
1 parent 3d0de74 commit 65ba637
Show file tree
Hide file tree
Showing 24 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/component_guide/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 > *,
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -124,15 +124,15 @@
}

.gem-c-environment-tag--production {
background-color: govuk-colour("red", $legacy: "bright-red");
background-color: govuk-colour("red");
}

.gem-c-environment-tag--example {
background-color: govuk-colour("bright-purple");
}

.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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
$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: "";
position: absolute;
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");
}

Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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  
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 65ba637

Please sign in to comment.