Skip to content

Commit

Permalink
Remove deprecated static spacing classes
Browse files Browse the repository at this point in the history
Removes the erroneously named `.govuk-!-margin-static` and `.govuk-!-padding-static` classes added in v4.3.0 and deprecated in v4.3.1.
  • Loading branch information
querkmachine committed May 9, 2023
1 parent a95859a commit 6f66581
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ We no longer support link buttons being disabled or using disabled styles.

This change was introduced in [pull request #3557: Remove deprecated `.govuk-button--disabled` class](https://github.com/alphagov/govuk-frontend/pull/3557).

#### Remove deprecated `govuk-!-margin-static` and `govuk-!-padding-static` classes

We've removed `.govuk-!-margin-static`, `.govuk-!-padding-static` and their related classes that were deprecated in [GOV.UK Frontend v4.3.1](https://github.com/alphagov/govuk-frontend/releases/tag/v4.3.1).

Use the correctly named `.govuk-!-static-margin` and `.govuk-!-static-padding` classes instead.

#### Update the HTML for warning text

We've removed the `.govuk-warning-text__assistive` class and its styles from GOV.UK Frontend. This class is unnecessary, as it duplicates the functionality of the `.govuk-visually-hidden` class already present in Frontend.
Expand Down
10 changes: 0 additions & 10 deletions packages/govuk-frontend/src/govuk/overrides/_spacing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,6 @@ $_spacing-directions: (
/// Generate spacing override classes for the given property (e.g. margin)
/// for each point in the non-responsive spacing scale.
///
/// The classes in the format govuk-#{$property}-static-#{$spacing-point}
/// and govuk-\!-#{$property}-#{$direction}-static-#{$spacing-point} are deprecated.
/// For example: govuk-!-margin-static-2 or govuk-!-margin-top-static-2
///
/// Use classes in the format .govuk-\!-static-#{$property}-#{$spacing-point}
/// and .govuk-\!-static-#{$property}-#{$direction}-#{$spacing-point} instead.
/// For example: govuk-!-static-margin-2 or govuk-!-static-margin-top-2
///
/// @param {String} $property - Property to add spacing to (e.g. 'margin')
///
/// @example css
Expand All @@ -79,13 +71,11 @@ $_spacing-directions: (
/// @access private
@mixin _govuk-generate-static-spacing-overrides($property) {
@each $spacing-point in map-keys($govuk-spacing-points) {
.govuk-\!-#{$property}-static-#{$spacing-point},
.govuk-\!-static-#{$property}-#{$spacing-point} {
#{$property}: govuk-spacing($spacing-point) !important;
}

@each $direction in $_spacing-directions {
.govuk-\!-#{$property}-#{$direction}-static-#{$spacing-point},
.govuk-\!-static-#{$property}-#{$direction}-#{$spacing-point} {
#{$property}-#{$direction}: govuk-spacing($spacing-point) !important;
}
Expand Down

0 comments on commit 6f66581

Please sign in to comment.