From 01b2c9ba7fdca374c5438828e56233dd35739cf5 Mon Sep 17 00:00:00 2001 From: razonyang Date: Sun, 13 Oct 2024 00:40:59 +0800 Subject: [PATCH] fix: active style for first level nav items --- assets/hb/modules/docs/scss/_nav.scss | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/assets/hb/modules/docs/scss/_nav.scss b/assets/hb/modules/docs/scss/_nav.scss index c5bf0fc7..dc2a87e3 100644 --- a/assets/hb/modules/docs/scss/_nav.scss +++ b/assets/hb/modules/docs/scss/_nav.scss @@ -20,9 +20,7 @@ margin-top: 0.25rem; padding: 0.25rem 0.5rem; text-decoration: none; -} -.hb-docs-nav-heading { &:hover, &.active { background: var(--#{$prefix}primary-bg-subtle); @@ -31,21 +29,23 @@ .hb-docs-nav-link { position: relative; +} - &:hover, - &.active { - @if ($hb-docs-navs-active-style == '') { - background: var(--#{$prefix}primary-bg-subtle); - } +@if ($hb-docs-navs-active-style == 'bordered') { + .hb-docs-nav-links-group { + .hb-docs-nav-link { + &:hover, + &.active { + background: unset; - @if ($hb-docs-navs-active-style == 'bordered') { - &::before { - content: ""; - position: absolute; - left: 0; - margin-left: -.325rem; - border-left: 2px solid var(--#{$prefix}primary); - height: 1.25rem; + &::before { + content: ""; + position: absolute; + left: 0; + margin-left: -.325rem; + border-left: 2px solid var(--#{$prefix}primary); + height: 1.25rem; + } } } }