Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated static spacing classes #3593

Merged
merged 1 commit into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ 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 the override classes starting with `.govuk-!-margin-static` and `.govuk-!-padding-static` which were deprecated in [GOV.UK Frontend v4.3.1](https://github.com/alphagov/govuk-frontend/releases/tag/v4.3.1).

Use the classes starting with `.govuk-!-static-margin` and `.govuk-!-static-padding` instead.

This change was introduced in [pull request #3593: Remove deprecated static spacing classes](https://github.com/alphagov/govuk-frontend/pull/3593).

#### 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