From ca683b41654c4195edf301015acba3c1c8bbd5a7 Mon Sep 17 00:00:00 2001 From: mustakshif Date: Mon, 23 Sep 2024 01:10:30 +0800 Subject: [PATCH] v3.1.6: finalizing --- .../features/filetree-indents-indicator.scss | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/style/features/filetree-indents-indicator.scss b/style/features/filetree-indents-indicator.scss index e69de29..23ddb3e 100644 --- a/style/features/filetree-indents-indicator.scss +++ b/style/features/filetree-indents-indicator.scss @@ -0,0 +1,72 @@ + +// 文档树缩进参考线 indent guides +.file-tree>.fn__flex-1 { + $uls: '>ul'; + $indent: 18px; + $indent-start: 22px; + + @for $i from 1 through 7 { + $uls: str-insert($string: $uls, $insert: '>ul', $index: 100); + + &#{$uls} { + span.b3-list-item__toggle { + padding-left: 4px !important; + } + + // margin-left: $indent-start; + margin-left: $indent; + box-shadow: 1px 0 transparent inset; + } + + // $indent-start: $indent; + } + + &>ul ul { + transition: 0.2s; + } + + &:hover>ul ul, + li.b3-list-item--focus+ul, + ul.has-focus { + box-shadow: 1px 0 oklch(from var(--b3-theme-on-background) l c h / .15) inset; + + @include darkmode-counterpart { + box-shadow: 1px 0 oklch(from var(--b3-theme-on-background) l c h / .15) inset; + } + + @supports not (color: oklch(from red calc(l * 0.5) 0 h)) { + box-shadow: 1px 0 pickThemeColor($theme-light, on-background, 0.15) inset; + + + @include darkmode-counterpart { + box-shadow: 1px 0 pickThemeColor($theme-dark, on-background, 0.15) inset; + } + } + } + + // -> js + + &:hover li.b3-list-item--focus+ul, + &:hover ul.has-focus { + box-shadow: 1px 0 oklch(from var(--b3-theme-on-background) l c h / .3) inset; + + @include darkmode-counterpart { + box-shadow: 1px 0 oklch(from var(--b3-theme-on-background) l c h / .3) inset; + } + + @supports not (color: oklch(from red calc(l * 0.5) 0 h)) { + box-shadow: 1px 0 pickThemeColor($theme-light, on-background, 0.3) inset; + + + @include darkmode-counterpart { + box-shadow: 1px 0 pickThemeColor($theme-dark, on-background, 0.3) inset; + } + } + } + + // -> js + + &>ul { + box-shadow: none !important; + } +} \ No newline at end of file