From 511df11546596b464e68b59c787dd8a23bee1325 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Mon, 30 Jan 2023 03:08:35 +0800 Subject: [PATCH] refactor: optimize tab cursor position calculation --- _sass/addon/commons.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss index 8ac6f7d..7665ab0 100644 --- a/_sass/addon/commons.scss +++ b/_sass/addon/commons.scss @@ -841,7 +841,7 @@ $sidebar-display: "sidebar-display"; @for $i from 1 through $tab-count { $offset: $tab-count - $i; - $top: calc(-#{$offset} * #{$tab-height} + (#{$tab-height} - #{$tab-cursor-height}) / 2); + $top: (-$offset * $tab-height) + (($tab-height - $tab-cursor-height) * 0.5); @if $i < $tab-count { > li.active:nth-child(#{$i}),