summaryrefslogtreecommitdiffstats
path: root/src/objects/_tabbar.scss
diff options
context:
space:
mode:
Diffstat (limited to 'src/objects/_tabbar.scss')
-rw-r--r--src/objects/_tabbar.scss35
1 files changed, 25 insertions, 10 deletions
diff --git a/src/objects/_tabbar.scss b/src/objects/_tabbar.scss
index 8518525..68666dc 100644
--- a/src/objects/_tabbar.scss
+++ b/src/objects/_tabbar.scss
@@ -14,7 +14,6 @@
14 @include bem.object('tabbar') { 14 @include bem.object('tabbar') {
15 position: relative; 15 position: relative;
16 display: flex; 16 display: flex;
17 gap: props.get(vars.$spacing);
18 min-inline-size: 0; 17 min-inline-size: 0;
19 block-size: props.get(vars.$block-size); 18 block-size: props.get(vars.$block-size);
20 margin-inline: calc(-.5 * props.get(vars.$spacing)); 19 margin-inline: calc(-.5 * props.get(vars.$spacing));
@@ -44,7 +43,7 @@
44 position: relative; 43 position: relative;
45 display: flex; 44 display: flex;
46 align-items: center; 45 align-items: center;
47 padding-inline: calc(.5 * props.get(vars.$spacing)); 46 padding-inline-end: calc(.5 * props.get(vars.$spacing));
48 color: props.get(vars.$tab--text-color); 47 color: props.get(vars.$tab--text-color);
49 white-space: nowrap; 48 white-space: nowrap;
50 border-block: props.get(vars.$indicator--width) solid transparent; 49 border-block: props.get(vars.$indicator--width) solid transparent;
@@ -61,6 +60,16 @@
61 transform: translateY(-50%); 60 transform: translateY(-50%);
62 } 61 }
63 62
63 &::after {
64 position: absolute;
65 inset-block-end: 0;
66 inset-inline: calc(.5 * props.get(vars.$spacing));
67 z-index: 10;
68 display: none;
69 content: '';
70 background-color: props.get(vars.$tab--selected--text-color);
71 }
72
64 &:link, 73 &:link,
65 &:visited { 74 &:visited {
66 &:hover, 75 &:hover,
@@ -81,21 +90,27 @@
81 } 90 }
82 } 91 }
83 92
84 @include bem.is('selected') { 93 @include bem.next-twin-elem {
85 color: props.get(vars.$tab--selected--text-color); 94 padding-inline-start: calc(.5 * props.get(vars.$spacing));
86 border-block-end-color: props.get(vars.$tab--selected--text-color);
87 } 95 }
88 }
89 96
90 @include bem.elem('caret') { 97 @include bem.is('selected') {
91 display: none; 98 color: props.get(vars.$tab--selected--text-color);
99
100 &::after {
101 display: block;
102 }
103 }
92 } 104 }
93 105
94 @include bem.modifier('accent') { 106 @include bem.modifier('accent') {
95 @include bem.elem('tab') { 107 @include bem.elem('tab') {
108 &::after {
109 background-color: props.get(vars.$tab--accent--text-color);
110 }
111
96 @include bem.is('selected') { 112 @include bem.is('selected') {
97 color: props.get(vars.$tab--accent--text-color); 113 color: props.get(vars.$tab--accent--text-color);
98 border-block-end-color: props.get(vars.$tab--accent--text-color);
99 } 114 }
100 } 115 }
101 } 116 }