From ab927e9954749ad210e243035c29f275a156ee27 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Thu, 27 May 2021 01:05:01 +0800 Subject: [PATCH] Improve sidebar cursor position calculation (fix #338) --- _sass/addon/commons.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss index c2e93c0..f664234 100644 --- a/_sass/addon/commons.scss +++ b/_sass/addon/commons.scss @@ -740,12 +740,12 @@ $sidebar-display: "sidebar-display"; @for $i from 1 through $tab-count { $offset: $tab-count - $i; - $top: -$offset * $tab-height + $tab-cursor-height / 2; + $top: -$offset * $tab-height + ($tab-height - $tab-cursor-height) / 2; @if $i < $tab-count { > li.active:nth-child(#{$i}), > li.nav-item:nth-child(#{$i}):hover { - ~li:last-child::after { + ~ li:last-child::after { @include fix-cursor($top); } }