Skip to content

Commit

Permalink
Remove previously deprecated main-wrapper and main-wrapper--l mixins
Browse files Browse the repository at this point in the history
In ade03d4
we deprecated the `main-wrapper` and `main-wrapper--l` mixins because we didn't think they
were useful.

This commit removes those mixins. Note: the classes remain, but the mixins are being removed.
  • Loading branch information
Vanita Barrett committed Oct 15, 2021
1 parent dbbd04a commit bf34e18
Showing 1 changed file with 15 additions and 30 deletions.
45 changes: 15 additions & 30 deletions src/govuk/objects/_main-wrapper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,22 @@
// </div>
// </div>

/// @deprecated Replace this mixin with more direct references to the [spacing
/// mixins](https://design-system.service.gov.uk/styles/spacing/#spacing-on-custom-components).
@mixin govuk-main-wrapper {
// In IE11 the `main` element can be used, but is not recognized –
// meaning it's not defined in IE's default style sheet,
// so it uses CSS initial value, which is inline.
display: block;
padding-top: govuk-spacing(4);
padding-bottom: govuk-spacing(4);

@include govuk-media-query($from: tablet) {
// This spacing is manually adjusted to replicate the margin of
// govuk-heading-xl (50px) minus the spacing of back link and
// breadcrumbs (10px)
padding-top: govuk-spacing(7);
padding-bottom: govuk-spacing(7);
}
}

/// Use govuk-main-wrapper--l when you page does not have Breadcrumbs, phase
/// banners or back links.
///
/// @deprecated Replace this mixin with more direct references to the [spacing
/// mixins](https://design-system.service.gov.uk/styles/spacing/#spacing-on-custom-components).
@mixin govuk-main-wrapper--l {
@include govuk-responsive-padding(8, "top");
}

@include govuk-exports("govuk/objects/main-wrapper") {
.govuk-main-wrapper {
@include govuk-main-wrapper;
// In IE11 the `main` element can be used, but is not recognized –
// meaning it's not defined in IE's default style sheet,
// so it uses CSS initial value, which is inline.
display: block;
padding-top: govuk-spacing(4);
padding-bottom: govuk-spacing(4);

@include govuk-media-query($from: tablet) {
// This spacing is manually adjusted to replicate the margin of
// govuk-heading-xl (50px) minus the spacing of back link and
// breadcrumbs (10px)
padding-top: govuk-spacing(7);
padding-bottom: govuk-spacing(7);
}
}

// Using the `.govuk-main-wrapper--auto-spacing` modifier should apply the
Expand All @@ -63,6 +48,6 @@
// `govuk-main-wrapper--l` modifier instead.
.govuk-main-wrapper--auto-spacing:first-child,
.govuk-main-wrapper--l {
@include govuk-main-wrapper--l;
@include govuk-responsive-padding(8, "top");
}
}

0 comments on commit bf34e18

Please sign in to comment.