aboutsummaryrefslogtreecommitdiff
path: root/sass/include/_toc.scss
blob: b3ad2c4a210bf0fc75e05feb4cd4f7a24b31016f (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
/**
 * TOC - Table of Contents
 * used as a page index, recent posts block
 */
@use "../variables" as variables;

main {
  .toc {
    max-width: 15rem;
    min-width: 14rem;
    margin-left: var(--s1);
  }
  .toc-item {
    padding: .4rem 0;
    color: var(--f1);
  }
  .toc-item a, .toc-item-child a {
    color: var(--f1);
    &:hover {
      cursor: pointer;
      color: var(--a2);
      text-decoration: underline;
    }
  }
  .toc-item a.active, .toc-item-child a.active {
    color: var(--a2);
  }
  .toc-item-child {
    padding: 0 var(--s1);
    color: var(--f1);
  }
}
.toc-sticky {
  border-radius: var(--br);
  border-top: 5px solid var(--a1);
  background-color: var(--c2);
  position: sticky;
  top: var(--s2);
  margin-top: var(--s2);
  padding: 0 var(--s2) var(--s2);
  max-height: 100vh;
  overflow: auto;
}
@if map-get(variables.$breakpoints, "md") {
  @media (max-width: map-get(variables.$breakpoints, "md")) {
    .toc {
      display: none;
    }
  }
}