hexo-theme-stellar/source/css/_layout/sidebar/toc_common.styl

67 lines
1.4 KiB
Stylus

.widget-wrap#toc .widget-header
line-height: 2.4
#toc .widget-body
line-height: 1.2
margin-top: 0
ul ul, ul ol
padding-left: 0
ol ul, ol ol
padding-left: 0
.doc-tree
margin: 4px 0
.toc
padding: 0
margin: 0
padding-left: 0.25rem
.toc-item .toc-link
padding: 0.5rem
font-weight: 500
font-size: $fs-13
color: var(--text-p2)
.toc-child .toc-item .toc-link
padding: 0.25rem 0.5rem 0.25rem 1.3rem
font-weight: 400
color: var(--text-p2)
.toc-child .toc-child .toc-item .toc-link
padding-left: 2.1rem
font-size: $fs-12
color: var(--text-p3)
.toc-child .toc-child .toc-child .toc-item .toc-link
padding-left: 2.9rem
#toc .toc-item
color: var(--text-p2)
font-size: $fs-12
padding: 0
list-style: none
&.active
color: $color-theme
border-left-color: @color
.toc-child .toc-item
padding: 0
#toc a.toc-link
color: inherit
display: block
line-height: 1.2
border-radius: 4px
position: relative
&:before
content: ''
position: absolute
left: -6px
top: 'calc(50% - %s)' % 6px
bottom: 'calc(50% - %s)' % 6px
width: 2px
border-radius: 2px
background: $color-theme
visibility: hidden
&:hover
background: var(--block-hover)
&.active
color: var(--theme-highlight) !important
&:before
visibility: visible