aboutsummaryrefslogtreecommitdiff
path: root/sass/include/_sectioning.scss
blob: dd1026e5eefb42618b057ec555bd6f33181bf25b (plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/**
 * Sectioning: Container and responsive spacings for header, main, footer
 * https://github.com/picocss/pico
 */

// Render the `main` element consistently in IE
main {
  display: flex;
  // should always have a single div that holds all content below main.
  // TOC or Recent Posts are the only other sections that would be directly under main.
  article, div {
    flex: 1 1 0;
    min-width: 0;
  }
}

body {
  width: 100%;
  margin: 0;
}

header,
main,
footer {
  width: 100%;
  margin-right: auto;
  margin-left: auto;

  // Semantic container
  @if $enable-semantic-container {
    padding: var(--s1);

    // Centered viewport max-width only
    @if $enable-maxwidth {
      @media (min-width: $mb) {
          min-width: $mb;
          max-width: $mw;
      }
    }
    // Centered viewport
    @else if $enable-viewport {
      @if map-get($breakpoints, "sm") and $enable-viewport {
        @media (min-width: map-get($breakpoints, "sm")) {
          max-width: map-get($viewports, "sm");
          //padding-right: 0;
          //padding-left: 0;
          .toc {
            display: none;
          }
        }
      }
      @if map-get($breakpoints, "md") and $enable-viewport {
        @media (min-width: map-get($breakpoints, "md")) {
          max-width: map-get($viewports, "md");
        }
      }
      @if map-get($breakpoints, "lg") and $enable-viewport {
        @media (min-width: map-get($breakpoints, "lg")) {
          max-width: map-get($viewports, "lg");
        }
      }
      @if map-get($breakpoints, "xl") and $enable-viewport {
        @media (min-width: map-get($breakpoints, "xl")) {
          max-width: map-get($viewports, "xl");
        }
      }
    }
  }
  // Semantic container
  @else {
    padding: var(--s1) 0;
  }
}
header, main {
  padding-top: 0;
  margin-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  hr {
    margin:0.1rem 0
  }
}
footer{
  line-height: var(--lhh);
  hr, p {
    margin: 0.1rem 0 .3rem
  }
}