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

Update govuk-main-wrapper object and add a large varient #602

Merged
merged 1 commit into from
Mar 26, 2018
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
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ Breaking changes:
`govuk-c-radios--inline` which will automatically make all the radio buttons
within that block inline.
(PR [#607](https://github.com/alphagov/govuk-frontend/pull/607))


New features:
- Add `govuk-main-wrapper--l` a variant of the main page wrapper to use when a design does not include back links, breadcrumbs or phase banners (PR [#602](https://github.com/alphagov/govuk-frontend/pull/602))

Internal:
- Update check script for new components and tweak docs
(PR [#589](https://github.com/alphagov/govuk-frontend/pull/589))
(PR [#589](https://github.com/alphagov/govuk-frontend/pull/589))

## 0.0.26-alpha (Breaking release)

Expand Down
25 changes: 20 additions & 5 deletions src/globals/objects/_main-wrapper.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,37 @@
// Example usage:
// Example usage with Breadcrumbs, phase banners, back links:
// <div class="govuk-o-width-container">
// <!-- Breadcrumbs, phase banners, back links are placed in here. -->
// <div class="govuk-o-main-wrapper">
// <!-- Wrapper for the main content of your page which applies padding
// to the top / bottom -->
// </div>
// </div>
//
// Example usage without Breadcrumbs, phase banners, back links:
// <div class="govuk-o-width-container">
// <div class="govuk-main-wrapper govuk-o-main-wrapper--l">
// <!-- Wrapper for the main content of your page which applies padding
// to the top / bottom -->
// </div>
// </div>


@mixin govuk-main-wrapper {
padding: $govuk-spacing-scale-3 0;
@include govuk-responsive-padding($govuk-spacing-responsive-6, "top");
@include govuk-responsive-padding($govuk-spacing-responsive-6, "bottom");
}

@include mq($from: tablet) {
padding: $govuk-spacing-scale-6 0;
}
// Use govuk-main-wrapper--l when you page does not have Breadcrumbs, phase banners or back links
@mixin govuk-main-wrapper--l {
@include govuk-responsive-padding($govuk-spacing-responsive-8, "top");
}

@include govuk-exports("main-wrapper") {
.govuk-o-main-wrapper {
@include govuk-main-wrapper;
}

.govuk-o-main-wrapper--l {
@include govuk-main-wrapper--l;
}
}