From e23299f20bd9c668cf3b65776c401602da82cbf0 Mon Sep 17 00:00:00 2001 From: Vanita Barrett Date: Mon, 6 Dec 2021 16:28:57 +0000 Subject: [PATCH] Move template styles from core to objects layer --- CHANGELOG.md | 8 ++++++++ src/govuk/core/_all.scss | 1 - src/govuk/objects/_all.scss | 1 + src/govuk/{core => objects}/_template.scss | 4 +++- 4 files changed, 12 insertions(+), 2 deletions(-) rename src/govuk/{core => objects}/_template.scss (93%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 169e98427f..d1ad88eeda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -172,6 +172,14 @@ To fix the error, import `node_modules/govuk-frontend/govuk/base` first. For exa This change was introduced in [pull request #2455: Remove 'base' import from files in `core` and `overrides` layers](https://github.com/alphagov/govuk-frontend/pull/2455). +#### Import "template" Sass file from the `objects` layer instead of the `core` layer + +If you import the "template" Sass file from the `core` layer, you might see the error `File to import not found or unreadable: template` when compiling your Sass. + +To fix this error, replace any imports of `node_modules/govuk-frontend/govuk/core/template` with `node_modules/govuk-frontend/govuk/objects/template`. + +This change was introduced in [pull request #22463: Move template styles from `core` to `objects` layer](https://github.com/alphagov/govuk-frontend/pull/2463). + ### Optional changes We've recently made some other changes to GOV.UK Frontend. While these are not breaking changes, implementing them will make your service work better. diff --git a/src/govuk/core/_all.scss b/src/govuk/core/_all.scss index 6acbb5fae9..0180bb5166 100644 --- a/src/govuk/core/_all.scss +++ b/src/govuk/core/_all.scss @@ -1,6 +1,5 @@ @import "links"; @import "lists"; -@import "template"; @import "typography"; @import "section-break"; @import "global-styles"; diff --git a/src/govuk/objects/_all.scss b/src/govuk/objects/_all.scss index 4913466328..13f47f0565 100644 --- a/src/govuk/objects/_all.scss +++ b/src/govuk/objects/_all.scss @@ -2,4 +2,5 @@ @import "form-group"; @import "grid"; @import "main-wrapper"; +@import "template"; @import "width-container"; diff --git a/src/govuk/core/_template.scss b/src/govuk/objects/_template.scss similarity index 93% rename from src/govuk/core/_template.scss rename to src/govuk/objects/_template.scss index d0f87d0a52..2857b2f979 100644 --- a/src/govuk/core/_template.scss +++ b/src/govuk/objects/_template.scss @@ -1,4 +1,6 @@ -@include govuk-exports("govuk/core/template") { +@import "../base"; + +@include govuk-exports("govuk/objects/template") { // Applied to the element .govuk-template {