[opt] toc auto expand

This commit is contained in:
xaoxuu 2023-12-24 15:01:08 +08:00
parent 1a6febc339
commit a0958f13c2
1 changed files with 12 additions and 1 deletions

View File

@ -24,7 +24,7 @@
padding: 0.5rem padding: 0.5rem
font-weight: 500 font-weight: 500
font-size: $fs-13 font-size: $fs-13
color: var(--text-p2) color: var(--text-p1)
.toc-child .toc-item .toc-link .toc-child .toc-item .toc-link
padding: 0.25rem 0.5rem 0.25rem 1.3rem padding: 0.25rem 0.5rem 0.25rem 1.3rem
font-weight: 400 font-weight: 400
@ -69,3 +69,14 @@
color: $color-theme !important color: $color-theme !important
&:before &:before
visibility: visible visibility: visible
//
.toc-item a.toc-link+ol
display: none
.toc a.toc-link.active+ol
display: block
ol:has(> .toc-item a.active)
display: block
.doc-tree:hover a.toc-link+ol
display: block