Skip to content

Commit

Permalink
Merge pull request #1963 from alphagov/deprecate-border-width-error
Browse files Browse the repository at this point in the history
Remove deprecated `$govuk-border-width-form-element-error`
  • Loading branch information
Vanita Barrett authored Oct 5, 2021
2 parents 1ad4453 + 98a0437 commit b2016f7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

## Unreleased

### Breaking changes
You must make the following changes when you migrate to this release, or your service may break.

#### Remove deprecated $govuk-border-width-form-element-error
To make sure the border width of form elements in their error state is the same as form elements in their normal state, we've deprecated the `$govuk-border-width-form-element-error` setting.

You must remove this setting. Otherwise, you would have to conditionally add overrides if users changed the `$govuk-border-width-form-element` to maintain a consistent focus state.

This was added in [pull request 1963: Remove deprecated `$govuk-border-width-form-element-error` setting](https://github.com/alphagov/govuk-frontend/pull/1963).


## 3.14.0 (Feature release)

### New features
Expand Down
2 changes: 1 addition & 1 deletion src/govuk/components/input/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
}

.govuk-input--error {
border: $govuk-border-width-form-element-error solid $govuk-error-colour;
border-color: $govuk-error-colour;

&:focus {
border-color: $govuk-input-border-colour;
Expand Down
2 changes: 1 addition & 1 deletion src/govuk/components/select/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
}

.govuk-select--error {
border: $govuk-border-width-form-element-error solid $govuk-error-colour;
border-color: $govuk-error-colour;

&:focus {
border-color: $govuk-input-border-colour;
Expand Down
2 changes: 1 addition & 1 deletion src/govuk/components/textarea/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
}

.govuk-textarea--error {
border: $govuk-border-width-form-element-error solid $govuk-error-colour;
border-color: $govuk-error-colour;

&:focus {
border-color: $govuk-input-border-colour;
Expand Down
10 changes: 0 additions & 10 deletions src/govuk/settings/_measurements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,6 @@ $govuk-border-width-narrow: 4px !default;

$govuk-border-width-form-element: 2px !default;

/// Form control border width when in error state
///
/// @type Number
/// @access public
/// @deprecated Use $govuk-border-width-form-element instead. There should be no
/// difference in thickness for inputs in the error state, in order to
/// maintain a distinct focus state.

$govuk-border-width-form-element-error: 2px !default;

/// Form group border width when in error state
///
/// @type Number
Expand Down

0 comments on commit b2016f7

Please sign in to comment.