From 7895302ea2083bb2689ea02d65160d08b42e30b4 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 6 Sep 2019 11:53:09 +0100 Subject: [PATCH] add numbering to headings css --- local.css | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) 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; } -- 2.30.2