5
5
$tabs-background-color : theme (' tabs-background-color' , transparent );
6
6
$tabs-border-color : theme (' tabs-border-color' , transparent );
7
7
$tabs-color : theme (' tabs-color' , colors .neutral (600 ));
8
- $tabs-delimiter -color : theme (' tabs-color' , colors .neutral (400 ));
8
+ $tabs-hover -color : theme (' tabs-hover-border- color' , colors .neutral (700 ));
9
9
$tabs-selected-color : theme (' tabs-selected-color' , colors .primary (500 ));
10
10
$tabs-selected-border-color : theme (
11
11
' tabs-selected-border-color' ,
12
12
colors .primary (500 )
13
13
);
14
- $tabs-hover-color : theme (' tabs-hover-border-color' , colors .neutral (700 ));
14
+ $tabs-hover-selected-color : theme (
15
+ ' tabs-hover-selected-color' ,
16
+ colors .primary (600 )
17
+ );
18
+ $tabs-hover-selected-border-color : theme (
19
+ ' tabs-hover-selected-border-color' ,
20
+ colors .primary (600 )
21
+ );
15
22
$tabs-active-color : theme (' tabs-active-color' , colors .neutral (800 ));
23
+ $tabs-active-selected-color : theme (
24
+ ' tabs-active-selected-color' ,
25
+ colors .primary (700 )
26
+ );
27
+ $tabs-active-selected-border-color : theme (
28
+ ' tabs-active-selected-border-color' ,
29
+ colors .primary (700 )
30
+ );
16
31
$tabs-focus-border-color : theme (' tabs-focus-border-color' , colors .primary (500 ));
17
32
$tabs-focus-shadow-color : theme (' tabs-focus-shadow-color' , colors .primary (100 ));
18
33
$tabs-disabled-color : theme (' tabs-disabled-color' , colors .neutral (500 ));
34
+ $tabs-disabled-selected-color : theme (
35
+ ' tabs-disabled-selected-color' ,
36
+ colors .primary (200 )
37
+ );
38
+ $tabs-disabled-selected-border-color : theme (
39
+ ' tabs-disabled-selected-border-color' ,
40
+ colors .primary (200 )
41
+ );
19
42
20
43
// TODO: Indication that there are more tab__items left to scroll (some sort of shadow maybe)
21
44
.rcx-tabs {
22
45
position : relative ;
23
46
24
47
display : flex ;
25
-
26
- & ::after {
27
- position : absolute ;
28
- z-index : -1 ;
29
- inset-block-end : lengths .inset (none );
30
- inset-inline : lengths .inset (none );
31
-
32
- height : lengths .border-width (2 );
33
-
34
- content : ' ' ;
35
-
36
- background-color : $tabs-delimiter-color ;
37
- }
38
48
}
39
49
40
50
.rcx-tabs__scroll-box {
@@ -65,27 +75,21 @@ $tabs-disabled-color: theme('tabs-disabled-color', colors.neutral(500));
65
75
66
76
min-height : lengths .size (40 );
67
77
68
- padding : (lengths .padding (4 ) + lengths .border-width (2 )) lengths .padding (16 );
78
+ margin : lengths .margin (none ) lengths .margin (12 );
79
+ padding : (lengths .padding (4 ) + lengths .border-width (2 )) lengths .padding (none );
69
80
70
81
color : $tabs-color ;
71
82
border-width : lengths .border-width (2 );
72
83
73
84
border-style : solid ;
74
85
border-color : transparent ;
75
86
background-color : transparent ;
87
+ border-block-end-width : lengths .border-width (4 );
88
+ border-inline-width : lengths .border-width (none );
76
89
77
90
@include clickable ;
78
91
@include typography .use-font-scale (s2);
79
92
80
- & --selected {
81
- padding : lengths .padding (4 ) (lengths .padding (16 ) + lengths .border-width (2 ));
82
-
83
- color : $tabs-selected-color ;
84
- border-block-end-color : $tabs-selected-border-color ;
85
- border-block-end-width : lengths .border-width (4 );
86
- border-inline-width : lengths .border-width (none );
87
- }
88
-
89
93
& .hover ,
90
94
& :hover {
91
95
color : $tabs-hover-color ;
@@ -96,24 +100,54 @@ $tabs-disabled-color: theme('tabs-disabled-color', colors.neutral(500));
96
100
color : $tabs-active-color ;
97
101
}
98
102
99
- & --disabled {
100
- color : $tabs-disabled-color ;
101
- }
102
-
103
103
@include on-focus-visible {
104
- padding-inline : lengths .padding (16 );
105
-
106
104
border-color : $tabs-focus-border-color ;
107
105
border-radius : lengths .border-radius (2 );
108
106
border-block-start-width : lengths .border-width (2 );
109
107
border-inline-width : lengths .border-width (2 );
110
108
111
109
@include use-focus-shadow ($tabs-focus-shadow-color );
112
110
}
113
- }
114
111
115
- @include on-breakpoint (' md' ) {
116
- .rcx-tabs__wrapper {
117
- margin-inline : lengths .margin (24 );
112
+ & --disabled {
113
+ cursor : not-allowed ;
114
+
115
+ color : $tabs-disabled-color ;
116
+
117
+ & :hover {
118
+ color : $tabs-disabled-color ;
119
+ }
120
+ }
121
+
122
+ & --selected {
123
+ padding : lengths .padding (4 ) lengths .padding (none );
124
+
125
+ color : $tabs-selected-color ;
126
+ border-block-end-color : $tabs-selected-border-color ;
127
+ border-block-end-width : lengths .border-width (4 );
128
+ border-inline-width : lengths .border-width (none );
129
+
130
+ & :hover {
131
+ color : $tabs-hover-selected-color ;
132
+ border-block-end-color : $tabs-hover-selected-border-color ;
133
+ }
134
+
135
+ & .active ,
136
+ & :active {
137
+ color : $tabs-active-selected-color ;
138
+ border-block-end-color : $tabs-active-selected-border-color ;
139
+ }
140
+
141
+ & --disabled {
142
+ cursor : not-allowed ;
143
+
144
+ color : $tabs-disabled-selected-color ;
145
+ border-block-end-color : $tabs-disabled-selected-border-color ;
146
+
147
+ & :hover {
148
+ color : $tabs-disabled-selected-color ;
149
+ border-block-end-color : $tabs-disabled-selected-border-color ;
150
+ }
151
+ }
118
152
}
119
153
}
0 commit comments