Skip to content

Commit 34a5ef8

Browse files
committed
style: toc list-style
1 parent e7b1719 commit 34a5ef8

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

assets/style.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,31 @@ html {
189189
font-weight: bold;
190190
}
191191

192+
.toc > ul {
193+
padding-inline-start: 0;
194+
counter-reset: cate;
195+
}
196+
197+
.toc > ul ul{
198+
padding-inline-start: 2rem;
199+
counter-reset: sec;
200+
counter-increment: cate;
201+
}
202+
203+
.toc > ul ul li {
204+
list-style: none;
205+
counter-increment: sec;
206+
}
207+
208+
.toc > ul ul li a::before {
209+
content: counter(cate) "." counter(sec) ". ";
210+
}
211+
212+
.toc li {
213+
list-style: none;
214+
padding-inline-start: 0;
215+
}
216+
192217
@media screen and (max-width: 800px) {
193218
.toc {
194219
display: none;

0 commit comments

Comments
 (0)