From: Luke Kenneth Casson Leighton Date: Fri, 6 Sep 2019 10:53:09 +0000 (+0100) Subject: add numbering to headings css X-Git-Tag: convert-csv-opcode-to-binary~4151 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7895302ea2083bb2689ea02d65160d08b42e30b4;p=libreriscv.git add numbering to headings css --- diff --git a/local.css b/local.css index d20a33119..60983c69a 100644 --- a/local.css +++ b/local.css @@ -40,6 +40,58 @@ p{ ol{ margin-left: 2em; } +/* Counter Headings */ +body { +counter-reset : h2; + } + +h2 { +counter-reset : h3; + } + +h3 { +counter-reset : h4; + } + +h4 { +counter-reset : h5; + } + +h5 { +counter-reset : h6; + } + +#content h2:before { +content : counter(h2,decimal) ". "; +counter-increment : h2; + } + +#content h3:before { +content : counter(h2,decimal) "." counter(h3,decimal) ". "; +counter-increment : h3; + } + +#content h4:before { +content : counter(h2,decimal) "." counter(h3,decimal) "." counter(h4,decimal) ". "; +counter-increment : h4; + } + +#content h5:before { +content : counter(h2,decimal) "." counter(h3,decimal) "." counter(h4,decimal) "." counter(h5,decimal) ". "; +counter-increment : h5; + } + +#content h6:before { +content : counter(h2,decimal) "." counter(h3,decimal) "." counter(h4,decimal) "." counter(h5,decimal) "." counter(h6,decimal) ". "; +counter-increment : h6; + } + +h2.nocount:before, h3.nocount:before, h4.nocount:before, h5.nocount:before, h6.nocount:before { +content : ""; +counter-increment : none; + } + + /* Headings */ .pageheader { min-height: 100px; overflow: none; width: 95%; margin: 4px; }