@swisspost/design-system-styles 6.6.4 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_svg-icon-map.scss +927 -907
- package/basics.css +1 -1
- package/components/_index.scss +4 -1
- package/components/alert.scss +6 -1
- package/components/badge.scss +25 -78
- package/components/button-group.scss +2 -4
- package/components/button.scss +82 -31
- package/components/card-control.scss +322 -0
- package/components/carousel.scss +1 -1
- package/components/chip.scss +159 -0
- package/components/datepicker.scss +24 -12
- package/components/error-container.scss +9 -0
- package/components/floating-label.scss +0 -1
- package/components/form-check.scss +118 -31
- package/components/form-range.scss +94 -19
- package/components/form-select.scss +64 -15
- package/components/form-validation.scss +32 -13
- package/components/forms.scss +51 -13
- package/components/intranet-header/_sidebar.scss +24 -5
- package/components/sizing.scss +2 -2
- package/components/spinner.scss +6 -12
- package/components/stepper.scss +283 -138
- package/components/subnavigation.scss +2 -5
- package/components/tables.scss +1 -1
- package/components/tabs/_tabs-wrapper.scss +1 -1
- package/components/tag.scss +82 -0
- package/components/topic-teaser.scss +1 -2
- package/components/utilities.scss +0 -2
- package/functions/_color.scss +12 -0
- package/functions/_forms.scss +22 -0
- package/functions/_list.scss +2 -1
- package/functions/_sizing.scss +2 -2
- package/functions/_utilities.scss +3 -3
- package/index.css +3 -3
- package/intranet.css +3 -3
- package/mixins/_accordion.scss +2 -2
- package/mixins/_button.scss +1 -2
- package/mixins/_chip.scss +36 -0
- package/mixins/_forms.scss +1 -0
- package/mixins/_icons.scss +1 -3
- package/mixins/_index.scss +1 -1
- package/mixins/_utilities.scss +85 -0
- package/package.json +15 -15
- package/placeholders/_badge.scss +4 -56
- package/placeholders/_button.scss +2 -0
- package/placeholders/_close.scss +8 -1
- package/placeholders/_color.scss +10 -0
- package/themes/bootstrap/_overrides-color.scss +4 -14
- package/themes/bootstrap/_overrides-variables.scss +1 -0
- package/variables/_color.scss +104 -44
- package/variables/_commons.scss +2 -0
- package/variables/_features.scss +1 -3
- package/variables/_icons.scss +4 -1
- package/variables/_type.scss +9 -1
- package/variables/components/_badge.scss +14 -38
- package/variables/components/_card.scss +1 -1
- package/variables/components/_chip.scss +50 -0
- package/variables/components/_datatable.scss +1 -1
- package/variables/components/_dropdowns.scss +1 -1
- package/variables/components/_form-check.scss +75 -1
- package/variables/components/_form-select.scss +20 -5
- package/variables/components/_form-validation.scss +14 -6
- package/variables/components/_index.scss +2 -0
- package/variables/components/_list-group.scss +1 -1
- package/variables/components/_notification.scss +5 -4
- package/variables/components/_pagination.scss +2 -2
- package/variables/components/_stepper.scss +25 -14
- package/variables/components/_subnavigation.scss +1 -1
- package/variables/components/_tag.scss +27 -0
- package/components/choice-control-card.scss +0 -148
- package/mixins/_badge.scss +0 -31
package/components/stepper.scss
CHANGED
|
@@ -1,226 +1,371 @@
|
|
|
1
|
-
@use '
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
|
|
2
3
|
@use './../mixins/icons' as icons-mx;
|
|
4
|
+
@use './../mixins/size' as size-mx;
|
|
3
5
|
@use './../mixins/utilities';
|
|
4
6
|
|
|
5
|
-
@use './../variables/spacing';
|
|
6
7
|
@use './../variables/color';
|
|
8
|
+
@use './../variables/commons';
|
|
7
9
|
@use './../variables/components/stepper';
|
|
8
10
|
|
|
9
11
|
@use './../themes/bootstrap/core' as *;
|
|
10
12
|
|
|
13
|
+
// for backward compatibility
|
|
11
14
|
.stepper-container {
|
|
12
15
|
@include size-mx.responsive-size('big', 'margin-bottom');
|
|
13
|
-
position: relative;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.stepper-bar {
|
|
17
|
-
height: stepper.$stepper-bar-height;
|
|
18
|
-
margin-top: stepper.$stepper-indicator-height * 0.5;
|
|
19
|
-
margin-bottom: -1 * (stepper.$stepper-bar-height + stepper.$stepper-indicator-height) * 0.5;
|
|
20
16
|
|
|
21
|
-
.
|
|
22
|
-
|
|
17
|
+
> .stepper-bar {
|
|
18
|
+
display: none;
|
|
23
19
|
}
|
|
24
20
|
}
|
|
25
21
|
|
|
26
22
|
.stepper {
|
|
23
|
+
// start a counter for the step numbers
|
|
27
24
|
counter-reset: step-index;
|
|
28
25
|
|
|
29
|
-
list
|
|
30
|
-
padding: 0 (0.5 * stepper.$stepper-indicator-height);
|
|
31
|
-
margin: 0;
|
|
26
|
+
@include utilities.reset-list;
|
|
32
27
|
display: grid;
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
position: relative;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
|
|
31
|
+
// the first column is half a step wide to make sure the separators are the same size even on small screens
|
|
32
|
+
grid-template-columns: math.div(stepper.$stepper-indicator-size, 2);
|
|
33
|
+
|
|
34
|
+
// all other columns are 1 fraction of the available space ase we don't know the number of steps
|
|
35
|
+
grid-auto-columns: minmax(0, 1fr);
|
|
36
|
+
|
|
37
|
+
// we use a padding and negative margin on the last step for the same reason we need the first column
|
|
38
|
+
padding-inline-end: math.div(stepper.$stepper-indicator-size, 2);
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
.stepper-item {
|
|
38
|
-
|
|
42
|
+
grid-row: 1;
|
|
39
43
|
position: relative;
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
transition: color 250ms;
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
content: '';
|
|
47
|
-
pointer-events: none;
|
|
48
|
-
display: flex;
|
|
49
|
-
align-items: center;
|
|
50
|
-
justify-content: center;
|
|
51
|
-
height: stepper.$stepper-indicator-height;
|
|
52
|
-
width: stepper.$stepper-indicator-height;
|
|
53
|
-
margin-bottom: -1 * stepper.$stepper-indicator-height;
|
|
54
|
-
color: stepper.$stepper-indicator-color;
|
|
55
|
-
background-color: stepper.$stepper-indicator-bg;
|
|
56
|
-
border: stepper.$stepper-indicator-border-width solid stepper.$stepper-indicator-border-color;
|
|
57
|
-
border-radius: 50%;
|
|
58
|
-
font-size: stepper.$stepper-indicator-font-size;
|
|
59
|
-
font-weight: stepper.$stepper-indicator-font-weight;
|
|
60
|
-
transition: background 250ms;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&[aria-current] ~ ::before {
|
|
64
|
-
color: stepper.$stepper-indicator-future-color;
|
|
65
|
-
background-color: stepper.$stepper-indicator-future-bg;
|
|
45
|
+
&:not(:first-child) {
|
|
46
|
+
padding-inline-start: math.div(stepper.$stepper-link-spacing, 2);
|
|
66
47
|
}
|
|
67
48
|
|
|
68
|
-
&:
|
|
69
|
-
|
|
49
|
+
&:not(:last-child) {
|
|
50
|
+
padding-inline-end: math.div(stepper.$stepper-link-spacing, 2);
|
|
51
|
+
grid-column: span 2;
|
|
70
52
|
}
|
|
71
53
|
|
|
72
|
-
//
|
|
54
|
+
// progress bar
|
|
55
|
+
&::before,
|
|
73
56
|
&::after {
|
|
74
|
-
@include icons-mx.icon(2105);
|
|
75
57
|
content: '';
|
|
76
|
-
position: absolute;
|
|
77
58
|
display: block;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
59
|
+
position: absolute;
|
|
60
|
+
inset-block-start: math.div((stepper.$stepper-indicator-size - stepper.$stepper-bar-height), 2);
|
|
61
|
+
height: stepper.$stepper-bar-height;
|
|
62
|
+
background-color: stepper.$stepper-bar-color;
|
|
63
|
+
inset-inline: 0 0;
|
|
81
64
|
}
|
|
82
65
|
|
|
83
|
-
|
|
84
|
-
&[aria-current] ~ & {
|
|
85
|
-
pointer-events: none;
|
|
86
|
-
|
|
66
|
+
&:not(:first-child, :last-child) {
|
|
87
67
|
&::before {
|
|
88
|
-
|
|
68
|
+
inset-inline-end: 50%;
|
|
89
69
|
}
|
|
90
70
|
|
|
91
71
|
&::after {
|
|
92
|
-
|
|
72
|
+
inset-inline-start: 50%;
|
|
93
73
|
}
|
|
94
74
|
}
|
|
95
75
|
|
|
96
|
-
//
|
|
97
|
-
&:first-child
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
76
|
+
// current and completed steps are preceded by a yellow segment (except for the first step)
|
|
77
|
+
&:not(&[aria-current='step'] ~ *, :first-child)::before,
|
|
78
|
+
// completed steps are also followed by a yellow segment (except for the last step)
|
|
79
|
+
&:not([aria-current='step']:not(:last-child), &[aria-current='step'] ~ *)::after {
|
|
80
|
+
background-color: stepper.$stepper-bar-fill-color;
|
|
81
|
+
z-index: 1;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
101
84
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
85
|
+
.stepper-link {
|
|
86
|
+
// -webkit-box is needed for line-clamp: https://caniuse.com/css-line-clamp
|
|
87
|
+
// stylelint-disable-next-line value-no-vendor-prefix
|
|
88
|
+
display: -webkit-box;
|
|
89
|
+
-webkit-box-orient: vertical;
|
|
90
|
+
-webkit-line-clamp: 2;
|
|
91
|
+
position: relative;
|
|
92
|
+
z-index: 2;
|
|
93
|
+
overflow: hidden;
|
|
94
|
+
text-decoration: none;
|
|
95
|
+
color: stepper.$stepper-link-color;
|
|
96
|
+
width: -moz-fit-content;
|
|
97
|
+
width: fit-content;
|
|
98
|
+
line-height: stepper.$stepper-link-line-height;
|
|
99
|
+
|
|
100
|
+
// not adding ellipsis if the like doesn't have a title for accessibility reasons
|
|
101
|
+
&:not([title]) {
|
|
102
|
+
-webkit-line-clamp: initial;
|
|
105
103
|
}
|
|
106
104
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
text-align: right;
|
|
112
|
-
margin-right: -0.5 * stepper.$stepper-indicator-height;
|
|
105
|
+
.stepper-item:not(:first-child, :last-child) > & {
|
|
106
|
+
margin-inline: auto;
|
|
107
|
+
text-align: center;
|
|
108
|
+
}
|
|
113
109
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
.stepper-item:last-child > & {
|
|
111
|
+
margin-inline-start: auto;
|
|
112
|
+
margin-inline-end: -1 * math.div(stepper.$stepper-indicator-size, 2); // negative margin matching the container padding
|
|
113
|
+
text-align: end;
|
|
117
114
|
}
|
|
118
115
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
.stepper-item[aria-current='step'] > & {
|
|
117
|
+
color: stepper.$stepper-link-current-color;
|
|
118
|
+
font-weight: stepper.$stepper-link-current-font-weight;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
123
121
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
// step indicator
|
|
123
|
+
.stepper-link::before {
|
|
124
|
+
counter-increment: step-index;
|
|
125
|
+
content: counter(step-index);
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
justify-content: center;
|
|
129
|
+
z-index: 1;
|
|
130
|
+
height: stepper.$stepper-indicator-size;
|
|
131
|
+
width: stepper.$stepper-indicator-size;
|
|
132
|
+
box-sizing: border-box;
|
|
133
|
+
margin-block-end: stepper.$stepper-link-gap;
|
|
134
|
+
color: stepper.$stepper-indicator-color;
|
|
135
|
+
background-color: stepper.$stepper-indicator-bg;
|
|
136
|
+
border: stepper.$stepper-indicator-border-width solid stepper.$stepper-indicator-border-color;
|
|
137
|
+
border-radius: 50%;
|
|
138
|
+
font-weight: stepper.$stepper-indicator-font-weight;
|
|
139
|
+
text-indent: initial;
|
|
140
|
+
transition: stepper.$stepper-indicator-transition;
|
|
141
|
+
|
|
142
|
+
.stepper-item:not(:first-child, :last-child) > & {
|
|
143
|
+
margin-inline: auto;
|
|
127
144
|
}
|
|
128
145
|
|
|
129
|
-
|
|
130
|
-
|
|
146
|
+
.stepper-item:last-child > & {
|
|
147
|
+
margin-inline-start: auto;
|
|
148
|
+
}
|
|
131
149
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
150
|
+
.stepper-item:not([aria-current='step'], .stepper-item[aria-current='step'] ~ *) > & {
|
|
151
|
+
color: transparent;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.stepper-item[aria-current='step'] ~ .stepper-item > & {
|
|
155
|
+
color: stepper.$stepper-indicator-future-color;
|
|
156
|
+
background-color: stepper.$stepper-indicator-future-bg;
|
|
135
157
|
}
|
|
136
158
|
}
|
|
137
159
|
|
|
138
|
-
|
|
160
|
+
// check icon
|
|
161
|
+
.stepper-link::after {
|
|
162
|
+
@include icons-mx.icon(2105);
|
|
163
|
+
display: block;
|
|
164
|
+
position: absolute;
|
|
165
|
+
top: math.div((stepper.$stepper-indicator-size - stepper.$stepper-indicator-check-icon-size), 2);
|
|
139
166
|
z-index: 1;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
167
|
+
height: stepper.$stepper-indicator-check-icon-size;
|
|
168
|
+
width: stepper.$stepper-indicator-check-icon-size;
|
|
169
|
+
transition: stepper.$stepper-indicator-transition;
|
|
170
|
+
color: stepper.$stepper-indicator-color;
|
|
171
|
+
|
|
172
|
+
.stepper-item:first-child > & {
|
|
173
|
+
left: math.div(
|
|
174
|
+
(stepper.$stepper-indicator-size - stepper.$stepper-indicator-check-icon-size),
|
|
175
|
+
2
|
|
176
|
+
);
|
|
177
|
+
}
|
|
145
178
|
|
|
146
|
-
.stepper-item
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
179
|
+
.stepper-item:not(:first-child, :last-child) > & {
|
|
180
|
+
left: calc(50% - #{math.div(stepper.$stepper-indicator-check-icon-size, 2)});
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.stepper-item:last-child > & {
|
|
184
|
+
right: math.div(
|
|
185
|
+
(stepper.$stepper-indicator-size - stepper.$stepper-indicator-check-icon-size),
|
|
186
|
+
2
|
|
187
|
+
);
|
|
150
188
|
}
|
|
151
189
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
190
|
+
// show only for completed steps
|
|
191
|
+
.stepper-item:not([aria-current='step'], .stepper-item[aria-current='step'] ~ *) > & {
|
|
192
|
+
content: '';
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// hover/focus state
|
|
197
|
+
.stepper-link:is(a[href]) {
|
|
198
|
+
@include utilities.focus-style {
|
|
199
|
+
border-radius: commons.$border-radius;
|
|
155
200
|
}
|
|
156
201
|
|
|
157
|
-
|
|
158
|
-
|
|
202
|
+
@include utilities.focus-hover-style-custom() {
|
|
203
|
+
color: stepper.$stepper-link-color;
|
|
204
|
+
|
|
205
|
+
.stepper-item[aria-current='step'] > & {
|
|
206
|
+
color: stepper.$stepper-link-current-color;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// step indicator
|
|
210
|
+
&::before,
|
|
211
|
+
.stepper-item[aria-current='step'] ~ .stepper-item > &::before {
|
|
212
|
+
color: stepper.$stepper-indicator-hover-color;
|
|
213
|
+
background-color: stepper.$stepper-indicator-hover-bg;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// check icon
|
|
217
|
+
&::after {
|
|
218
|
+
color: stepper.$stepper-indicator-hover-color;
|
|
219
|
+
}
|
|
159
220
|
}
|
|
160
221
|
}
|
|
161
222
|
|
|
223
|
+
// smaller screens
|
|
162
224
|
@include media-breakpoint-down(rg) {
|
|
163
|
-
.stepper-item
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
225
|
+
.stepper-item:first-child,
|
|
226
|
+
.stepper-item:last-child {
|
|
227
|
+
padding-inline: 0;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.stepper-item[aria-current='step'] {
|
|
231
|
+
// using "display: contents" on the stepper-item and stepper-link so that label, indicator and progress bar can be directly placed in the grid
|
|
232
|
+
display: contents;
|
|
233
|
+
|
|
234
|
+
> .stepper-link {
|
|
235
|
+
display: contents;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// progress bar
|
|
239
|
+
&::before {
|
|
240
|
+
grid-row: -1;
|
|
241
|
+
margin-block-start: math.div(
|
|
242
|
+
(stepper.$stepper-indicator-size - stepper.$stepper-bar-height),
|
|
243
|
+
2
|
|
244
|
+
);
|
|
245
|
+
position: static;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
&:not(:last-child) > .stepper-link::before {
|
|
249
|
+
grid-row: -1;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
&:not(:first-child, :last-child)::after {
|
|
253
|
+
inset-inline-start: 0;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.stepper-item:not([aria-current='step']) {
|
|
258
|
+
grid-row: -1;
|
|
259
|
+
justify-self: stretch;
|
|
260
|
+
|
|
261
|
+
// hide completed and future step labels
|
|
262
|
+
> .stepper-link {
|
|
263
|
+
-webkit-line-clamp: initial;
|
|
264
|
+
line-height: 0;
|
|
167
265
|
text-indent: 100%;
|
|
168
|
-
width: stepper.$stepper-indicator-height;
|
|
169
266
|
}
|
|
170
267
|
}
|
|
171
|
-
}
|
|
172
268
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
269
|
+
.stepper-link {
|
|
270
|
+
white-space: nowrap;
|
|
271
|
+
width: 100%;
|
|
272
|
+
}
|
|
177
273
|
|
|
178
|
-
|
|
179
|
-
|
|
274
|
+
// step indicator
|
|
275
|
+
.stepper-link::before {
|
|
276
|
+
.stepper-item[aria-current='step']:first-child > & {
|
|
277
|
+
order: -1;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.stepper-item[aria-current='step']:not(:first-child, :last-child) > & {
|
|
281
|
+
margin-inline-start: 0;
|
|
282
|
+
transform: translateX(-50%);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.stepper-item[aria-current='step']:last-child > & {
|
|
286
|
+
position: absolute;
|
|
287
|
+
z-index: 2;
|
|
288
|
+
inset-block-start: 0;
|
|
289
|
+
inset-inline-end: 0;
|
|
180
290
|
}
|
|
181
291
|
}
|
|
292
|
+
}
|
|
182
293
|
|
|
294
|
+
@include utilities.high-contrast-mode {
|
|
183
295
|
.stepper-item {
|
|
184
|
-
&::before
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
line-height: calc(#{stepper.$stepper-indicator-height} + 2 * #{spacing.$size-line});
|
|
188
|
-
color: ButtonText;
|
|
189
|
-
background-color: ButtonFace;
|
|
190
|
-
border: 0;
|
|
191
|
-
outline: spacing.$size-line solid VisitedText;
|
|
192
|
-
outline-offset: -3 * spacing.$size-line;
|
|
193
|
-
margin-top: -1 * spacing.$size-line;
|
|
296
|
+
&::before,
|
|
297
|
+
&::after {
|
|
298
|
+
background-color: CanvasText;
|
|
194
299
|
}
|
|
195
300
|
|
|
196
|
-
&[aria-current] ~
|
|
197
|
-
|
|
301
|
+
&:not(&[aria-current='step'] ~ &, :first-child)::before,
|
|
302
|
+
&:not([aria-current='step']:not(:last-child), &[aria-current='step'] ~ *)::after {
|
|
303
|
+
background-color: Highlight;
|
|
198
304
|
}
|
|
305
|
+
}
|
|
199
306
|
|
|
200
|
-
|
|
201
|
-
|
|
307
|
+
.stepper-link {
|
|
308
|
+
&::before {
|
|
309
|
+
forced-color-adjust: none;
|
|
202
310
|
}
|
|
203
311
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
312
|
+
.stepper-item[aria-current='step'] > & {
|
|
313
|
+
&::before {
|
|
314
|
+
background-color: Canvas;
|
|
315
|
+
color: CanvasText;
|
|
316
|
+
}
|
|
208
317
|
}
|
|
209
318
|
|
|
210
|
-
|
|
211
|
-
|
|
319
|
+
.stepper-item[aria-current='step'] ~ .stepper-item > &,
|
|
320
|
+
.stepper-item:not([aria-current='step']) > & {
|
|
321
|
+
&::before {
|
|
322
|
+
color: Canvas;
|
|
323
|
+
border-color: Canvas;
|
|
324
|
+
background-color: CanvasText;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
&::after {
|
|
329
|
+
color: Canvas;
|
|
212
330
|
}
|
|
213
331
|
}
|
|
214
332
|
|
|
215
|
-
.stepper-link {
|
|
216
|
-
|
|
333
|
+
.stepper-link:is(a[href]) {
|
|
334
|
+
.stepper-item[aria-current='step'] > & {
|
|
335
|
+
@include utilities.focus-hover-style-custom() {
|
|
336
|
+
&::before {
|
|
337
|
+
border-color: Highlight;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
217
341
|
|
|
218
|
-
.stepper-item[aria-current] ~ .stepper-item > & {
|
|
219
|
-
|
|
342
|
+
.stepper-item[aria-current='step'] ~ .stepper-item > & {
|
|
343
|
+
&::before {
|
|
344
|
+
color: Canvas;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
@include utilities.focus-hover-style-custom() {
|
|
348
|
+
&::before {
|
|
349
|
+
background-color: Highlight;
|
|
350
|
+
color: HighlightText;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
220
353
|
}
|
|
221
354
|
|
|
222
|
-
.stepper-item[aria-current] > & {
|
|
223
|
-
|
|
355
|
+
.stepper-item:not([aria-current='step']) > & {
|
|
356
|
+
&::before {
|
|
357
|
+
background-color: LinkText;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
@include utilities.focus-hover-style-custom() {
|
|
361
|
+
&::before {
|
|
362
|
+
background-color: Highlight;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
&::after {
|
|
366
|
+
color: HighlightText;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
224
369
|
}
|
|
225
370
|
}
|
|
226
371
|
}
|
|
@@ -46,11 +46,6 @@ $module-name: 'subnavigation';
|
|
|
46
46
|
@include media-breakpoint-up(xl) {
|
|
47
47
|
min-height: subnavigation.$subnavigation-height-xl;
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
.badge {
|
|
51
|
-
margin-left: subnavigation.$subnavigation-result-margin-left;
|
|
52
|
-
color: inherit;
|
|
53
|
-
}
|
|
54
49
|
}
|
|
55
50
|
|
|
56
51
|
&-link {
|
|
@@ -59,12 +54,14 @@ $module-name: 'subnavigation';
|
|
|
59
54
|
@include transition(
|
|
60
55
|
color animation.$transition-time-default animation.$transition-easing-default
|
|
61
56
|
);
|
|
57
|
+
|
|
62
58
|
display: flex;
|
|
63
59
|
position: relative;
|
|
64
60
|
align-items: center;
|
|
65
61
|
justify-content: space-between;
|
|
66
62
|
width: 100%;
|
|
67
63
|
height: 100%;
|
|
64
|
+
gap: subnavigation.$subnavigation-result-margin-left;
|
|
68
65
|
padding: subnavigation.$subnavigation-link-padding-xs;
|
|
69
66
|
color: subnavigation.$subnavigation-link-color;
|
|
70
67
|
text-decoration: none;
|
package/components/tables.scss
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
background-color: rgba(
|
|
13
13
|
var(--post-contrast-color-rgb),
|
|
14
14
|
0.02
|
|
15
|
-
); // 0.02 gets as close as possible to color.$
|
|
15
|
+
); // 0.02 gets as close as possible to color.$light on white background
|
|
16
16
|
|
|
17
17
|
// Create a line that lies below the active but above the passive elements
|
|
18
18
|
// This way hover works smoothly with the background color
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@forward './../variables/options';
|
|
3
|
+
@use './../variables/color';
|
|
4
|
+
@use './../variables/components/tag';
|
|
5
|
+
@use './../functions/contrast' as contrast-fn;
|
|
6
|
+
|
|
7
|
+
// style `.tag` only if is not descendant of a `<pre>` element
|
|
8
|
+
// as `<pre><div class="tag">...</div><pre>` is usually used by code highlight tools
|
|
9
|
+
|
|
10
|
+
// `.tag` selector can be removed (leave only `.tag:where(:has(:not(pre)))`)as soon as Firefox ESR v128 is released and rolled out
|
|
11
|
+
// https://whattrainisitnow.com/calendar/
|
|
12
|
+
.tag,
|
|
13
|
+
.tag:where(:has(:not(pre))) {
|
|
14
|
+
--post-tag-bg: #{tag.$tag-default-background};
|
|
15
|
+
--post-tag-fg: #{contrast-fn.get-best-contrast-text(tag.$tag-default-background)};
|
|
16
|
+
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: tag.$tag-gap;
|
|
20
|
+
padding: tag.$tag-padding-y tag.$tag-padding-x;
|
|
21
|
+
max-width: tag.$tag-max-width;
|
|
22
|
+
background-color: var(--post-tag-bg);
|
|
23
|
+
border: tag.$tag-border-width solid transparent;
|
|
24
|
+
border-radius: tag.$tag-border-radius;
|
|
25
|
+
font-size: tag.$tag-font-size;
|
|
26
|
+
line-height: tag.$tag-line-height;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
color: var(--post-tag-fg);
|
|
29
|
+
|
|
30
|
+
post-icon {
|
|
31
|
+
flex: 0 0 auto;
|
|
32
|
+
width: tag.$tag-icon-size;
|
|
33
|
+
height: tag.$tag-icon-size;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.tag-text {
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
text-overflow: ellipsis;
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
|
|
41
|
+
svg,
|
|
42
|
+
img {
|
|
43
|
+
display: inline-block;
|
|
44
|
+
height: tag.$tag-icon-size !important;
|
|
45
|
+
vertical-align: text-top;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.tag-sm {
|
|
50
|
+
line-height: tag.$tag-sm-line-height;
|
|
51
|
+
|
|
52
|
+
.tag-icon {
|
|
53
|
+
width: tag.$tag-sm-icon-size;
|
|
54
|
+
height: tag.$tag-sm-icon-size;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@each $key, $color in tag.$tag-backgrounds {
|
|
59
|
+
&.tag-#{$key} {
|
|
60
|
+
--post-tag-bg: #{$color};
|
|
61
|
+
--post-tag-fg: #{contrast-fn.get-best-contrast-text($color)};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.tag-white {
|
|
66
|
+
border-color: var(--post-contrast-color);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Can be removed completely as soon as Firefox ESR v128 is released and rolled out
|
|
70
|
+
// https://whattrainisitnow.com/calendar/
|
|
71
|
+
pre & {
|
|
72
|
+
display: inline;
|
|
73
|
+
padding: initial;
|
|
74
|
+
max-width: initial;
|
|
75
|
+
background: initial;
|
|
76
|
+
border: initial;
|
|
77
|
+
border-radius: initial;
|
|
78
|
+
font-size: inherit;
|
|
79
|
+
line-height: inherit;
|
|
80
|
+
white-space: unset;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -40,8 +40,7 @@
|
|
|
40
40
|
padding-right: 0;
|
|
41
41
|
// webkit subpixel-issue fix
|
|
42
42
|
margin-right: -1px;
|
|
43
|
-
|
|
44
|
-
clip-path: inset(0 1px (map.get(spacing.$size-curve-huge, 'xxl') * -1) 0);
|
|
43
|
+
clip-path: inset(0 1px (map.get(spacing.$size-curve-huge, 'xxl') * -1) 0);
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
> .row {
|
|
@@ -73,7 +73,6 @@ span.spacer {
|
|
|
73
73
|
a {
|
|
74
74
|
color: inherit;
|
|
75
75
|
|
|
76
|
-
&:focus,
|
|
77
76
|
&:hover {
|
|
78
77
|
opacity: 0.8;
|
|
79
78
|
}
|
|
@@ -83,7 +82,6 @@ span.spacer {
|
|
|
83
82
|
a {
|
|
84
83
|
color: var(--post-contrast-color);
|
|
85
84
|
|
|
86
|
-
&:focus,
|
|
87
85
|
&:hover {
|
|
88
86
|
color: rgba(var(--post-contrast-color-rgb), 0.8);
|
|
89
87
|
}
|
package/functions/_color.scss
CHANGED
|
@@ -33,3 +33,15 @@
|
|
|
33
33
|
|
|
34
34
|
@return string.unquote('\##{string.to-lower-case($hex)}');
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
// Source: https://gist.github.com/certainlyakey/e9c0d8f5c87ff47e3d5b
|
|
38
|
+
@function encode-uri-color($string) {
|
|
39
|
+
@if meta.type-of($string) == 'color' and string.index(#{$string}, '#') == 1 {
|
|
40
|
+
$hex: string.slice(color.ie-hex-str($string), 4);
|
|
41
|
+
$string: string.unquote('#{$hex}');
|
|
42
|
+
|
|
43
|
+
@return '%23' + $string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@return $string;
|
|
47
|
+
}
|