From 2a4019d15563d58bc58d6ea346f3f143c2cbbaad Mon Sep 17 00:00:00 2001 From: Jani Kraner Date: Wed, 30 May 2018 08:56:22 +0100 Subject: [PATCH 1/2] Namespace exports with 'govuk//' --- src/components/back-link/_back-link.scss | 2 +- src/components/breadcrumbs/_breadcrumbs.scss | 2 +- src/components/button/_button.scss | 2 +- src/components/checkboxes/_checkboxes.scss | 2 +- src/components/date-input/_date-input.scss | 2 +- src/components/details/_details.scss | 2 +- src/components/error-message/_error-message.scss | 2 +- src/components/error-summary/_error-summary.scss | 2 +- src/components/fieldset/_fieldset.scss | 2 +- src/components/file-upload/_file-upload.scss | 2 +- src/components/footer/_footer.scss | 2 +- src/components/header/_header.scss | 2 +- src/components/hint/_hint.scss | 2 +- src/components/input/_input.scss | 2 +- src/components/inset-text/_inset-text.scss | 2 +- src/components/label/_label.scss | 2 +- src/components/panel/_panel.scss | 2 +- src/components/phase-banner/_phase-banner.scss | 2 +- src/components/radios/_radios.scss | 2 +- src/components/select/_select.scss | 2 +- src/components/skip-link/_skip-link.scss | 2 +- src/components/table/_table.scss | 2 +- src/components/tag/_tag.scss | 2 +- src/components/textarea/_textarea.scss | 2 +- src/components/warning-text/_warning-text.scss | 2 +- src/core/_global-styles.scss | 2 +- src/core/_links.scss | 2 +- src/core/_lists.scss | 2 +- src/core/_prose-scope.scss | 2 +- src/core/_section-break.scss | 2 +- src/core/_typography.scss | 2 +- src/helpers/_font-faces.scss | 2 +- src/objects/_form-group.scss | 2 +- src/objects/_grid.scss | 2 +- src/objects/_main-wrapper.scss | 2 +- src/objects/_shapes.scss | 2 +- src/objects/_width-container.scss | 2 +- src/overrides/_display.scss | 2 +- src/overrides/_spacing.scss | 2 +- src/overrides/_typography.scss | 2 +- src/overrides/_width.scss | 2 +- src/utilities/_clearfix.scss | 2 +- src/utilities/_visually-hidden.scss | 2 +- 43 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/components/back-link/_back-link.scss b/src/components/back-link/_back-link.scss index c9b519ae88..704e9ac9fd 100644 --- a/src/components/back-link/_back-link.scss +++ b/src/components/back-link/_back-link.scss @@ -2,7 +2,7 @@ @import "../../tools/all"; @import "../../helpers/all"; -@include govuk-exports("back-link") { +@include govuk-exports("govuk/component/back-link") { .govuk-back-link { @include govuk-typography-responsive($govuk-font-16); diff --git a/src/components/breadcrumbs/_breadcrumbs.scss b/src/components/breadcrumbs/_breadcrumbs.scss index ca3958286d..6b1643c54e 100644 --- a/src/components/breadcrumbs/_breadcrumbs.scss +++ b/src/components/breadcrumbs/_breadcrumbs.scss @@ -2,7 +2,7 @@ @import "../../tools/all"; @import "../../helpers/all"; -@include govuk-exports("breadcrumbs") { +@include govuk-exports("govuk/component/breadcrumbs") { // Size of chevron (excluding border) $chevron-size: 7px; diff --git a/src/components/button/_button.scss b/src/components/button/_button.scss index ba9b9acdb5..ba825f9a32 100644 --- a/src/components/button/_button.scss +++ b/src/components/button/_button.scss @@ -2,7 +2,7 @@ @import "../../tools/all"; @import "../../helpers/all"; -@include govuk-exports("button") { +@include govuk-exports("govuk/component/button") { // Because the shadow (s0) is visually 'part of' the button, we need to reduce // the height of the button to compensate by adjusting its padding (s1) and diff --git a/src/components/checkboxes/_checkboxes.scss b/src/components/checkboxes/_checkboxes.scss index c5cd939563..72b099c53d 100644 --- a/src/components/checkboxes/_checkboxes.scss +++ b/src/components/checkboxes/_checkboxes.scss @@ -7,7 +7,7 @@ @import "../hint/hint"; @import "../label/label"; -@include govuk-exports("checkboxes") { +@include govuk-exports("govuk/component/checkboxes") { $govuk-checkboxes-size: $govuk-spacing-scale-7; $govuk-checkboxes-label-padding-left-right: $govuk-spacing-scale-3; diff --git a/src/components/date-input/_date-input.scss b/src/components/date-input/_date-input.scss index cbc5b8d5df..3a2f3e2360 100644 --- a/src/components/date-input/_date-input.scss +++ b/src/components/date-input/_date-input.scss @@ -7,7 +7,7 @@ @import "../hint/hint"; @import "../label/label"; -@include govuk-exports("date-input") { +@include govuk-exports("govuk/component/date-input") { .govuk-date-input { @include govuk-clearfix; } diff --git a/src/components/details/_details.scss b/src/components/details/_details.scss index f6577a43db..8203150b90 100644 --- a/src/components/details/_details.scss +++ b/src/components/details/_details.scss @@ -2,7 +2,7 @@ @import "../../tools/all"; @import "../../helpers/all"; -@include govuk-exports("details") { +@include govuk-exports("govuk/component/details") { .govuk-details { @include govuk-font-regular-19; diff --git a/src/components/error-message/_error-message.scss b/src/components/error-message/_error-message.scss index 459b0bb608..3706b9a6e1 100644 --- a/src/components/error-message/_error-message.scss +++ b/src/components/error-message/_error-message.scss @@ -2,7 +2,7 @@ @import "../../tools/all"; @import "../../helpers/all"; -@include govuk-exports("error-message") { +@include govuk-exports("govuk/component/error-message") { .govuk-error-message { @include govuk-font-bold-19; diff --git a/src/components/error-summary/_error-summary.scss b/src/components/error-summary/_error-summary.scss index a5fc5f227a..2991bb844c 100644 --- a/src/components/error-summary/_error-summary.scss +++ b/src/components/error-summary/_error-summary.scss @@ -4,7 +4,7 @@ @import "../../core/lists"; -@include govuk-exports("error-summary") { +@include govuk-exports("govuk/component/error-summary") { .govuk-error-summary { @include govuk-text-colour; diff --git a/src/components/fieldset/_fieldset.scss b/src/components/fieldset/_fieldset.scss index 518bf1d291..250eb0bde0 100644 --- a/src/components/fieldset/_fieldset.scss +++ b/src/components/fieldset/_fieldset.scss @@ -2,7 +2,7 @@ @import "../../tools/all"; @import "../../helpers/all"; -@include govuk-exports("fieldset") { +@include govuk-exports("govuk/component/fieldset") { .govuk-fieldset { margin: 0; padding: 0; diff --git a/src/components/file-upload/_file-upload.scss b/src/components/file-upload/_file-upload.scss index bc7b54020b..194d18aba1 100644 --- a/src/components/file-upload/_file-upload.scss +++ b/src/components/file-upload/_file-upload.scss @@ -6,7 +6,7 @@ @import "../hint/hint"; @import "../label/label"; -@include govuk-exports("file-upload") { +@include govuk-exports("govuk/component/file-upload") { .govuk-file-upload { @include govuk-font-regular-19; @include govuk-text-colour; diff --git a/src/components/footer/_footer.scss b/src/components/footer/_footer.scss index c65eb12652..9a7d32e25d 100644 --- a/src/components/footer/_footer.scss +++ b/src/components/footer/_footer.scss @@ -4,7 +4,7 @@ @import "../../helpers/typography"; -@include govuk-exports("footer") { +@include govuk-exports("govuk/component/footer") { $govuk-footer-background: $govuk-grey-3; $govuk-footer-border-top: #a1acb2; diff --git a/src/components/header/_header.scss b/src/components/header/_header.scss index 0d687215e0..ea1a35f801 100644 --- a/src/components/header/_header.scss +++ b/src/components/header/_header.scss @@ -4,7 +4,7 @@ @import "../../helpers/typography"; -@include govuk-exports("header") { +@include govuk-exports("govuk/component/header") { $govuk-header-background: $govuk-black; $govuk-header-border-color: $govuk-blue; diff --git a/src/components/hint/_hint.scss b/src/components/hint/_hint.scss index e16ffa62b2..eb51e5d61c 100644 --- a/src/components/hint/_hint.scss +++ b/src/components/hint/_hint.scss @@ -2,7 +2,7 @@ @import "../../tools/all"; @import "../../helpers/all"; -@include govuk-exports("hint") { +@include govuk-exports("govuk/component/hint") { .govuk-hint { @include govuk-font-regular-19; diff --git a/src/components/input/_input.scss b/src/components/input/_input.scss index f81b5736cb..bde3ca08ed 100644 --- a/src/components/input/_input.scss +++ b/src/components/input/_input.scss @@ -6,7 +6,7 @@ @import "../hint/hint"; @import "../label/label"; -@include govuk-exports("input") { +@include govuk-exports("govuk/component/input") { .govuk-input { @include govuk-font-regular-19; @include govuk-focusable; diff --git a/src/components/inset-text/_inset-text.scss b/src/components/inset-text/_inset-text.scss index 9e23f4533c..0fa81420e8 100644 --- a/src/components/inset-text/_inset-text.scss +++ b/src/components/inset-text/_inset-text.scss @@ -2,7 +2,7 @@ @import "../../tools/all"; @import "../../helpers/all"; -@include govuk-exports("inset-text") { +@include govuk-exports("govuk/component/inset-text") { .govuk-inset-text { @include govuk-font-regular-19; @include govuk-text-colour; diff --git a/src/components/label/_label.scss b/src/components/label/_label.scss index 05e48c3a86..8e6a75de65 100644 --- a/src/components/label/_label.scss +++ b/src/components/label/_label.scss @@ -2,7 +2,7 @@ @import "../../tools/all"; @import "../../helpers/all"; -@include govuk-exports("label") { +@include govuk-exports("govuk/component/label") { .govuk-label { @include govuk-font-regular-19; @include govuk-text-colour; diff --git a/src/components/panel/_panel.scss b/src/components/panel/_panel.scss index 54a601fcb1..e1d0c4b97e 100644 --- a/src/components/panel/_panel.scss +++ b/src/components/panel/_panel.scss @@ -2,7 +2,7 @@ @import "../../tools/all"; @import "../../helpers/all"; -@include govuk-exports("panel") { +@include govuk-exports("govuk/component/panel") { .govuk-panel { @include govuk-font-regular-19; diff --git a/src/components/phase-banner/_phase-banner.scss b/src/components/phase-banner/_phase-banner.scss index 81795904ce..068c7fde20 100644 --- a/src/components/phase-banner/_phase-banner.scss +++ b/src/components/phase-banner/_phase-banner.scss @@ -4,7 +4,7 @@ @import "../tag/tag"; -@include govuk-exports("phase-banner") { +@include govuk-exports("govuk/component/phase-banner") { .govuk-phase-banner { @include govuk-font-regular-16; @include govuk-text-colour; diff --git a/src/components/radios/_radios.scss b/src/components/radios/_radios.scss index c6a736da62..add22cf4a4 100644 --- a/src/components/radios/_radios.scss +++ b/src/components/radios/_radios.scss @@ -7,7 +7,7 @@ @import "../hint/hint"; @import "../label/label"; -@include govuk-exports("radios") { +@include govuk-exports("govuk/component/radios") { $govuk-radios-size: $govuk-spacing-scale-7; $govuk-radios-label-padding-left-right: $govuk-spacing-scale-3; diff --git a/src/components/select/_select.scss b/src/components/select/_select.scss index ac349e74c6..0b9e349041 100644 --- a/src/components/select/_select.scss +++ b/src/components/select/_select.scss @@ -6,7 +6,7 @@ @import "../hint/hint"; @import "../label/label"; -@include govuk-exports("select") { +@include govuk-exports("govuk/component/select") { .govuk-select { @include govuk-font-regular; @include govuk-typography-responsive( diff --git a/src/components/skip-link/_skip-link.scss b/src/components/skip-link/_skip-link.scss index a4c9266482..764958ae52 100644 --- a/src/components/skip-link/_skip-link.scss +++ b/src/components/skip-link/_skip-link.scss @@ -2,7 +2,7 @@ @import "../../tools/all"; @import "../../helpers/all"; -@include govuk-exports("skip-link") { +@include govuk-exports("govuk/component/skip-link") { .govuk-skip-link { @include govuk-visually-hidden-focusable; @include govuk-link-common; diff --git a/src/components/table/_table.scss b/src/components/table/_table.scss index 1849a78fcb..45d7e820f7 100644 --- a/src/components/table/_table.scss +++ b/src/components/table/_table.scss @@ -2,7 +2,7 @@ @import "../../tools/all"; @import "../../helpers/all"; -@include govuk-exports("table") { +@include govuk-exports("govuk/component/table") { .govuk-table { @include govuk-font-regular-19; @include govuk-text-colour; diff --git a/src/components/tag/_tag.scss b/src/components/tag/_tag.scss index 7dfe7ef13b..8ee4256b74 100644 --- a/src/components/tag/_tag.scss +++ b/src/components/tag/_tag.scss @@ -2,7 +2,7 @@ @import "../../tools/all"; @import "../../helpers/all"; -@include govuk-exports("tag") { +@include govuk-exports("govuk/component/tag") { .govuk-tag { @include govuk-font-bold; @include govuk-typography-responsive( diff --git a/src/components/textarea/_textarea.scss b/src/components/textarea/_textarea.scss index 2072420707..3225a6a495 100644 --- a/src/components/textarea/_textarea.scss +++ b/src/components/textarea/_textarea.scss @@ -6,7 +6,7 @@ @import "../hint/hint"; @import "../label/label"; -@include govuk-exports("textarea") { +@include govuk-exports("govuk/component/textarea") { .govuk-textarea { @include govuk-font-regular; @include govuk-typography-responsive( diff --git a/src/components/warning-text/_warning-text.scss b/src/components/warning-text/_warning-text.scss index a93d172525..73bbb60879 100644 --- a/src/components/warning-text/_warning-text.scss +++ b/src/components/warning-text/_warning-text.scss @@ -4,7 +4,7 @@ @import "../../objects/shapes"; -@include govuk-exports("warning-text") { +@include govuk-exports("govuk/component/warning-text") { .govuk-warning-text { @include govuk-font-regular-19; diff --git a/src/core/_global-styles.scss b/src/core/_global-styles.scss index d493d316b8..20d043a003 100644 --- a/src/core/_global-styles.scss +++ b/src/core/_global-styles.scss @@ -11,7 +11,7 @@ } } -@include govuk-exports("govuk-global-styles") { +@include govuk-exports("govuk/core/global-styles") { @if $govuk-global-styles == true { @include govuk-global-styles; diff --git a/src/core/_links.scss b/src/core/_links.scss index a32a92abd3..d4de885188 100644 --- a/src/core/_links.scss +++ b/src/core/_links.scss @@ -1,4 +1,4 @@ -@include govuk-exports("links") { +@include govuk-exports("govuk/core/links") { // We use a placeholder class here so that we can @extend from the prose scope // without also applying every other occurrence of the .govuk-link selector to diff --git a/src/core/_lists.scss b/src/core/_lists.scss index 367388b78b..8c3a1b7675 100644 --- a/src/core/_lists.scss +++ b/src/core/_lists.scss @@ -1,4 +1,4 @@ -@include govuk-exports("lists") { +@include govuk-exports("govuk/core/lists") { // We use a placeholder class here so that we can @extend from the prose scope // without also applying every other occurrence of the .govuk-list selector to diff --git a/src/core/_prose-scope.scss b/src/core/_prose-scope.scss index 9551cb5c70..d706f4e02e 100644 --- a/src/core/_prose-scope.scss +++ b/src/core/_prose-scope.scss @@ -1,4 +1,4 @@ -@include govuk-exports("prose-scope") { +@include govuk-exports("govuk/core/prose-scope") { .govuk-prose-scope { // @extend inheritance diff --git a/src/core/_section-break.scss b/src/core/_section-break.scss index d5b910df1a..41de577797 100644 --- a/src/core/_section-break.scss +++ b/src/core/_section-break.scss @@ -1,4 +1,4 @@ -@include govuk-exports("section-break") { +@include govuk-exports("govuk/core/section-break") { // We use placeholder classes here so that we can @extend from the prose scope diff --git a/src/core/_typography.scss b/src/core/_typography.scss index 098c5b5c84..1073970b5f 100644 --- a/src/core/_typography.scss +++ b/src/core/_typography.scss @@ -1,4 +1,4 @@ -@include govuk-exports("typography") { +@include govuk-exports("govuk/core/typography") { // We use placeholder classes here so that we can @extend from the prose scope // without also applying every other occurrence of the typography selectors to diff --git a/src/helpers/_font-faces.scss b/src/helpers/_font-faces.scss index dbf0d8a478..1e77fb46cf 100644 --- a/src/helpers/_font-faces.scss +++ b/src/helpers/_font-faces.scss @@ -4,7 +4,7 @@ // sass-lint:disable no-css-comments, no-duplicate-properties, property-sort-order, indentation @mixin govuk-font-face-nta { - @include govuk-exports("font-face") { + @include govuk-exports("govuk/helpers/font-face") { @at-root { /*! 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. */ diff --git a/src/objects/_form-group.scss b/src/objects/_form-group.scss index a933d33e9b..6471f68f98 100644 --- a/src/objects/_form-group.scss +++ b/src/objects/_form-group.scss @@ -1,4 +1,4 @@ -@include govuk-exports("form-group") { +@include govuk-exports("govuk/objects/form-group") { .govuk-form-group { @include govuk-responsive-margin($govuk-spacing-responsive-6, "bottom"); diff --git a/src/objects/_grid.scss b/src/objects/_grid.scss index ae924df99c..84a7198efb 100644 --- a/src/objects/_grid.scss +++ b/src/objects/_grid.scss @@ -1,4 +1,4 @@ -@include govuk-exports("govuk-grid") { +@include govuk-exports("govuk/objects/grid") { //most common usage @include govuk-grid-row; @include govuk-grid-column(one-quarter); diff --git a/src/objects/_main-wrapper.scss b/src/objects/_main-wrapper.scss index 6aa78bf14e..dbb33862d2 100644 --- a/src/objects/_main-wrapper.scss +++ b/src/objects/_main-wrapper.scss @@ -26,7 +26,7 @@ @include govuk-responsive-padding($govuk-spacing-responsive-8, "top"); } -@include govuk-exports("main-wrapper") { +@include govuk-exports("govuk/objects/main-wrapper") { .govuk-main-wrapper { @include govuk-main-wrapper; } diff --git a/src/objects/_shapes.scss b/src/objects/_shapes.scss index 20bf312de4..1da7fa1e74 100644 --- a/src/objects/_shapes.scss +++ b/src/objects/_shapes.scss @@ -1,4 +1,4 @@ -@include govuk-exports("shapes") { +@include govuk-exports("govuk/objects/shapes") { .govuk-circle { display: inline-block; border-radius: 50%; diff --git a/src/objects/_width-container.scss b/src/objects/_width-container.scss index 180a3c110e..1160915570 100644 --- a/src/objects/_width-container.scss +++ b/src/objects/_width-container.scss @@ -21,7 +21,7 @@ } } -@include govuk-exports("width-container") { +@include govuk-exports("govuk/objects/width-container") { .govuk-width-container { @include govuk-width-container; } diff --git a/src/overrides/_display.scss b/src/overrides/_display.scss index bd652545df..440fdc0d59 100644 --- a/src/overrides/_display.scss +++ b/src/overrides/_display.scss @@ -1,4 +1,4 @@ -@include govuk-exports("display-overrides") { +@include govuk-exports("govuk/overrides/display") { .govuk-\!-display-inline { display: inline !important; diff --git a/src/overrides/_spacing.scss b/src/overrides/_spacing.scss index 17e5851f81..7ba51f6542 100644 --- a/src/overrides/_spacing.scss +++ b/src/overrides/_spacing.scss @@ -44,7 +44,7 @@ $spacing-directions: ( } } -@include govuk-exports("spacing-overrides") { +@include govuk-exports("govuk/overrides/spacing") { @include generate-spacing-overrides("margin", "m"); @include generate-spacing-overrides("padding", "p"); } diff --git a/src/overrides/_typography.scss b/src/overrides/_typography.scss index 1425d25071..0430439130 100644 --- a/src/overrides/_typography.scss +++ b/src/overrides/_typography.scss @@ -1,4 +1,4 @@ -@include govuk-exports("typography-overrides") { +@include govuk-exports("govuk/overrides/typography") { // Font size and line height // Generate typography override classes for each responsive font map in the diff --git a/src/overrides/_width.scss b/src/overrides/_width.scss index 1c3be7a3c8..28f49acb78 100644 --- a/src/overrides/_width.scss +++ b/src/overrides/_width.scss @@ -1,4 +1,4 @@ -@include govuk-exports("width-overrides") { +@include govuk-exports("govuk/overrides/width") { .govuk-\!-width-three-quarters { width: 100% !important; diff --git a/src/utilities/_clearfix.scss b/src/utilities/_clearfix.scss index d31ca5b11d..b931cf1c9d 100644 --- a/src/utilities/_clearfix.scss +++ b/src/utilities/_clearfix.scss @@ -1,4 +1,4 @@ -@include govuk-exports("clearfix") { +@include govuk-exports("govuk/utilities/clearfix") { .govuk-clearfix { @include govuk-clearfix; } diff --git a/src/utilities/_visually-hidden.scss b/src/utilities/_visually-hidden.scss index 4e66ed6a3d..8e7eb8d566 100644 --- a/src/utilities/_visually-hidden.scss +++ b/src/utilities/_visually-hidden.scss @@ -1,4 +1,4 @@ -@include govuk-exports("visually-hidden") { +@include govuk-exports("govuk/utilities/visually-hidden") { .govuk-visually-hidden { @include govuk-visually-hidden; } From 6d32e4090f1a250900bb12d645969f896d576869 Mon Sep 17 00:00:00 2001 From: Jani Kraner Date: Wed, 30 May 2018 09:03:07 +0100 Subject: [PATCH 2/2] Document in CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d988ba78e6..8fad2d372b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,10 @@ Note: We're not following semantic versioning yet, we are going to talk about th 🔧 Fixes: +- Namespacing SCSS exports with 'govuk' prefix to avoid clashes with + exports in applications consuming GOV.UK Frontend + ([PR #732](https://github.com/alphagov/govuk-frontend/pull/732)) + - Fixes a bug whereby print styles were being 'rasterized' into the screen styles when generating the IE8 stylesheet (this is a bug in sass-mq, and has also been raised upstream – https://github.com/sass-mq/sass-mq/pull/111).