From 868d13cd397fe6bc7fee0cbc1e3a5efd32ce49f1 Mon Sep 17 00:00:00 2001 From: Oliver Byford Date: Thu, 13 Aug 2020 10:15:08 +0100 Subject: [PATCH 1/2] Fix character count shrinking as you go over limit The character count still compensates for the error state having a thicker border, by reducing the padding by 2px when the `--error` modifier is applied. Since we removed the thicker border from the error state In 6bdca06, this now 'over-compensates', causing the padding on the character count's textarea to shrink by 2px when the user goes over the character limit. Remove the padding override on the `--error` modifier as it's no longer needed. --- src/govuk/components/character-count/_index.scss | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/govuk/components/character-count/_index.scss b/src/govuk/components/character-count/_index.scss index 230f46250c..befab6c252 100644 --- a/src/govuk/components/character-count/_index.scss +++ b/src/govuk/components/character-count/_index.scss @@ -11,10 +11,6 @@ .govuk-textarea { margin-bottom: govuk-spacing(1); } - - .govuk-textarea--error { - padding: govuk-spacing(1) - 2; // Stop a "jump" when width of border changes - } } .govuk-character-count__message { From 4d63b84c4efc5eb294edbecb4ef2aa1ad300eeb9 Mon Sep 17 00:00:00 2001 From: Oliver Byford Date: Thu, 13 Aug 2020 10:22:48 +0100 Subject: [PATCH 2/2] Document in changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ebab584799..64cd1760d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## Unreleased +### Fixes + +We’ve made fixes to GOV.UK Frontend in the following pull requests: + +- [#1912: Fix character count shrinking as you go over limit](https://github.com/alphagov/govuk-frontend/pull/1912) + ## 3.8.0 (Feature release) ### New features