Added support for document headings.
h3rald h3rald@h3rald.com
Fri, 06 Dec 2013 20:00:19 +0100
1 files changed,
75 insertions(+),
0 deletions(-)
jump to
A
headings.css
@@ -0,0 +1,75 @@
+h2 { + counter-reset:h3; + counter-increment: h2; +} +h2::before { + content: counter(h2) " " "\2013" " "; +} +h3 { + counter-reset:h4; + counter-increment: h3; +} +h3::before { + content: counter(h2) "." counter(h3) " " "\2013" " "; +} +h4 { + counter-reset:h5; + counter-increment: h4; +} +h4::before { + content: counter(h2) "." counter(h3) "." counter(h4) " " "\2013" " "; +} +h5 { + counter-reset:h6; + counter-increment: h5; +} +h5::before { + content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) " " "\2013" " "; +} +h6 { + counter-increment: h6; +} +h6::before { + content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) " " "\2013" " "; +} + +/***************/ + +#toc { + counter-reset: toc2; +} + +#toc li li a { + counter-reset:toc3; + counter-increment: toc2; +} +#toc li li a::before { + content: counter(toc2) " " "\2013" " "; +} +#toc li li li a { + counter-reset:toc4; + counter-increment: toc3; +} +#toc li li li a::before { + content: counter(toc2) "." counter(toc3) " " "\2013" " "; +} +#toc li li li li a { + counter-reset:toc5; + counter-increment: toc4; +} +#toc li li li li a::before { + content: counter(toc2) "." counter(toc3) "." counter(toc4) " " "\2013" " "; +} +#toc li li li li li a { + counter-reset:toc6; + counter-increment: toc5; +} +#toc li li li li li a::before { + content: counter(toc2) "." counter(toc3) "." counter(toc4) "." counter(toc5) " " "\2013" " "; +} +#toc li li li li li li a { + counter-increment: toc6; +} +#toc li li li li li li a::before { + content: counter(toc2) "." counter(toc3) "." counter(toc4) "." counter(toc5) "." counter(toc6) " " "\2013" " "; +}