From 7166bcd83e7c7bb9d83ddcb7bf64e6951b7887e9 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Sat, 3 Jul 2021 23:09:52 +0800 Subject: [PATCH] sidebar --- source/css/_layout/sidebar/toc_common.styl | 12 ++++++++++++ source/css/_layout/sidebar/toc_wiki.styl | 6 ++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/source/css/_layout/sidebar/toc_common.styl b/source/css/_layout/sidebar/toc_common.styl index 48d7fb0..835a154 100644 --- a/source/css/_layout/sidebar/toc_common.styl +++ b/source/css/_layout/sidebar/toc_common.styl @@ -42,7 +42,19 @@ 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 diff --git a/source/css/_layout/sidebar/toc_wiki.styl b/source/css/_layout/sidebar/toc_wiki.styl index e4a2d37..0456acb 100644 --- a/source/css/_layout/sidebar/toc_wiki.styl +++ b/source/css/_layout/sidebar/toc_wiki.styl @@ -36,10 +36,12 @@ &:hover background: var(--block-hover) &:after - content: '' - + content: none >.toc padding: 4px background: var(--card) + a.toc-link:before + left: -2px + width: 4px a.toc-link:hover background: var(--block)