Improve sidebar cursor position calculation (fix #338)

This commit is contained in:
Cotes Chung 2021-05-27 01:05:01 +08:00
parent d5e08b05ab
commit ab927e9954
1 changed files with 2 additions and 2 deletions

View File

@ -740,12 +740,12 @@ $sidebar-display: "sidebar-display";
@for $i from 1 through $tab-count { @for $i from 1 through $tab-count {
$offset: $tab-count - $i; $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 { @if $i < $tab-count {
> li.active:nth-child(#{$i}), > li.active:nth-child(#{$i}),
> li.nav-item:nth-child(#{$i}):hover { > li.nav-item:nth-child(#{$i}):hover {
~li:last-child::after { ~ li:last-child::after {
@include fix-cursor($top); @include fix-cursor($top);
} }
} }