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

75 lines
1.7 KiB
Stylus
Raw Normal View History

2021-02-19 23:33:19 +08:00
// toc padding
#toc .widget-body
line-height: 1.2
.toc
padding: 0
margin: 0
padding-left: 0.25rem
.toc-item .toc-link
padding: 0.5rem 0 0.5rem 1rem
font-weight: 500
2021-03-05 21:37:28 +08:00
font-size: $fs-13
2021-02-19 23:33:19 +08:00
color: var(--text-p2)
.toc-child .toc-item .toc-link
padding: 0.25rem 0 0.25rem 1.8rem
font-weight: 400
color: var(--text-p2)
.toc-child .toc-child .toc-item .toc-link
padding-left: 2.6rem
2021-03-05 21:37:28 +08:00
font-size: $fs-12
2021-02-19 23:33:19 +08:00
color: var(--text-p3)
.toc-child .toc-child .toc-child .toc-item .toc-link
padding-left: 3.4rem
.toc:only-child
.toc-item .toc-link
padding-left: 0.5rem
.toc-child .toc-item .toc-link
padding-left: 1.3rem
.toc-child .toc-child .toc-item .toc-link
padding-left: 2.1rem
.toc-child .toc-child .toc-child .toc-item .toc-link
padding-left: 2.9rem
#toc .toc-item
color: var(--text-p2)
2021-03-05 21:37:28 +08:00
font-size: $fs-12
2021-02-19 23:33:19 +08:00
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
&:hover
2021-03-08 17:54:23 +08:00
background: var(--block-hover)
2021-02-19 23:33:19 +08:00
&.active
color: var(--theme-highlight) !important
#toc .doc-tree
2021-03-08 17:54:23 +08:00
border-left: 2px solid var(--block-hover)
2021-02-19 23:33:19 +08:00
a.doc-tree-link
color: var(--text-p3)
padding: 0.5rem
display: block
border-top-right-radius: 4px
border-bottom-right-radius: 4px
2021-03-05 21:37:28 +08:00
font-size: $fs-12
2021-02-19 23:33:19 +08:00
font-weight: 500
&.active
color: var(--text-p2)
2021-03-05 21:37:28 +08:00
font-size: $fs-14
2021-02-19 23:33:19 +08:00
&:hover
2021-03-08 17:54:23 +08:00
background: var(--block-hover)
2021-02-19 23:33:19 +08:00
#toc .widget-body.wiki
.doc-tree.active
border-color: var(--text-meta)
.doc-tree.active:only-child
2021-03-08 17:54:23 +08:00
border-color: var(--block-hover)