MediaWiki:Common.css

/* Cf. https://codepen.io/X-Raym/pen/dBprG */

body { counter-reset : h2; }

h2 { counter-reset : h3; }

h3 { counter-reset : h4; }

h4 { counter-reset : h5; }

h5 { counter-reset : h6; }

.countheads h2:before { content : counter(h2,decimal) ". "; counter-increment : h2; }

.countheads h3:before { content : counter(h2,decimal) "." counter(h3,decimal) ". "; counter-increment : h3; }

.countheads h4:before { content : counter(h2,decimal) "." counter(h3,decimal) "." counter(h4,decimal) ". "; counter-increment : h4; }

.countheads h5:before { content : counter(h2,decimal) "." counter(h3,decimal) "." counter(h4,decimal) "." counter(h5,decimal) ". "; counter-increment : h5; }

.countheads 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; }