hexo-theme-keep/source/css/layout/_partial/toc.styl

91 lines
1.4 KiB
Stylus
Raw Normal View History

2020-04-21 10:47:36 +08:00
.post-toc-wrap {
position relative
box-sizing border-box
width 100%
height 100%
overflow-y auto
2022-10-11 12:42:11 +08:00
font-size 0.92rem
&::-webkit-scrollbar-thumb {
background var(--toc-scrollbar-color)
border-radius 0.3rem
}
&::-webkit-scrollbar-track {
background transparent
}
2020-04-28 23:20:17 +08:00
2020-04-21 10:47:36 +08:00
.post-toc {
ol {
margin 0
padding 0 2px 12px 10px
text-align left
list-style none
2020-04-21 10:47:36 +08:00
&:last-child {
padding-bottom 0
2020-04-21 10:47:36 +08:00
}
> ol {
padding-left 0
2020-04-21 10:47:36 +08:00
}
a {
transition-property all
transition()
2020-04-21 10:47:36 +08:00
}
}
2020-04-21 10:47:36 +08:00
.nav-item {
overflow hidden
line-height 1.8
white-space nowrap
text-overflow ellipsis
2020-04-21 10:47:36 +08:00
}
2020-04-21 10:47:36 +08:00
.nav {
.nav-child {
display hexo-config('toc.expand_all') ? block:none
2020-04-21 10:47:36 +08:00
}
.active > .nav-child {
display block
2020-04-21 10:47:36 +08:00
}
.active-current > .nav-child {
display block
2020-04-21 10:47:36 +08:00
> .nav-item {
display block
2020-04-21 10:47:36 +08:00
}
}
.nav-number
.nav-text {
color var(--default-text-color)
}
2020-04-21 10:47:36 +08:00
.active > a {
.nav-number
.nav-text {
color var(--primary-color)
2022-10-12 10:23:58 +08:00
font-weight bold
}
2020-04-21 10:47:36 +08:00
}
.active-current > a {
.nav-number
.nav-text {
color var(--primary-color)
2022-10-12 10:23:58 +08:00
font-weight bold
}
2020-04-21 10:47:36 +08:00
}
}
}
}