aboutsummaryrefslogtreecommitdiff
path: root/assets/plugins/_numbered.scss
blob: a1e89d8aaf4d0c177e140752e858914f75b2d2ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.book-page {
  .markdown {
    @for $h from 1 through 6 {
      > h#{$h} {
        counter-increment: h#{$h};
        counter-reset: h#{$h + 1};

        $content: "";
        @for $n from 1 through $h {
          $content: $content + 'counter(h#{$n})"."';
        }

        &::before {
          content: unquote($content) " ";
        }
      }
    }
  }

  + .book-toc nav ul {
    list-style: decimal;
  }
}