-
Notifications
You must be signed in to change notification settings - Fork 365
Expand file tree
/
Copy path_main-wrapper.mixin.scss
More file actions
50 lines (45 loc) · 1.65 KB
/
_main-wrapper.mixin.scss
File metadata and controls
50 lines (45 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@use "../base";
////
/// @group objects/layout
////
// Example usage with Breadcrumbs, phase banners, back links:
// <div class="govuk-width-container">
// <!-- Breadcrumbs, phase banners, back links are placed in here. -->
// <div class="govuk-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-width-container">
// <div class="govuk-main-wrapper govuk-main-wrapper--l">
// <!-- Wrapper for the main content of your page which applies padding
// to the top / bottom -->
// </div>
// </div>
/// @access private
@mixin styles {
.govuk-main-wrapper {
padding-top: base.govuk-spacing(4);
padding-bottom: base.govuk-spacing(4);
@media #{base.govuk-from-breakpoint(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: base.govuk-spacing(7);
padding-bottom: base.govuk-spacing(7);
}
}
// Using the `.govuk-main-wrapper--auto-spacing` modifier should apply the
// correct spacing depending on whether there are any elements
// (such the back link, breadcrumbs or phase banner components) before the
// `.govuk-main-wrapper` in the `govuk-width-container`.
//
// If you need to control the spacing manually, use the
// `govuk-main-wrapper--l` modifier instead.
.govuk-main-wrapper--auto-spacing:first-child,
.govuk-main-wrapper--l {
@include base.govuk-responsive-padding(8, "top");
}
}