aboutsummaryrefslogtreecommitdiff
path: root/src/css/_partial/_post/_toc.scss
blob: 83270550fa58416d275d82ac16de0eb4c5910d4f (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
.post-toc {
  position: absolute;
  width: $post-toc-width;
  margin-left: $post-toc-margin-left;
  padding: 10px;
  font-family: $global-serif-font-family;
  border-radius: 5px;
  background: $post-toc-backgroud;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.125);
  word-wrap: break-word;
  box-sizing: border-box;

  .post-toc-title {
    margin: 0 10px;
    font-size: $post-toc-title-size;
    font-weight: 400;
    text-transform: uppercase;
  }

  .post-toc-content {
    font-size: $post-toc-content;

    &.always-active ul {
      display: block;
    }

    >nav>ul {
      margin: 10px 0;
    }

    ul {
      padding-left: 20px;
      list-style: $post-toc-list-style;

      ul {
        padding-left: 15px;
        display: none;
      }

      .has-active > ul {
        display: block;
      }
    }

    .toc-link.active {
      color: $theme-color;
    }
  }
}

@include max-screen($toc-max-sreen-width) {
  .post-toc {
    display: none;
  }
}