Skip to content

Commit

Permalink
Remove 'base' import from files in overrides layer
Browse files Browse the repository at this point in the history
Importing files from this layer without first importing the 'base' file was deprecated in #1807. Anyone who was relying on the import should already be seeing warnings. If this change affects them, they'll just need to ensure they're importing the base layer first.

This is part of a change to the way that the base layers (settings, tools and helpers) are imported within different parts of GOV.UK Frontend’s Sass, designed to reduce the time it takes to compile the Sass to CSS.

Remove the tests, which were only checking that the deprecation warning was emitted as expected.
  • Loading branch information
36degrees committed Dec 2, 2021
1 parent fc0ef05 commit 445432a
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 61 deletions.
6 changes: 0 additions & 6 deletions src/govuk/overrides/_display.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
@if not mixin-exists("govuk-exports") {
@warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
}

@import "../base";

// stylelint-disable declaration-no-important
@include govuk-exports("govuk/overrides/display") {
.govuk-\!-display-inline {
Expand Down
6 changes: 0 additions & 6 deletions src/govuk/overrides/_spacing.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
@if not mixin-exists("govuk-exports") {
@warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
}

@import "../base";

////
/// @group overrides
////
Expand Down
6 changes: 0 additions & 6 deletions src/govuk/overrides/_text-align.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
@if not mixin-exists("govuk-exports") {
@warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
}

@import "../base";

// stylelint-disable declaration-no-important
@include govuk-exports("govuk/overrides/text-align") {
.govuk-\!-text-align-left {
Expand Down
6 changes: 0 additions & 6 deletions src/govuk/overrides/_typography.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
@if not mixin-exists("govuk-exports") {
@warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
}

@import "../base";

@include govuk-exports("govuk/overrides/typography") {
// Font size and line height

Expand Down
6 changes: 0 additions & 6 deletions src/govuk/overrides/_width.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
@if not mixin-exists("govuk-exports") {
@warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
}

@import "../base";

// stylelint-disable declaration-no-important
@include govuk-exports("govuk/overrides/width") {
.govuk-\!-width-full {
Expand Down
31 changes: 0 additions & 31 deletions src/govuk/overrides/overrides.test.js

This file was deleted.

0 comments on commit 445432a

Please sign in to comment.