summaryrefslogtreecommitdiffstats
path: root/assets/css/scopes/_page.scss
blob: 4a97b795189b0a0e6408c2001e2cfa9d08635f83 (plain) (blame)
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
89
90
91
92
93
94
95
96
97
.s-page {
  padding-left: $page-item-prefix-width;

  > :first-child {
    margin-top: 0;
  }

  h1,
  h2,
  h3,
  .c-refs__item,
  pre {
    position: relative;
    margin-left: -1 * $page-item-prefix-width;
    padding-left: $page-item-prefix-width;

    &::before {
      position: absolute;
      box-sizing: border-box;
      display: inline-block;
      margin-left: -1 * $page-item-prefix-width;
      padding-right: $page-item-prefix-pad;
      width: $page-item-prefix-width;
      color: var(--page-item-prefix-fg);
      font-size: 1rem;
      font-weight: normal;
      text-align: right;
    }

    @media (max-width: $breakpoint-sm) {
      margin-left: 0;
      padding-left: 0;

      &::before {
        display: none;
      }
    }
  }

  h1::before {
    content: "#";
  }

  h2::before {
    content: "##";
  }

  h3::before {
    content: "###";
  }

  .c-refs__item::before {
    content: "|>";
  }

  pre::before {
    content: str-repeat("``\A", 40);
    height: 100%;
    color: var(--page-item-prefix-fg);
    overflow: hidden;
    line-height: $code-block-line-height * ($code-block-font-size / $font-size);
  }

  hr {
    margin-left: -1 * $page-item-prefix-width;
  }

  .c-page-header {
    margin-left: -1 * $page-item-prefix-width;
    padding-left: $page-item-prefix-width;

    &::after {
      margin-left: -1 * $page-item-prefix-width;
    }

    @media (max-width: $breakpoint-sm) {
      margin-left: 0;
      padding-left: 0;

      &::after {
        margin-left: 0;
      }
    }
  }

  .c-nav {
    margin-left: -1 * $page-item-prefix-width;

    @media (max-width: $breakpoint-sm) {
      margin-left: 0;
    }
  }

  @media (max-width: $breakpoint-sm) {
    padding-left: 0;
  }
}