Permalink
Browse files

Fix #11 separate counter name of toc and contents

  • Loading branch information...
ipari committed May 20, 2018
1 parent a3bf5e1 commit 5af8cce0b3df97e45346f4fb3c6c8201321cff4b
Showing with 34 additions and 14 deletions.
  1. +34 −14 css/content.less
@@ -22,32 +22,51 @@
/*____________ Numbered Headings ____________*/
.page.numbered_heading {
counter-reset: level1;
#dw__toc > div {
counter-reset: level1;
}
h2,
/* TOC */
#dw__toc li.level1 {
counter-reset: level2;
counter-reset: toc-level1;
}
#dw__toc li.level2 > div > a:before {
color: @ini_numbered_heading;
content: counter(toc-level1) ". ";
counter-increment: toc-level1;
}
h3,
#dw__toc li.level2 {
counter-reset: level3;
counter-reset: toc-level2;
}
h2:before,
#dw__toc li.level1 a:before {
#dw__toc li.level3 > div > a:before {
color: @ini_numbered_heading;
content: counter(toc-level1) "." counter(toc-level2) ". ";
counter-increment: toc-level2;
}
#dw__toc li.level3 {
counter-reset: toc-level3;
}
#dw__toc li.level4 > div > a:before {
color: @ini_numbered_heading;
content: counter(toc-level1) "." counter(toc-level2) "." counter(toc-level3) ". ";
counter-increment: toc-level3;
}
/* Contents */
counter-reset: level1;
h2:before {
color: @ini_numbered_heading;
content: counter(level1) ". ";
counter-increment: level1;
}
h3:before,
#dw__toc li.level2 a:before {
h2 {
counter-reset: level2;
}
h3:before {
color: @ini_numbered_heading;
content: counter(level1) "." counter(level2) ". ";
counter-increment: level2;
}
h4:before,
#dw__toc li.level3 a:before {
h3 {
counter-reset: level3;
}
h4:before {
color: @ini_numbered_heading;
content: counter(level1) "." counter(level2) "." counter(level3) ". ";
counter-increment: level3;
@@ -57,6 +76,7 @@
h4:before {
font-size: 90%;
}
#dw__toc h3:before {
content: '';
}

0 comments on commit 5af8cce

Please sign in to comment.