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.scss73
1 files changed, 37 insertions, 36 deletions
diff --git a/src/objects/_tabbar.scss b/src/objects/_tabbar.scss
index 58701b7..bd937d0 100644
--- a/src/objects/_tabbar.scss
+++ b/src/objects/_tabbar.scss
@@ -14,14 +14,23 @@
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 overflow-inline: auto; 19 overflow-inline: auto;
21 box-shadow: 0 calc(-1 * props.get(vars.$indicator--width)) 0 0 props.get(vars.$railing--bg-color) inset; 20
21 &::after {
22 display: block;
23 flex: 1 1 auto;
24 block-size: props.get(vars.$indicator--width);
25 margin-block-start: 0;
26 content: '';
27 background-color: props.get(vars.$railing--bg-color);
28 }
22 29
23 @include bem.modifier('quiet') { 30 @include bem.modifier('quiet') {
24 box-shadow: none; 31 &::after {
32 display: none;
33 }
25 } 34 }
26 35
27 @include bem.modifier('adapt') { 36 @include bem.modifier('adapt') {
@@ -29,12 +38,12 @@
29 } 38 }
30 39
31 @include bem.elem('tab') { 40 @include bem.elem('tab') {
32 position: relative; 41 position: relative;
33 display: flex; 42 display: flex;
34 align-items: center; 43 align-items: center;
35 color: props.get(vars.$tab--text-color); 44 padding-inline: calc(.5 * props.get(vars.$spacing));
36 white-space: nowrap; 45 color: props.get(vars.$tab--text-color);
37 border-block: props.get(vars.$indicator--width) solid transparent; 46 white-space: nowrap;
38 47
39 &::before { 48 &::before {
40 position: absolute; 49 position: absolute;
@@ -47,6 +56,17 @@
47 transform: translateY(-50%); 56 transform: translateY(-50%);
48 } 57 }
49 58
59 &::after {
60 position: absolute;
61 inset-block-end: 0;
62 inset-inline: calc(.5 * props.get(vars.$spacing));
63 z-index: -10;
64 display: none;
65 block-size: props.get(vars.$indicator--width);
66 content: '';
67 background-color: props.get(vars.$tab--selected--text-color);
68 }
69
50 &:link, 70 &:link,
51 &:visited { 71 &:visited {
52 &:hover, 72 &:hover,
@@ -68,8 +88,11 @@
68 } 88 }
69 89
70 @include bem.is('selected') { 90 @include bem.is('selected') {
71 color: props.get(vars.$tab--selected--text-color); 91 color: props.get(vars.$tab--selected--text-color);
72 border-block-end-color: props.get(vars.$tab--selected--text-color); 92
93 &::after {
94 display: block;
95 }
73 } 96 }
74 } 97 }
75 98
@@ -79,36 +102,14 @@
79 102
80 @include bem.modifier('accent') { 103 @include bem.modifier('accent') {
81 @include bem.elem('tab') { 104 @include bem.elem('tab') {
82 @include bem.is('selected') { 105 &::after {
83 color: props.get(vars.$tab--accent--text-color); 106 background-color: props.get(vars.$tab--accent--text-color);
84 border-block-end-color: props.get(vars.$tab--accent--text-color);
85 } 107 }
86 }
87 }
88
89 @include bem.is('collapsed') {
90 @include bem.elem('tab') {
91 display: none;
92 108
93 @include bem.is('selected') { 109 @include bem.is('selected') {
94 display: flex; 110 color: props.get(vars.$tab--accent--text-color);
95 color: props.get(vars.$tab--text-color);
96 border-block-end-color: transparent;
97
98 &:link,
99 &:visited {
100 &:hover,
101 &:active,
102 &:focus-visible {
103 color: props.get(vars.$tab--selected--text-color);
104 }
105 }
106 } 111 }
107 } 112 }
108
109 @include bem.elem('caret') {
110 display: block;
111 }
112 } 113 }
113 } 114 }
114} 115}