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.scss64
1 files changed, 37 insertions, 27 deletions
diff --git a/src/objects/_tabbar.scss b/src/objects/_tabbar.scss
index 8518525..131c832 100644
--- a/src/objects/_tabbar.scss
+++ b/src/objects/_tabbar.scss
@@ -12,28 +12,27 @@
12 @include materialize-at-root(meta.module-variables('vars')); 12 @include materialize-at-root(meta.module-variables('vars'));
13 13
14 @include bem.object('tabbar') { 14 @include bem.object('tabbar') {
15 position: relative;
16 display: flex;
17 gap: props.get(vars.$spacing);
18 min-inline-size: 0; 15 min-inline-size: 0;
19 block-size: props.get(vars.$block-size); 16 block-size: props.get(vars.$block-size);
20 margin-inline: calc(-.5 * props.get(vars.$spacing)); 17 overflow: hidden;
21 overflow-inline: auto;
22 18
23 &::after { 19 &::after {
24 display: block; 20 display: block;
25 flex: 1 1 auto;
26 block-size: props.get(vars.$indicator--width); 21 block-size: props.get(vars.$indicator--width);
27 margin-block-start: auto; 22 margin-block-start: calc(-1 * props.get(vars.$indicator--width));
28 margin-inline-end: calc(.5 * props.get(vars.$spacing));
29 content: ''; 23 content: '';
30 background-color: props.get(vars.$railing--bg-color); 24 background-color: props.get(vars.$railing--bg-color);
31 } 25 }
32 26
27 @include bem.elem('tabs') {
28 display: flex;
29 block-size: 100%;
30 margin-inline: calc(-.5 * props.get(vars.$spacing));
31 overflow-inline: auto;
32 }
33
33 @include bem.modifier('quiet') { 34 @include bem.modifier('quiet') {
34 &::after { 35 box-shadow: none;
35 display: none;
36 }
37 } 36 }
38 37
39 @include bem.modifier('adapt') { 38 @include bem.modifier('adapt') {
@@ -41,14 +40,12 @@
41 } 40 }
42 41
43 @include bem.elem('tab') { 42 @include bem.elem('tab') {
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: 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;
51 border-block-end-color: props.get(vars.$railing--bg-color);
52 49
53 &::before { 50 &::before {
54 position: absolute; 51 position: absolute;
@@ -61,6 +58,17 @@
61 transform: translateY(-50%); 58 transform: translateY(-50%);
62 } 59 }
63 60
61 &::after {
62 position: absolute;
63 inset-block-end: 0;
64 inset-inline: calc(.5 * props.get(vars.$spacing));
65 z-index: 10;
66 display: none;
67 block-size: props.get(vars.$indicator--width);
68 content: '';
69 background-color: props.get(vars.$tab--selected--text-color);
70 }
71
64 &:link, 72 &:link,
65 &:visited { 73 &:visited {
66 &:hover, 74 &:hover,
@@ -82,20 +90,22 @@
82 } 90 }
83 91
84 @include bem.is('selected') { 92 @include bem.is('selected') {
85 color: props.get(vars.$tab--selected--text-color); 93 color: props.get(vars.$tab--selected--text-color);
86 border-block-end-color: props.get(vars.$tab--selected--text-color); 94
95 &::after {
96 display: block;
97 }
87 } 98 }
88 } 99 }
89 100
90 @include bem.elem('caret') {
91 display: none;
92 }
93
94 @include bem.modifier('accent') { 101 @include bem.modifier('accent') {
95 @include bem.elem('tab') { 102 @include bem.elem('tab') {
103 &::after {
104 background-color: props.get(vars.$tab--accent--text-color);
105 }
106
96 @include bem.is('selected') { 107 @include bem.is('selected') {
97 color: props.get(vars.$tab--accent--text-color); 108 color: props.get(vars.$tab--accent--text-color);
98 border-block-end-color: props.get(vars.$tab--accent--text-color);
99 } 109 }
100 } 110 }
101 } 111 }