From b0fc27223109d9ace009950cdd16c4b727369686 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 23 Nov 2024 14:22:30 +0100 Subject: Tabbar --- src/objects/_tabbar.scss | 42 ++++++++---------------------------------- 1 file changed, 8 insertions(+), 34 deletions(-) diff --git a/src/objects/_tabbar.scss b/src/objects/_tabbar.scss index bd937d0..ce6a890 100644 --- a/src/objects/_tabbar.scss +++ b/src/objects/_tabbar.scss @@ -14,23 +14,13 @@ @include bem.object('tabbar') { position: relative; display: flex; + gap: props.get(vars.$spacing); min-inline-size: 0; block-size: props.get(vars.$block-size); - overflow-inline: auto; - - &::after { - display: block; - flex: 1 1 auto; - block-size: props.get(vars.$indicator--width); - margin-block-start: 0; - content: ''; - background-color: props.get(vars.$railing--bg-color); - } + box-shadow: 0 calc(-1 * props.get(vars.$indicator--width)) 0 0 props.get(vars.$railing--bg-color) inset; @include bem.modifier('quiet') { - &::after { - display: none; - } + box-shadow: none; } @include bem.modifier('adapt') { @@ -44,6 +34,7 @@ padding-inline: calc(.5 * props.get(vars.$spacing)); color: props.get(vars.$tab--text-color); white-space: nowrap; + border-block: props.get(vars.$indicator--width) solid transparent; &::before { position: absolute; @@ -56,17 +47,6 @@ transform: translateY(-50%); } - &::after { - position: absolute; - inset-block-end: 0; - inset-inline: calc(.5 * props.get(vars.$spacing)); - z-index: -10; - display: none; - block-size: props.get(vars.$indicator--width); - content: ''; - background-color: props.get(vars.$tab--selected--text-color); - } - &:link, &:visited { &:hover, @@ -88,11 +68,8 @@ } @include bem.is('selected') { - color: props.get(vars.$tab--selected--text-color); - - &::after { - display: block; - } + color: props.get(vars.$tab--selected--text-color); + border-block-end-color: props.get(vars.$tab--selected--text-color); } } @@ -102,12 +79,9 @@ @include bem.modifier('accent') { @include bem.elem('tab') { - &::after { - background-color: props.get(vars.$tab--accent--text-color); - } - @include bem.is('selected') { - color: props.get(vars.$tab--accent--text-color); + color: props.get(vars.$tab--accent--text-color); + border-block-end-color: props.get(vars.$tab--accent--text-color); } } } -- cgit v1.2.3-70-g09d2