From addaa5fb59174ec7f9157103f127c3c14d1d56db Mon Sep 17 00:00:00 2001 From: Oliver Byford Date: Tue, 12 Jun 2018 12:03:40 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Remove=20the=20=E2=80=98circle=20shape?= =?UTF-8?q?=E2=80=99=20object?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is no longer a particularly useful abstraction now that list with step icons has been removed, as it’s only used in one place and includes a lot of very specific styles. --- src/components/warning-text/README.md | 2 +- src/components/warning-text/_warning-text.scss | 9 +++++++-- src/components/warning-text/template.njk | 2 +- src/objects/_all.scss | 1 - src/objects/_shapes.scss | 9 --------- 5 files changed, 9 insertions(+), 14 deletions(-) delete mode 100644 src/objects/_shapes.scss diff --git a/src/components/warning-text/README.md b/src/components/warning-text/README.md index c84dde611d..ba38c64c83 100644 --- a/src/components/warning-text/README.md +++ b/src/components/warning-text/README.md @@ -17,7 +17,7 @@ Find out when to use the Warning text component in your service in the [GOV.UK D #### Markup
- + Warning You can be fined up to £5,000 if you don’t register. diff --git a/src/components/warning-text/_warning-text.scss b/src/components/warning-text/_warning-text.scss index e13dda4b16..5d90c08d14 100644 --- a/src/components/warning-text/_warning-text.scss +++ b/src/components/warning-text/_warning-text.scss @@ -2,8 +2,6 @@ @import "../../tools/all"; @import "../../helpers/all"; -@import "../../objects/shapes"; - @include govuk-exports("govuk/component/warning-text") { .govuk-warning-text { @@ -33,8 +31,15 @@ margin-top: -20px; // Half the height of the 38px circle (adjusted for NTA) padding-top: 3px; + border-radius: 50%; + + color: govuk-colour("white"); + background: govuk-colour("black"); + font-size: 1.6em; line-height: 35px; + + text-align: center; } .govuk-warning-text__text { diff --git a/src/components/warning-text/template.njk b/src/components/warning-text/template.njk index d4d9cc211f..38e6c5c841 100644 --- a/src/components/warning-text/template.njk +++ b/src/components/warning-text/template.njk @@ -1,7 +1,7 @@
- + {{ params.iconFallbackText }} {{ params.html | safe if params.html else params.text }} diff --git a/src/objects/_all.scss b/src/objects/_all.scss index 2ef2d88429..bd079d1516 100644 --- a/src/objects/_all.scss +++ b/src/objects/_all.scss @@ -1,5 +1,4 @@ @import "form-group"; @import "grid"; @import "main-wrapper"; -@import "shapes"; @import "width-container"; diff --git a/src/objects/_shapes.scss b/src/objects/_shapes.scss deleted file mode 100644 index 242920999c..0000000000 --- a/src/objects/_shapes.scss +++ /dev/null @@ -1,9 +0,0 @@ -@include govuk-exports("govuk/objects/shapes") { - .govuk-circle { - display: inline-block; - border-radius: 50%; - color: govuk-colour("white"); - background: govuk-colour("black"); - text-align: center; - } -} From 3192f61a7fb1ca16a714e7357be57147d84a4f7d Mon Sep 17 00:00:00 2001 From: Oliver Byford Date: Tue, 12 Jun 2018 15:40:19 +0100 Subject: [PATCH 2/2] Document removal of govuk-circle in changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fef32a2b8a..949d5090b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -134,6 +134,11 @@ Note: We're not following semantic versioning yet, we are going to talk about th - `mellow-red` → `bright-red` - `grass-green` → `light-green` +- The 'circle shape' object (`.govuk-circle`) which was used by the warning text + component's '!' icon has been removed and the `govuk-warning-text__icon` class + has been updated to make it circular without the need for another class. + + ([PR #782](https://github.com/alphagov/govuk-frontend/pull/782)) 🔧 Fixes: