Skip to content

Commit 9d86627

Browse files
committed
scss: Populate heading counters for h5 and h6
1 parent 64ecc05 commit 9d86627

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

site/assets/css/site.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,23 @@ div.highlighter-rouge {
119119
}
120120
h5 {
121121
font-size: 1.16em;
122+
counter-increment: h5-section;
123+
~ h4 {
124+
counter-reset: h5-section;
125+
}
126+
> span::before {
127+
content: counter(h2-section) "." counter(h3-section) "." counter(h4-section) "." counter(h5-section) ".";
128+
}
122129
}
123130
h6 {
124131
font-size: 1em;
132+
counter-increment: h6-section;
133+
~ h5 {
134+
counter-reset: h6-section;
135+
}
136+
> span::before {
137+
content: counter(h2-section) "." counter(h3-section) "." counter(h4-section) "." counter(h5-section) "." counter(h6-section) ".";
138+
}
125139
}
126140

127141
h2, h3 {

0 commit comments

Comments
 (0)