UNPKG

1.77 kBSCSSView Raw
1/**
2 * Sectioning
3 * Container and responsive spacings for header, main, footer
4 */
5
6
7// Reboot based on :
8// - normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
9// - sanitize.css v12.0.1 | CC0 1.0 Universal | github.com/csstools/sanitize.css
10// ––––––––––––––––––––
11
12// Render the `main` element consistently in IE
13main {
14 display: block;
15}
16
17
18// Pico
19// ––––––––––––––––––––
20
21body {
22 width: 100%;
23 margin: 0;
24
25 > header,
26 > main,
27 > footer {
28 width: 100%;
29 margin-right: auto;
30 margin-left: auto;
31
32 // Semantic container
33 @if $enable-semantic-container {
34 padding: var(--block-spacing-vertical) var(--block-spacing-horizontal);
35
36 // Centered viewport
37 @if $enable-viewport {
38
39 @if map-get($breakpoints, "sm") and $enable-viewport {
40 @media (min-width: map-get($breakpoints, "sm")) {
41 max-width: map-get($viewports, "sm");
42 padding-right: 0;
43 padding-left: 0;
44 }
45 }
46
47 @if map-get($breakpoints, "md") and $enable-viewport {
48 @media (min-width: map-get($breakpoints, "md")) {
49 max-width: map-get($viewports, "md");
50 }
51 }
52
53 @if map-get($breakpoints, "lg") and $enable-viewport {
54 @media (min-width: map-get($breakpoints, "lg")) {
55 max-width: map-get($viewports, "lg");
56 }
57 }
58
59 @if map-get($breakpoints, "xl") and $enable-viewport {
60 @media (min-width: map-get($breakpoints, "xl")) {
61 max-width: map-get($viewports, "xl");
62 }
63 }
64 }
65 }
66
67 // Semantic container
68 @else {
69 padding: var(--block-spacing-vertical) 0;
70 }
71 }
72}