diff --git a/CHANGELOG.md b/CHANGELOG.md index 1937c708e5..eab2cf3848 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,33 @@ If you were using the `_.scss` files, use the component's `_inde We made this change in [#6761: Deprecate `_.scss` files](https://github.com/alphagov/govuk-frontend/pull/6761). +#### Use `color: govuk-functional-colour(text)` to set the text colour + +We've updated how the text colour changes to pure black when printing. Instead of each use of the text colour needing to be followed by an `@media print` query, GOV.UK Frontend now changes the value of the `--govuk-text-colour` custom property in a single media query: + +```scss +// Previously +// For each use of the `text` functional colour through `govuk-functional-colour('text')` +color: var(--govuk-text-colour, #0b0c0c); + +@media print { + color: var(--govuk-print-text-colour, #000); +} + +// Now +// Only once at the start of the compiled CSS +:root { --govuk-text-colour: #0b0c0c; } +@media print { + :root { --govuk-text-colour: var(--govuk-print-text-colour, #000); } +} +``` + +This change allows you to simplify how the text colour is applied to your CSS rulesets. You can now use a single `color` declaration rather than the previous `govuk-text-colour` mixin call. + +Replace your `@include govuk-text-colour;` mixin calls with `color: govuk-functional-colour(text)`, as we'll be removing the `govuk-text-colour` mixin in a future breaking release. + +We made this change in [pull request #6427: Use custom properties to switch print text to pure black](https://github.com/alphagov/govuk-frontend/pull/6427). + ### Fixes We've made fixes to GOV.UK Frontend in the following pull requests: diff --git a/packages/govuk-frontend/src/govuk/components/accordion/_index.scss b/packages/govuk-frontend/src/govuk/components/accordion/_index.scss index e44a331c48..8660fb2eea 100644 --- a/packages/govuk-frontend/src/govuk/components/accordion/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/accordion/_index.scss @@ -25,11 +25,11 @@ .govuk-accordion__section-button { @include govuk-font($size: 24, $weight: bold); - @include govuk-text-colour; display: block; margin-bottom: 0; padding-top: govuk-spacing(3); + color: govuk-functional-colour(text); } // Remove the bottom margin from the last item inside the content diff --git a/packages/govuk-frontend/src/govuk/components/breadcrumbs/_index.scss b/packages/govuk-frontend/src/govuk/components/breadcrumbs/_index.scss index 43b9832cfb..ecb98b0579 100644 --- a/packages/govuk-frontend/src/govuk/components/breadcrumbs/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/breadcrumbs/_index.scss @@ -24,10 +24,10 @@ .govuk-breadcrumbs { @include govuk-font($size: $font-size); - @include govuk-text-colour; margin-top: govuk-spacing(3); margin-bottom: govuk-spacing(2); + color: govuk-functional-colour(text); } .govuk-breadcrumbs__list { diff --git a/packages/govuk-frontend/src/govuk/components/checkboxes/_index.scss b/packages/govuk-frontend/src/govuk/components/checkboxes/_index.scss index 27a012c732..1c8021f42a 100644 --- a/packages/govuk-frontend/src/govuk/components/checkboxes/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/checkboxes/_index.scss @@ -146,10 +146,12 @@ .govuk-checkboxes__divider { @include govuk-font($size: 19); - @include govuk-text-colour; + $govuk-divider-size: $govuk-checkboxes-size !default; width: $govuk-divider-size; + margin-bottom: govuk-spacing(2); + color: govuk-functional-colour(text); text-align: center; } diff --git a/packages/govuk-frontend/src/govuk/components/details/_index.scss b/packages/govuk-frontend/src/govuk/components/details/_index.scss index 6840b2b703..2d2e95ac91 100644 --- a/packages/govuk-frontend/src/govuk/components/details/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/details/_index.scss @@ -3,10 +3,10 @@ @include govuk-exports("govuk/component/details") { .govuk-details { @include govuk-font($size: 19); - @include govuk-text-colour; @include govuk-responsive-margin(6, "bottom"); display: block; + color: govuk-functional-colour(text); } .govuk-details__summary { diff --git a/packages/govuk-frontend/src/govuk/components/error-summary/_index.scss b/packages/govuk-frontend/src/govuk/components/error-summary/_index.scss index 556d7d552e..810580c68d 100644 --- a/packages/govuk-frontend/src/govuk/components/error-summary/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/error-summary/_index.scss @@ -5,12 +5,12 @@ @include govuk-exports("govuk/component/error-summary") { .govuk-error-summary { @include govuk-font($size: 19); - @include govuk-text-colour; @include govuk-responsive-padding(4); @include govuk-responsive-margin(8, "bottom"); border: $govuk-border-width solid; border-color: govuk-functional-colour(error); + color: govuk-functional-colour(text); &:focus { outline: $govuk-focus-width solid; diff --git a/packages/govuk-frontend/src/govuk/components/fieldset/_index.scss b/packages/govuk-frontend/src/govuk/components/fieldset/_index.scss index a89c6a601f..2f135dde58 100644 --- a/packages/govuk-frontend/src/govuk/components/fieldset/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/fieldset/_index.scss @@ -21,7 +21,6 @@ .govuk-fieldset__legend { @include govuk-font($size: 19); - @include govuk-text-colour; // Fix legend text wrapping in Edge and IE // 1. IE9-11 & Edge 12-13 @@ -31,6 +30,7 @@ max-width: 100%; // 1 margin-bottom: govuk-spacing(2); padding: 0; + color: govuk-functional-colour(text); white-space: normal; // 1 } diff --git a/packages/govuk-frontend/src/govuk/components/file-upload/_index.scss b/packages/govuk-frontend/src/govuk/components/file-upload/_index.scss index 5dfed9618d..615ca5bdd7 100644 --- a/packages/govuk-frontend/src/govuk/components/file-upload/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/file-upload/_index.scss @@ -13,10 +13,11 @@ .govuk-file-upload { @include govuk-font($size: 19); - @include govuk-text-colour; + max-width: 100%; margin-left: -$component-padding; padding: $component-padding; + color: govuk-functional-colour(text); // The default file upload button in Safari does not support setting a // custom font-size. Set `-webkit-appearance` to `button` to drop out of the diff --git a/packages/govuk-frontend/src/govuk/components/inset-text/_index.scss b/packages/govuk-frontend/src/govuk/components/inset-text/_index.scss index f699856fe5..f876e7ce96 100644 --- a/packages/govuk-frontend/src/govuk/components/inset-text/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/inset-text/_index.scss @@ -3,8 +3,9 @@ @include govuk-exports("govuk/component/inset-text") { .govuk-inset-text { @include govuk-font($size: 19); - @include govuk-text-colour; + padding: govuk-spacing(3); + // Margin top intended to collapse // This adds an additional 10px to the paragraph above @include govuk-responsive-margin(6, "top"); @@ -14,6 +15,7 @@ border-left: $govuk-border-width-wide solid; border-left-color: govuk-functional-colour(border); + color: govuk-functional-colour(text); > :first-child { margin-top: 0; diff --git a/packages/govuk-frontend/src/govuk/components/label/_index.scss b/packages/govuk-frontend/src/govuk/components/label/_index.scss index 68ff66f0f1..aa3e17b5bb 100644 --- a/packages/govuk-frontend/src/govuk/components/label/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/label/_index.scss @@ -3,11 +3,11 @@ @include govuk-exports("govuk/component/label") { .govuk-label { @include govuk-font($size: 19); - @include govuk-text-colour; display: block; margin-bottom: govuk-spacing(1); + color: govuk-functional-colour(text); } // Modifiers that make labels look more like their equivalent headings diff --git a/packages/govuk-frontend/src/govuk/components/notification-banner/_index.scss b/packages/govuk-frontend/src/govuk/components/notification-banner/_index.scss index 8b0d90a394..cd6a226c23 100644 --- a/packages/govuk-frontend/src/govuk/components/notification-banner/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/notification-banner/_index.scss @@ -42,9 +42,9 @@ .govuk-notification-banner__content { $padding-tablet: govuk-spacing(4); - @include govuk-text-colour; padding: govuk-spacing(3); + color: govuk-functional-colour(text); background-color: govuk-functional-colour(body-background); @media #{govuk-from-breakpoint(tablet)} { diff --git a/packages/govuk-frontend/src/govuk/components/phase-banner/_index.scss b/packages/govuk-frontend/src/govuk/components/phase-banner/_index.scss index 1c740b3b3c..698ff40716 100644 --- a/packages/govuk-frontend/src/govuk/components/phase-banner/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/phase-banner/_index.scss @@ -20,10 +20,10 @@ .govuk-phase-banner__content { @include govuk-font($size: 16); - @include govuk-text-colour; display: table; margin: 0; + color: govuk-functional-colour(text); } .govuk-phase-banner__content__tag { diff --git a/packages/govuk-frontend/src/govuk/components/radios/_index.scss b/packages/govuk-frontend/src/govuk/components/radios/_index.scss index 8ccaab3b4b..cf3cbf53b8 100644 --- a/packages/govuk-frontend/src/govuk/components/radios/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/radios/_index.scss @@ -164,10 +164,12 @@ .govuk-radios__divider { @include govuk-font($size: 19); - @include govuk-text-colour; + $govuk-divider-size: $govuk-radios-size !default; width: $govuk-divider-size; + margin-bottom: govuk-spacing(2); + color: govuk-functional-colour(text); text-align: center; } diff --git a/packages/govuk-frontend/src/govuk/components/summary-list/_index.scss b/packages/govuk-frontend/src/govuk/components/summary-list/_index.scss index 3e0f056213..0c4f6d4e16 100644 --- a/packages/govuk-frontend/src/govuk/components/summary-list/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/summary-list/_index.scss @@ -3,15 +3,21 @@ @include govuk-exports("govuk/component/summary-list") { .govuk-summary-list { @include govuk-font($size: 19); - @include govuk-text-colour; + + color: govuk-functional-colour(text); + @media #{govuk-from-breakpoint(tablet)} { display: table; width: 100%; table-layout: fixed; // Required to allow us to wrap words that overflow. border-collapse: collapse; } + + // Keep margins together + // stylelint-disable order/properties-order margin: 0; // Reset default user agent styles @include govuk-responsive-margin(6, "bottom"); + // stylelint-enable order/properties-order } .govuk-summary-list__row { @@ -211,8 +217,8 @@ .govuk-summary-card__title { @include govuk-font($size: 19, $weight: bold); - @include govuk-text-colour; margin: govuk-spacing(1) govuk-spacing(4) govuk-spacing(2) 0; + color: govuk-functional-colour(text); @media #{govuk-from-breakpoint(tablet)} { margin-bottom: govuk-spacing(1); diff --git a/packages/govuk-frontend/src/govuk/components/table/_index.scss b/packages/govuk-frontend/src/govuk/components/table/_index.scss index 9915147831..4f7d355c48 100644 --- a/packages/govuk-frontend/src/govuk/components/table/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/table/_index.scss @@ -3,12 +3,13 @@ @include govuk-exports("govuk/component/table") { .govuk-table { @include govuk-font($size: 19); - @include govuk-text-colour; + width: 100%; @include govuk-responsive-margin(6, "bottom"); border-spacing: 0; border-collapse: collapse; + color: govuk-functional-colour(text); } // Modifier for tables with a lot of data. Tables with lots of data benefit diff --git a/packages/govuk-frontend/src/govuk/components/tabs/_index.scss b/packages/govuk-frontend/src/govuk/components/tabs/_index.scss index 7a403c5309..05f3c75af6 100644 --- a/packages/govuk-frontend/src/govuk/components/tabs/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/tabs/_index.scss @@ -12,8 +12,9 @@ // user agent font size overrides the inherited font size @include govuk-font-size($size: 19); @include govuk-typography-weight-regular; - @include govuk-text-colour; + margin-bottom: govuk-spacing(2); + color: govuk-functional-colour(text); } .govuk-tabs__list { @@ -27,10 +28,10 @@ margin-left: govuk-spacing(5); &::before { - @include govuk-text-colour; content: "\2014 "; // "— " margin-left: govuk-spacing(-5); padding-right: govuk-spacing(1); + color: govuk-functional-colour(text); } } diff --git a/packages/govuk-frontend/src/govuk/components/task-list/_index.scss b/packages/govuk-frontend/src/govuk/components/task-list/_index.scss index 23d6a896f2..4dc833dac6 100644 --- a/packages/govuk-frontend/src/govuk/components/task-list/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/task-list/_index.scss @@ -45,16 +45,18 @@ .govuk-task-list__name-and-hint { display: table-cell; + + color: govuk-functional-colour(text); vertical-align: top; - @include govuk-text-colour; } .govuk-task-list__status { display: table-cell; padding-left: govuk-spacing(2); + + color: govuk-functional-colour(text); text-align: right; vertical-align: top; - @include govuk-text-colour; } .govuk-task-list__status--cannot-start-yet { diff --git a/packages/govuk-frontend/src/govuk/components/warning-text/_index.scss b/packages/govuk-frontend/src/govuk/components/warning-text/_index.scss index e4fc79af8a..72859c8338 100644 --- a/packages/govuk-frontend/src/govuk/components/warning-text/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/warning-text/_index.scss @@ -55,9 +55,9 @@ } .govuk-warning-text__text { - @include govuk-text-colour; display: block; padding-left: 45px; + color: govuk-functional-colour(text); // While `` is styled `bold` or `bolder` by user-agents // this can be reset by the app's stylesheet font-weight: inherit; diff --git a/packages/govuk-frontend/src/govuk/core/_lists.scss b/packages/govuk-frontend/src/govuk/core/_lists.scss index 5af1663d18..f503bf6b84 100644 --- a/packages/govuk-frontend/src/govuk/core/_lists.scss +++ b/packages/govuk-frontend/src/govuk/core/_lists.scss @@ -1,11 +1,16 @@ @include govuk-exports("govuk/core/lists") { %govuk-list { @include govuk-font($size: 19); - @include govuk-text-colour; + + // Keep margin configuration next to each other + // stylelint-disable order/order-properties margin-top: 0; @include govuk-responsive-margin(4, "bottom"); + // stylelint-enable order/order-properties + padding-left: 0; list-style-type: none; + color: govuk-functional-colour(text); // Add a top margin for nested lists %govuk-list { diff --git a/packages/govuk-frontend/src/govuk/core/_typography.scss b/packages/govuk-frontend/src/govuk/core/_typography.scss index 039473ff8d..1d385e6e54 100644 --- a/packages/govuk-frontend/src/govuk/core/_typography.scss +++ b/packages/govuk-frontend/src/govuk/core/_typography.scss @@ -2,13 +2,16 @@ // Headings %govuk-heading-xl { - @include govuk-text-colour; @include govuk-font($size: 48, $weight: bold); display: block; + // Keep margin configuration next to each other + // stylelint-disable order/order-properties margin-top: 0; + color: govuk-functional-colour(text); @include govuk-responsive-margin(8, "bottom"); + // stylelint-enable order/order-properties } .govuk-heading-xl { @@ -16,13 +19,16 @@ } %govuk-heading-l { - @include govuk-text-colour; @include govuk-font($size: 36, $weight: bold); display: block; + // Keep margin configuration next to each other + // stylelint-disable order/order-properties margin-top: 0; + color: govuk-functional-colour(text); @include govuk-responsive-margin(6, "bottom"); + // stylelint-enable order/order-properties } .govuk-heading-l { @@ -30,13 +36,16 @@ } %govuk-heading-m { - @include govuk-text-colour; @include govuk-font($size: 24, $weight: bold); display: block; + // Keep margin configuration next to each other + // stylelint-disable order/order-properties margin-top: 0; + color: govuk-functional-colour(text); @include govuk-responsive-margin(4, "bottom"); + // stylelint-enable order/order-properties } .govuk-heading-m { @@ -44,13 +53,16 @@ } %govuk-heading-s { - @include govuk-text-colour; @include govuk-font($size: 19, $weight: bold); display: block; + // Keep margin configuration next to each other + // stylelint-disable order/order-properties margin-top: 0; + color: govuk-functional-colour(text); @include govuk-responsive-margin(4, "bottom"); + // stylelint-enable order/order-properties } .govuk-heading-s { @@ -93,11 +105,14 @@ // Body (paragraphs) %govuk-body-l { - @include govuk-text-colour; + color: govuk-functional-colour(text); @include govuk-font($size: 24); + // Keep margin configuration next to each other + // stylelint-disable order/properties-order margin-top: 0; @include govuk-responsive-margin(6, "bottom"); + // stylelint-enable order/properties-order } .govuk-body-l { @@ -105,11 +120,14 @@ } %govuk-body-m { - @include govuk-text-colour; + color: govuk-functional-colour(text); @include govuk-font($size: 19); + // Keep margin configuration next to each other + // stylelint-disable order/properties-order margin-top: 0; @include govuk-responsive-margin(4, "bottom"); + // stylelint-enable order/properties-order } .govuk-body-m { @@ -117,11 +135,14 @@ } %govuk-body-s { - @include govuk-text-colour; + color: govuk-functional-colour(text); @include govuk-font($size: 16); + // Keep margin configuration next to each other + // stylelint-disable order/properties-order margin-top: 0; @include govuk-responsive-margin(4, "bottom"); + // stylelint-enable order/properties-order } .govuk-body-s { diff --git a/packages/govuk-frontend/src/govuk/custom-properties/_functional-colours.scss b/packages/govuk-frontend/src/govuk/custom-properties/_functional-colours.scss index e0432ea2e4..f33b5cbca9 100644 --- a/packages/govuk-frontend/src/govuk/custom-properties/_functional-colours.scss +++ b/packages/govuk-frontend/src/govuk/custom-properties/_functional-colours.scss @@ -1,3 +1,6 @@ +@use "sass:map"; +@use "sass:meta"; + @import "../settings/custom-properties"; @import "../settings/colours-functional"; @import "../tools/exports"; @@ -9,11 +12,14 @@ @if $govuk-output-custom-properties { @each $name, $value in $govuk-functional-colours { --govuk-#{$name}-colour: #{_govuk-resolve-colour($value)}; - } - @media print { - // Use 'true black' to avoid printers using colour ink to print body text - --govuk-text-colour: #{govuk-functional-colour("print-text")}; + @if meta.type-of($value) == "map" and map.has-key($value, "media") { + @each $query, $media-value in map.get($value, "media") { + @media (#{$query}) { + --govuk-#{$name}-colour: #{_govuk-resolve-colour($media-value)}; + } + } + } } } } diff --git a/packages/govuk-frontend/src/govuk/helpers/_links.scss b/packages/govuk-frontend/src/govuk/helpers/_links.scss index 2d57218a6d..4b975d7fe8 100644 --- a/packages/govuk-frontend/src/govuk/helpers/_links.scss +++ b/packages/govuk-frontend/src/govuk/helpers/_links.scss @@ -223,12 +223,12 @@ @mixin govuk-link-style-text { &:link, &:visited { - @include govuk-text-colour; + color: govuk-functional-colour(text); } &:active, &:focus { - @include govuk-text-colour; + color: govuk-functional-colour(text); } } diff --git a/packages/govuk-frontend/src/govuk/helpers/_typography.scss b/packages/govuk-frontend/src/govuk/helpers/_typography.scss index 542982c4a0..a517860a90 100644 --- a/packages/govuk-frontend/src/govuk/helpers/_typography.scss +++ b/packages/govuk-frontend/src/govuk/helpers/_typography.scss @@ -36,9 +36,15 @@ /// /// Sets the text colour, including a suitable override for print. /// +/// @deprecated /// @access public @mixin govuk-text-colour { + @include _warning( + "govuk-text-colour", + "The `govuk-text-colour` mixin is deprecated. Use `color: govuk-colour(text)` instead." + ); + color: govuk-functional-colour(text); } diff --git a/packages/govuk-frontend/src/govuk/helpers/typography.unit.test.js b/packages/govuk-frontend/src/govuk/helpers/typography.unit.test.js index 5900d8ee24..b2f0b62e0b 100644 --- a/packages/govuk-frontend/src/govuk/helpers/typography.unit.test.js +++ b/packages/govuk-frontend/src/govuk/helpers/typography.unit.test.js @@ -135,6 +135,27 @@ describe('@mixin govuk-typography-common', () => { }) }) +describe('@mixin govuk-text-colour', () => { + it('throws a deprecation warning if used', async () => { + const sass = ` + ${sassBootstrap} + + .foo { + @include govuk-text-colour; + } + ` + + await compileSassString(sass, sassConfig) + + // Expect our mocked @warn function to have been called once with a single + // argument, which should be the deprecation notice + expect(mockWarnFunction).toHaveBeenCalledWith( + 'The `govuk-text-colour` mixin is deprecated. Use `color: govuk-colour(text)` instead. To silence this warning, update $govuk-suppressed-warnings with key: "govuk-text-colour"', + expect.anything() + ) + }) +}) + describe('@mixin govuk-font-tabular-numbers', () => { it('enables tabular numbers opentype feature flags', async () => { const sass = ` diff --git a/packages/govuk-frontend/src/govuk/settings/_colours-functional.scss b/packages/govuk-frontend/src/govuk/settings/_colours-functional.scss index 9c0af24f0f..e22b38e677 100644 --- a/packages/govuk-frontend/src/govuk/settings/_colours-functional.scss +++ b/packages/govuk-frontend/src/govuk/settings/_colours-functional.scss @@ -19,7 +19,11 @@ $govuk-default-functional-colours: ( name: "blue" ), "text": ( - name: "black" + name: "black", + media: ( + print: #000000, + "prefers-contrast: more": #000000 + ) ), // The background colour of the template. This is intended to be the same // as `surface-background` for the purposes of making the Footer and Cookie @@ -59,7 +63,13 @@ $govuk-default-functional-colours: ( // Used in for example borders, separators, rules and keylines. "border": ( name: "black", - variant: "tint-80" + variant: "tint-80", + media: ( + "prefers-contrast: more": ( + name: "black", + variant: "tint-50" + ) + ) ), // Used for form inputs and controls "input-border": ( diff --git a/tests/sass-tests/__snapshots__/all-components-with-config.integration.test.mjs.snap b/tests/sass-tests/__snapshots__/all-components-with-config.integration.test.mjs.snap index b04226af92..b5c96b1ccc 100644 --- a/tests/sass-tests/__snapshots__/all-components-with-config.integration.test.mjs.snap +++ b/tests/sass-tests/__snapshots__/all-components-with-config.integration.test.mjs.snap @@ -253,11 +253,11 @@ exports[`All components, with configuration works when user @imports everything font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); margin-top: 0; margin-bottom: 15px; padding-left: 0; list-style-type: none; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-list { @@ -315,7 +315,6 @@ exports[`All components, with configuration works when user @imports everything .govuk-heading-xl { - color: var(--govuk-text-colour, #0b0c0c); font-family: "GDS Transport", arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -324,6 +323,7 @@ exports[`All components, with configuration works when user @imports everything line-height: 1.09375; display: block; margin-top: 0; + color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 30px; } @media print { @@ -350,7 +350,6 @@ exports[`All components, with configuration works when user @imports everything } .govuk-heading-l { - color: var(--govuk-text-colour, #0b0c0c); font-family: "GDS Transport", arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -359,6 +358,7 @@ exports[`All components, with configuration works when user @imports everything line-height: 1.1111111111; display: block; margin-top: 0; + color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 20px; } @media print { @@ -385,7 +385,6 @@ exports[`All components, with configuration works when user @imports everything } .govuk-heading-m { - color: var(--govuk-text-colour, #0b0c0c); font-family: "GDS Transport", arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -394,6 +393,7 @@ exports[`All components, with configuration works when user @imports everything line-height: 1.1904761905; display: block; margin-top: 0; + color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 15px; } @media print { @@ -420,7 +420,6 @@ exports[`All components, with configuration works when user @imports everything } .govuk-heading-s { - color: var(--govuk-text-colour, #0b0c0c); font-family: "GDS Transport", arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -429,6 +428,7 @@ exports[`All components, with configuration works when user @imports everything line-height: 1.3157894737; display: block; margin-top: 0; + color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 15px; } @media print { @@ -1714,10 +1714,10 @@ exports[`All components, with configuration works when user @imports everything font-weight: 700; font-size: 1.3125rem; line-height: 1.1904761905; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 0; padding-top: 15px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-accordion__section-button { @@ -2283,9 +2283,9 @@ exports[`All components, with configuration works when user @imports everything font-weight: 400; font-size: 1rem; line-height: 1.25; - color: var(--govuk-text-colour, #0b0c0c); margin-top: 15px; margin-bottom: 10px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-breadcrumbs { @@ -3061,9 +3061,9 @@ exports[`All components, with configuration works when user @imports everything font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 5px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-label { @@ -3820,12 +3820,12 @@ exports[`All components, with configuration works when user @imports everything font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); box-sizing: border-box; display: table; max-width: 100%; margin-bottom: 10px; padding: 0; + color: var(--govuk-text-colour, #0b0c0c); white-space: normal; } @media print { @@ -4174,9 +4174,9 @@ exports[`All components, with configuration works when user @imports everything font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); width: 40px; margin-bottom: 10px; + color: var(--govuk-text-colour, #0b0c0c); text-align: center; } @media print { @@ -5466,9 +5466,9 @@ exports[`All components, with configuration works when user @imports everything font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 20px; display: block; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-details { @@ -5783,11 +5783,11 @@ exports[`All components, with configuration works when user @imports everything font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); padding: 15px; margin-bottom: 30px; border: 5px solid; border-color: var(--govuk-error-colour, #ca3535); + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-error-summary { @@ -6564,10 +6564,10 @@ exports[`All components, with configuration works when user @imports everything font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); max-width: 100%; margin-left: -5px; padding: 5px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-file-upload { @@ -7789,13 +7789,13 @@ exports[`All components, with configuration works when user @imports everything font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); padding: 15px; margin-top: 20px; margin-bottom: 20px; clear: both; border-left: 10px solid; border-left-color: var(--govuk-border-colour, #cecece); + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-inset-text { @@ -8047,8 +8047,8 @@ exports[`All components, with configuration works when user @imports everything } .govuk-notification-banner__content { - color: var(--govuk-text-colour, #0b0c0c); padding: 15px; + color: var(--govuk-text-colour, #0b0c0c); background-color: var(--govuk-body-background-colour, #ffffff); } @media (min-width: 40.0625em) { @@ -8579,7 +8579,7 @@ exports[`All components, with configuration works when user @imports everything @media print { .govuk-panel--confirmation { border-color: currentcolor; - color: var(--govuk-print-text-colour, #000000); + color: var(--govuk-text-colour, #0b0c0c); background: none; } } @@ -9391,9 +9391,9 @@ exports[`All components, with configuration works when user @imports everything font-weight: 400; font-size: 1rem; line-height: 1.25; - color: var(--govuk-text-colour, #0b0c0c); display: table; margin: 0; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-phase-banner__content { @@ -9946,9 +9946,9 @@ exports[`All components, with configuration works when user @imports everything font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); width: 40px; margin-bottom: 10px; + color: var(--govuk-text-colour, #0b0c0c); text-align: center; } @media print { @@ -11220,8 +11220,8 @@ exports[`All components, with configuration works when user @imports everything font-weight: 700; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); margin: 5px 20px 10px 0; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-summary-card__title { @@ -11383,11 +11383,11 @@ exports[`All components, with configuration works when user @imports everything font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); width: 100%; margin-bottom: 20px; border-spacing: 0; border-collapse: collapse; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-table { @@ -11621,8 +11621,8 @@ exports[`All components, with configuration works when user @imports everything font-size: 1.1875rem; line-height: 1.3157894737; font-weight: 400; - color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 10px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-tabs__title { @@ -11647,10 +11647,10 @@ exports[`All components, with configuration works when user @imports everything margin-left: 25px; } .govuk-tabs__list-item::before { - color: var(--govuk-text-colour, #0b0c0c); content: "—"; margin-left: -25px; padding-right: 5px; + color: var(--govuk-text-colour, #0b0c0c); } .govuk-tabs__tab { @@ -12082,16 +12082,16 @@ exports[`All components, with configuration works when user @imports everything .govuk-task-list__name-and-hint { display: table-cell; - vertical-align: top; color: var(--govuk-text-colour, #0b0c0c); + vertical-align: top; } .govuk-task-list__status { display: table-cell; padding-left: 10px; + color: var(--govuk-text-colour, #0b0c0c); text-align: right; vertical-align: top; - color: var(--govuk-text-colour, #0b0c0c); } .govuk-task-list__status--cannot-start-yet { @@ -12582,9 +12582,9 @@ exports[`All components, with configuration works when user @imports everything } .govuk-warning-text__text { - color: var(--govuk-text-colour, #0b0c0c); display: block; padding-left: 45px; + color: var(--govuk-text-colour, #0b0c0c); font-weight: inherit; } diff --git a/tests/sass-tests/__snapshots__/all-components.integration.test.mjs.snap b/tests/sass-tests/__snapshots__/all-components.integration.test.mjs.snap index 98d90903c7..8601873d5d 100644 --- a/tests/sass-tests/__snapshots__/all-components.integration.test.mjs.snap +++ b/tests/sass-tests/__snapshots__/all-components.integration.test.mjs.snap @@ -253,11 +253,11 @@ exports[`All components works when user @imports everything 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); margin-top: 0; margin-bottom: 15px; padding-left: 0; list-style-type: none; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-list { @@ -315,7 +315,6 @@ exports[`All components works when user @imports everything 1`] = ` .govuk-heading-xl { - color: var(--govuk-text-colour, #0b0c0c); font-family: "GDS Transport", arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -324,6 +323,7 @@ exports[`All components works when user @imports everything 1`] = ` line-height: 1.09375; display: block; margin-top: 0; + color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 30px; } @media print { @@ -350,7 +350,6 @@ exports[`All components works when user @imports everything 1`] = ` } .govuk-heading-l { - color: var(--govuk-text-colour, #0b0c0c); font-family: "GDS Transport", arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -359,6 +358,7 @@ exports[`All components works when user @imports everything 1`] = ` line-height: 1.1111111111; display: block; margin-top: 0; + color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 20px; } @media print { @@ -385,7 +385,6 @@ exports[`All components works when user @imports everything 1`] = ` } .govuk-heading-m { - color: var(--govuk-text-colour, #0b0c0c); font-family: "GDS Transport", arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -394,6 +393,7 @@ exports[`All components works when user @imports everything 1`] = ` line-height: 1.1904761905; display: block; margin-top: 0; + color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 15px; } @media print { @@ -420,7 +420,6 @@ exports[`All components works when user @imports everything 1`] = ` } .govuk-heading-s { - color: var(--govuk-text-colour, #0b0c0c); font-family: "GDS Transport", arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -429,6 +428,7 @@ exports[`All components works when user @imports everything 1`] = ` line-height: 1.3157894737; display: block; margin-top: 0; + color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 15px; } @media print { @@ -1714,10 +1714,10 @@ exports[`All components works when user @imports everything 1`] = ` font-weight: 700; font-size: 1.3125rem; line-height: 1.1904761905; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 0; padding-top: 15px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-accordion__section-button { @@ -2283,9 +2283,9 @@ exports[`All components works when user @imports everything 1`] = ` font-weight: 400; font-size: 1rem; line-height: 1.25; - color: var(--govuk-text-colour, #0b0c0c); margin-top: 15px; margin-bottom: 10px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-breadcrumbs { @@ -3061,9 +3061,9 @@ exports[`All components works when user @imports everything 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 5px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-label { @@ -3820,12 +3820,12 @@ exports[`All components works when user @imports everything 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); box-sizing: border-box; display: table; max-width: 100%; margin-bottom: 10px; padding: 0; + color: var(--govuk-text-colour, #0b0c0c); white-space: normal; } @media print { @@ -4174,9 +4174,9 @@ exports[`All components works when user @imports everything 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); width: 40px; margin-bottom: 10px; + color: var(--govuk-text-colour, #0b0c0c); text-align: center; } @media print { @@ -5466,9 +5466,9 @@ exports[`All components works when user @imports everything 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 20px; display: block; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-details { @@ -5783,11 +5783,11 @@ exports[`All components works when user @imports everything 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); padding: 15px; margin-bottom: 30px; border: 5px solid; border-color: var(--govuk-error-colour, #ca3535); + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-error-summary { @@ -6564,10 +6564,10 @@ exports[`All components works when user @imports everything 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); max-width: 100%; margin-left: -5px; padding: 5px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-file-upload { @@ -7789,13 +7789,13 @@ exports[`All components works when user @imports everything 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); padding: 15px; margin-top: 20px; margin-bottom: 20px; clear: both; border-left: 10px solid; border-left-color: var(--govuk-border-colour, #cecece); + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-inset-text { @@ -8047,8 +8047,8 @@ exports[`All components works when user @imports everything 1`] = ` } .govuk-notification-banner__content { - color: var(--govuk-text-colour, #0b0c0c); padding: 15px; + color: var(--govuk-text-colour, #0b0c0c); background-color: var(--govuk-body-background-colour, #ffffff); } @media (min-width: 40.0625em) { @@ -8579,7 +8579,7 @@ exports[`All components works when user @imports everything 1`] = ` @media print { .govuk-panel--confirmation { border-color: currentcolor; - color: var(--govuk-print-text-colour, #000000); + color: var(--govuk-text-colour, #0b0c0c); background: none; } } @@ -9391,9 +9391,9 @@ exports[`All components works when user @imports everything 1`] = ` font-weight: 400; font-size: 1rem; line-height: 1.25; - color: var(--govuk-text-colour, #0b0c0c); display: table; margin: 0; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-phase-banner__content { @@ -9946,9 +9946,9 @@ exports[`All components works when user @imports everything 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); width: 40px; margin-bottom: 10px; + color: var(--govuk-text-colour, #0b0c0c); text-align: center; } @media print { @@ -11220,8 +11220,8 @@ exports[`All components works when user @imports everything 1`] = ` font-weight: 700; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); margin: 5px 20px 10px 0; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-summary-card__title { @@ -11383,11 +11383,11 @@ exports[`All components works when user @imports everything 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); width: 100%; margin-bottom: 20px; border-spacing: 0; border-collapse: collapse; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-table { @@ -11621,8 +11621,8 @@ exports[`All components works when user @imports everything 1`] = ` font-size: 1.1875rem; line-height: 1.3157894737; font-weight: 400; - color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 10px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-tabs__title { @@ -11647,10 +11647,10 @@ exports[`All components works when user @imports everything 1`] = ` margin-left: 25px; } .govuk-tabs__list-item::before { - color: var(--govuk-text-colour, #0b0c0c); content: "—"; margin-left: -25px; padding-right: 5px; + color: var(--govuk-text-colour, #0b0c0c); } .govuk-tabs__tab { @@ -12082,16 +12082,16 @@ exports[`All components works when user @imports everything 1`] = ` .govuk-task-list__name-and-hint { display: table-cell; - vertical-align: top; color: var(--govuk-text-colour, #0b0c0c); + vertical-align: top; } .govuk-task-list__status { display: table-cell; padding-left: 10px; + color: var(--govuk-text-colour, #0b0c0c); text-align: right; vertical-align: top; - color: var(--govuk-text-colour, #0b0c0c); } .govuk-task-list__status--cannot-start-yet { @@ -12582,9 +12582,9 @@ exports[`All components works when user @imports everything 1`] = ` } .govuk-warning-text__text { - color: var(--govuk-text-colour, #0b0c0c); display: block; padding-left: 45px; + color: var(--govuk-text-colour, #0b0c0c); font-weight: inherit; } diff --git a/tests/sass-tests/__snapshots__/individual-components.integration.test.mjs.snap b/tests/sass-tests/__snapshots__/individual-components.integration.test.mjs.snap index a01b8c879e..27a57a794f 100644 --- a/tests/sass-tests/__snapshots__/individual-components.integration.test.mjs.snap +++ b/tests/sass-tests/__snapshots__/individual-components.integration.test.mjs.snap @@ -146,10 +146,10 @@ exports[`Individual components dist/govuk/components/accordion works when user @ font-weight: 700; font-size: 1.3125rem; line-height: 1.1904761905; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 0; padding-top: 15px; + color: var(--govuk-text-colour, #0b0c0c); } /*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */ /* stylelint-disable-line scss/comment-no-loud */ @font-face { @@ -827,9 +827,9 @@ exports[`Individual components dist/govuk/components/breadcrumbs works when user font-weight: 400; font-size: 1rem; line-height: 1.25; - color: var(--govuk-text-colour, #0b0c0c); margin-top: 15px; margin-bottom: 10px; + color: var(--govuk-text-colour, #0b0c0c); } /*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */ /* stylelint-disable-line scss/comment-no-loud */ @font-face { @@ -1733,9 +1733,9 @@ exports[`Individual components dist/govuk/components/character-count works when font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 5px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-label { @@ -2573,12 +2573,12 @@ exports[`Individual components dist/govuk/components/checkboxes works when user font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); box-sizing: border-box; display: table; max-width: 100%; margin-bottom: 10px; padding: 0; + color: var(--govuk-text-colour, #0b0c0c); white-space: normal; } @media print { @@ -2864,9 +2864,9 @@ exports[`Individual components dist/govuk/components/checkboxes works when user font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 5px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-label { @@ -3050,9 +3050,9 @@ exports[`Individual components dist/govuk/components/checkboxes works when user font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); width: 40px; margin-bottom: 10px; + color: var(--govuk-text-colour, #0b0c0c); text-align: center; } @media print { @@ -4160,9 +4160,9 @@ exports[`Individual components dist/govuk/components/date-input works when user font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 5px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-label { @@ -4688,12 +4688,12 @@ exports[`Individual components dist/govuk/components/date-input works when user font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); box-sizing: border-box; display: table; max-width: 100%; margin-bottom: 10px; padding: 0; + color: var(--govuk-text-colour, #0b0c0c); white-space: normal; } @media print { @@ -4930,9 +4930,9 @@ exports[`Individual components dist/govuk/components/details works when user @im font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 20px; display: block; + color: var(--govuk-text-colour, #0b0c0c); } /*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */ /* stylelint-disable-line scss/comment-no-loud */ @font-face { @@ -5383,11 +5383,11 @@ exports[`Individual components dist/govuk/components/error-summary works when us font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); margin-top: 0; margin-bottom: 15px; padding-left: 0; list-style-type: none; + color: var(--govuk-text-colour, #0b0c0c); } /*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */ /* stylelint-disable-line scss/comment-no-loud */ @font-face { @@ -5466,11 +5466,11 @@ exports[`Individual components dist/govuk/components/error-summary works when us font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); padding: 15px; margin-bottom: 30px; border: 5px solid; border-color: var(--govuk-error-colour, #ca3535); + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-error-summary { @@ -6212,12 +6212,12 @@ exports[`Individual components dist/govuk/components/fieldset works when user @i font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); box-sizing: border-box; display: table; max-width: 100%; margin-bottom: 10px; padding: 0; + color: var(--govuk-text-colour, #0b0c0c); white-space: normal; } /*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */ /* stylelint-disable-line scss/comment-no-loud */ @@ -6760,9 +6760,9 @@ exports[`Individual components dist/govuk/components/file-upload works when user font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 5px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-label { @@ -6850,10 +6850,10 @@ exports[`Individual components dist/govuk/components/file-upload works when user font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); max-width: 100%; margin-left: -5px; padding: 5px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-file-upload { @@ -8310,9 +8310,9 @@ exports[`Individual components dist/govuk/components/input works when user @impo font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 5px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-label { @@ -8699,13 +8699,13 @@ exports[`Individual components dist/govuk/components/inset-text works when user font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); padding: 15px; margin-top: 20px; margin-bottom: 20px; clear: both; border-left: 10px solid; border-left-color: var(--govuk-border-colour, #cecece); + color: var(--govuk-text-colour, #0b0c0c); } /*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */ /* stylelint-disable-line scss/comment-no-loud */ @font-face { @@ -8880,9 +8880,9 @@ exports[`Individual components dist/govuk/components/label works when user @impo font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 5px; + color: var(--govuk-text-colour, #0b0c0c); } /*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */ /* stylelint-disable-line scss/comment-no-loud */ @font-face { @@ -9173,8 +9173,8 @@ exports[`Individual components dist/govuk/components/notification-banner works w } .govuk-notification-banner__content { - color: var(--govuk-text-colour, #0b0c0c); padding: 15px; + color: var(--govuk-text-colour, #0b0c0c); background-color: var(--govuk-body-background-colour, #ffffff); } @media (min-width: 40.0625em) { @@ -9817,7 +9817,7 @@ exports[`Individual components dist/govuk/components/panel works when user @impo @media print { .govuk-panel--confirmation { border-color: currentcolor; - color: var(--govuk-print-text-colour, #000000); + color: var(--govuk-text-colour, #0b0c0c); background: none; } } @@ -10626,9 +10626,9 @@ exports[`Individual components dist/govuk/components/password-input works when u font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 5px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-label { @@ -11240,9 +11240,9 @@ exports[`Individual components dist/govuk/components/phase-banner works when use font-weight: 400; font-size: 1rem; line-height: 1.25; - color: var(--govuk-text-colour, #0b0c0c); display: table; margin: 0; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-phase-banner__content { @@ -11626,12 +11626,12 @@ exports[`Individual components dist/govuk/components/radios works when user @imp font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); box-sizing: border-box; display: table; max-width: 100%; margin-bottom: 10px; padding: 0; + color: var(--govuk-text-colour, #0b0c0c); white-space: normal; } @media print { @@ -11917,9 +11917,9 @@ exports[`Individual components dist/govuk/components/radios works when user @imp font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 5px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-label { @@ -12112,9 +12112,9 @@ exports[`Individual components dist/govuk/components/radios works when user @imp font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); width: 40px; margin-bottom: 10px; + color: var(--govuk-text-colour, #0b0c0c); text-align: center; } @media print { @@ -12646,9 +12646,9 @@ exports[`Individual components dist/govuk/components/select works when user @imp font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 5px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-label { @@ -13758,8 +13758,8 @@ exports[`Individual components dist/govuk/components/summary-list works when use font-weight: 700; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); margin: 5px 20px 10px 0; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-summary-card__title { @@ -13962,11 +13962,11 @@ exports[`Individual components dist/govuk/components/table works when user @impo font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); width: 100%; margin-bottom: 20px; border-spacing: 0; border-collapse: collapse; + color: var(--govuk-text-colour, #0b0c0c); } /*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */ /* stylelint-disable-line scss/comment-no-loud */ @font-face { @@ -14272,8 +14272,8 @@ exports[`Individual components dist/govuk/components/tabs works when user @impor font-size: 1.1875rem; line-height: 1.3157894737; font-weight: 400; - color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 10px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-tabs__title { @@ -14298,10 +14298,10 @@ exports[`Individual components dist/govuk/components/tabs works when user @impor margin-left: 25px; } .govuk-tabs__list-item::before { - color: var(--govuk-text-colour, #0b0c0c); content: "—"; margin-left: -25px; padding-right: 5px; + color: var(--govuk-text-colour, #0b0c0c); } .govuk-tabs__tab { @@ -15021,16 +15021,16 @@ exports[`Individual components dist/govuk/components/task-list works when user @ .govuk-task-list__name-and-hint { display: table-cell; - vertical-align: top; color: var(--govuk-text-colour, #0b0c0c); + vertical-align: top; } .govuk-task-list__status { display: table-cell; padding-left: 10px; + color: var(--govuk-text-colour, #0b0c0c); text-align: right; vertical-align: top; - color: var(--govuk-text-colour, #0b0c0c); } .govuk-task-list__status--cannot-start-yet { @@ -15497,9 +15497,9 @@ exports[`Individual components dist/govuk/components/textarea works when user @i font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 5px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-label { @@ -15836,9 +15836,9 @@ exports[`Individual components dist/govuk/components/warning-text works when use } .govuk-warning-text__text { - color: var(--govuk-text-colour, #0b0c0c); display: block; padding-left: 45px; + color: var(--govuk-text-colour, #0b0c0c); font-weight: inherit; } diff --git a/tests/sass-tests/__snapshots__/itcss-layers.integration.test.mjs.snap b/tests/sass-tests/__snapshots__/itcss-layers.integration.test.mjs.snap index cf81337517..3f8c4ae0aa 100644 --- a/tests/sass-tests/__snapshots__/itcss-layers.integration.test.mjs.snap +++ b/tests/sass-tests/__snapshots__/itcss-layers.integration.test.mjs.snap @@ -307,10 +307,10 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` font-weight: 700; font-size: 1.3125rem; line-height: 1.1904761905; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 0; padding-top: 15px; + color: var(--govuk-text-colour, #0b0c0c); } /*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */ /* stylelint-disable-line scss/comment-no-loud */ @font-face { @@ -891,9 +891,9 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` font-weight: 400; font-size: 1rem; line-height: 1.25; - color: var(--govuk-text-colour, #0b0c0c); margin-top: 15px; margin-bottom: 10px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-breadcrumbs { @@ -1669,9 +1669,9 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); display: block; margin-bottom: 5px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-label { @@ -2428,12 +2428,12 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); box-sizing: border-box; display: table; max-width: 100%; margin-bottom: 10px; padding: 0; + color: var(--govuk-text-colour, #0b0c0c); white-space: normal; } @media print { @@ -2782,9 +2782,9 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); width: 40px; margin-bottom: 10px; + color: var(--govuk-text-colour, #0b0c0c); text-align: center; } @media print { @@ -4074,9 +4074,9 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 20px; display: block; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-details { @@ -4390,11 +4390,11 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); margin-top: 0; margin-bottom: 15px; padding-left: 0; list-style-type: none; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-list { @@ -4458,11 +4458,11 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); padding: 15px; margin-bottom: 30px; border: 5px solid; border-color: var(--govuk-error-colour, #ca3535); + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-error-summary { @@ -5239,10 +5239,10 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); max-width: 100%; margin-left: -5px; padding: 5px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-file-upload { @@ -6464,13 +6464,13 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); padding: 15px; margin-top: 20px; margin-bottom: 20px; clear: both; border-left: 10px solid; border-left-color: var(--govuk-border-colour, #cecece); + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-inset-text { @@ -6722,8 +6722,8 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` } .govuk-notification-banner__content { - color: var(--govuk-text-colour, #0b0c0c); padding: 15px; + color: var(--govuk-text-colour, #0b0c0c); background-color: var(--govuk-body-background-colour, #ffffff); } @media (min-width: 40.0625em) { @@ -7254,7 +7254,7 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` @media print { .govuk-panel--confirmation { border-color: currentcolor; - color: var(--govuk-print-text-colour, #000000); + color: var(--govuk-text-colour, #0b0c0c); background: none; } } @@ -8066,9 +8066,9 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` font-weight: 400; font-size: 1rem; line-height: 1.25; - color: var(--govuk-text-colour, #0b0c0c); display: table; margin: 0; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-phase-banner__content { @@ -8621,9 +8621,9 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); width: 40px; margin-bottom: 10px; + color: var(--govuk-text-colour, #0b0c0c); text-align: center; } @media print { @@ -9895,8 +9895,8 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` font-weight: 700; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); margin: 5px 20px 10px 0; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-summary-card__title { @@ -10058,11 +10058,11 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); width: 100%; margin-bottom: 20px; border-spacing: 0; border-collapse: collapse; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-table { @@ -10296,8 +10296,8 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` font-size: 1.1875rem; line-height: 1.3157894737; font-weight: 400; - color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 10px; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-tabs__title { @@ -10322,10 +10322,10 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` margin-left: 25px; } .govuk-tabs__list-item::before { - color: var(--govuk-text-colour, #0b0c0c); content: "—"; margin-left: -25px; padding-right: 5px; + color: var(--govuk-text-colour, #0b0c0c); } .govuk-tabs__tab { @@ -10757,16 +10757,16 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` .govuk-task-list__name-and-hint { display: table-cell; - vertical-align: top; color: var(--govuk-text-colour, #0b0c0c); + vertical-align: top; } .govuk-task-list__status { display: table-cell; padding-left: 10px; + color: var(--govuk-text-colour, #0b0c0c); text-align: right; vertical-align: top; - color: var(--govuk-text-colour, #0b0c0c); } .govuk-task-list__status--cannot-start-yet { @@ -11257,9 +11257,9 @@ exports[`ITCSS layers components works when user @imports the layer 1`] = ` } .govuk-warning-text__text { - color: var(--govuk-text-colour, #0b0c0c); display: block; padding-left: 45px; + color: var(--govuk-text-colour, #0b0c0c); font-weight: inherit; } @@ -11519,11 +11519,11 @@ exports[`ITCSS layers core works when user @imports the layer 1`] = ` font-weight: 400; font-size: 1.1875rem; line-height: 1.3157894737; - color: var(--govuk-text-colour, #0b0c0c); margin-top: 0; margin-bottom: 15px; padding-left: 0; list-style-type: none; + color: var(--govuk-text-colour, #0b0c0c); } @media print { .govuk-list { @@ -11581,7 +11581,6 @@ exports[`ITCSS layers core works when user @imports the layer 1`] = ` .govuk-heading-xl { - color: var(--govuk-text-colour, #0b0c0c); font-family: "GDS Transport", arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -11590,6 +11589,7 @@ exports[`ITCSS layers core works when user @imports the layer 1`] = ` line-height: 1.09375; display: block; margin-top: 0; + color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 30px; } @media print { @@ -11616,7 +11616,6 @@ exports[`ITCSS layers core works when user @imports the layer 1`] = ` } .govuk-heading-l { - color: var(--govuk-text-colour, #0b0c0c); font-family: "GDS Transport", arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -11625,6 +11624,7 @@ exports[`ITCSS layers core works when user @imports the layer 1`] = ` line-height: 1.1111111111; display: block; margin-top: 0; + color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 20px; } @media print { @@ -11651,7 +11651,6 @@ exports[`ITCSS layers core works when user @imports the layer 1`] = ` } .govuk-heading-m { - color: var(--govuk-text-colour, #0b0c0c); font-family: "GDS Transport", arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -11660,6 +11659,7 @@ exports[`ITCSS layers core works when user @imports the layer 1`] = ` line-height: 1.1904761905; display: block; margin-top: 0; + color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 15px; } @media print { @@ -11686,7 +11686,6 @@ exports[`ITCSS layers core works when user @imports the layer 1`] = ` } .govuk-heading-s { - color: var(--govuk-text-colour, #0b0c0c); font-family: "GDS Transport", arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -11695,6 +11694,7 @@ exports[`ITCSS layers core works when user @imports the layer 1`] = ` line-height: 1.3157894737; display: block; margin-top: 0; + color: var(--govuk-text-colour, #0b0c0c); margin-bottom: 15px; } @media print {