~abcdw/trop.in

f06135e605c8460ed9707c393f2637b0abc65660 — Andrew Tropin 4 months ago 00d16b4
Number heading only inside post-content div
1 files changed, 13 insertions(+), 10 deletions(-)

M assets/paper.css
M assets/paper.css => assets/paper.css +13 -10
@@ 1,30 1,33 @@
body{counter-reset: section}
h2{counter-reset: sub-section}
h3{counter-reset: composite}
h4{counter-reset: detail}

h2:before{
.post-content>h2{counter-reset: sub-section}
.post-content>h3{counter-reset: composite}
.post-content>h4{counter-reset: detail}

.post-content>h2:before{
    counter-increment: section;
    content: counter(section) ".\0000a0\0000a0";
}
h2.nonumber:before {
.post-content>h2.nonumber:before {
    content: none;
    counter-increment: none;
}
h3:before{
.post-content>h3:before{
    counter-increment: sub-section;
    content: counter(section) "." counter(sub-section) " ";
}
h4:before{
.post-content>h4:before{
    counter-increment: composite;
    content: counter(section) "." counter(sub-section) "." counter(composite) " ";
}
h5:before{
.post-content>h5:before{
    counter-increment: detail;
    content: counter(section) "." counter(sub-section) "." counter(composite) "." counter(detail) " ";
}

a,
a:visited {
a {
    color: black;
}
a:visited {
    color: grey;
}