@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/_index.scss
CHANGED
|
@@ -9,10 +9,12 @@
|
|
|
9
9
|
@use 'button';
|
|
10
10
|
@use 'button-group';
|
|
11
11
|
@use 'card';
|
|
12
|
-
@use '
|
|
12
|
+
@use 'card-control';
|
|
13
13
|
@use 'carousel';
|
|
14
|
+
@use 'chip';
|
|
14
15
|
@use 'close';
|
|
15
16
|
@use 'elevation';
|
|
17
|
+
@use 'error-container';
|
|
16
18
|
@use 'form-range';
|
|
17
19
|
@use 'form-select';
|
|
18
20
|
@use 'form-textarea';
|
|
@@ -40,6 +42,7 @@
|
|
|
40
42
|
@use 'transitions';
|
|
41
43
|
@use 'type';
|
|
42
44
|
@use 'utilities';
|
|
45
|
+
@use 'tag';
|
|
43
46
|
|
|
44
47
|
// Imports depending on source order to override bootstrap styles
|
|
45
48
|
@use 'datepicker';
|
package/components/alert.scss
CHANGED
|
@@ -65,10 +65,15 @@
|
|
|
65
65
|
padding-inline-end: notification.$notification-gap + close.$close-size;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
&.no-icon > .alert-content {
|
|
69
|
+
padding-inline-start: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
68
72
|
> .alert-buttons {
|
|
69
73
|
display: flex;
|
|
70
74
|
|
|
71
|
-
> .btn
|
|
75
|
+
> .btn,
|
|
76
|
+
> ::slotted(.btn) {
|
|
72
77
|
flex: 1 0 0;
|
|
73
78
|
width: 100%;
|
|
74
79
|
|
package/components/badge.scss
CHANGED
|
@@ -1,85 +1,32 @@
|
|
|
1
1
|
@forward './../variables/options';
|
|
2
2
|
|
|
3
|
-
@use './../
|
|
4
|
-
@use './../themes/bootstrap/core' as *;
|
|
5
|
-
@use './../themes/bootstrap/badge' as bb;
|
|
6
|
-
|
|
7
|
-
@use './../variables/components/badge';
|
|
8
|
-
@use './../variables/components/forms';
|
|
9
|
-
@use './../variables/components/form-check';
|
|
10
|
-
@use './../variables/color';
|
|
11
|
-
@use './../mixins/utilities';
|
|
12
|
-
@use './../mixins/forms' as forms-mx;
|
|
13
|
-
@use './../mixins/badge' as badge-mx;
|
|
3
|
+
@use './../mixins/color' as color-mx;
|
|
14
4
|
@use './../placeholders/badge' as badge-ph;
|
|
15
|
-
@use './../
|
|
5
|
+
@use './../variables/components/badge';
|
|
16
6
|
|
|
17
7
|
.badge {
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
&-label {
|
|
42
|
-
@extend %badge;
|
|
43
|
-
@include forms-mx.focus-outline;
|
|
44
|
-
transition: badge.$badge-transition;
|
|
45
|
-
cursor: pointer;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&-input {
|
|
49
|
-
@include utilities.visuallyhidden;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&-input:focus-visible + &-label {
|
|
53
|
-
outline-offset: forms.$input-focus-outline-thickness;
|
|
54
|
-
outline: forms.$input-focus-outline-thickness solid var(--post-contrast-color);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&-input:not(:checked) + &-label:hover {
|
|
58
|
-
@include badge-mx.badge-hover-state;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&-input:checked + &-label {
|
|
62
|
-
@include badge-mx.badge-active-state;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@include utilities.high-contrast-mode() {
|
|
67
|
-
.badge-check {
|
|
68
|
-
&-input:focus-visible + &-label {
|
|
69
|
-
border-color: Highlight;
|
|
70
|
-
outline-color: Highlight;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&-input:checked + &-label {
|
|
74
|
-
&:hover {
|
|
75
|
-
@include badge-mx.badge-hover-state;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
button.badge,
|
|
81
|
-
a.badge,
|
|
82
|
-
.badge-check-label {
|
|
83
|
-
transition: none;
|
|
8
|
+
--post-badge-height: #{badge.$badge-height};
|
|
9
|
+
--post-badge-padding-x: #{badge.$badge-padding-x};
|
|
10
|
+
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
box-sizing: content-box;
|
|
15
|
+
height: var(--post-badge-height);
|
|
16
|
+
min-width: calc(var(--post-badge-height) - 2 * var(--post-badge-padding-x));
|
|
17
|
+
padding-inline: var(--post-badge-padding-x);
|
|
18
|
+
border: badge.$badge-border;
|
|
19
|
+
border-radius: badge.$badge-border-radius;
|
|
20
|
+
font-size: badge.$badge-font-size;
|
|
21
|
+
background-color: badge.$badge-bg;
|
|
22
|
+
color: badge.$badge-color;
|
|
23
|
+
|
|
24
|
+
&:empty {
|
|
25
|
+
--post-badge-height: #{badge.$badge-height-empty};
|
|
26
|
+
--post-badge-padding-x: #{badge.$badge-padding-x-empty};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.badge-sm {
|
|
30
|
+
@extend %badge-sm;
|
|
84
31
|
}
|
|
85
32
|
}
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
> .btn-secondary.active,
|
|
41
41
|
> .btn-check:checked + .btn-secondary {
|
|
42
42
|
background-color: color.$yellow;
|
|
43
|
+
color: color.$black;
|
|
43
44
|
|
|
44
45
|
@include utilities.high-contrast-mode() {
|
|
45
46
|
background-color: Highlight;
|
|
@@ -51,8 +52,5 @@
|
|
|
51
52
|
position: absolute;
|
|
52
53
|
clip: rect(0, 0, 0, 0);
|
|
53
54
|
pointer-events: none;
|
|
54
|
-
|
|
55
|
-
&:is(:focus-visible, :focus-within, .pretend-focus) + .btn {
|
|
56
|
-
outline: forms.$input-focus-outline-thickness solid var(--post-contrast-color);
|
|
57
|
-
}
|
|
55
|
+
@include utilities.focus-style('+ .btn');
|
|
58
56
|
}
|
package/components/button.scss
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
@use './../variables/components/button';
|
|
7
7
|
@use './../variables/color';
|
|
8
|
+
@use './../variables/commons';
|
|
8
9
|
@use './../variables/type';
|
|
9
10
|
@use './../variables/spacing';
|
|
10
11
|
@use './../mixins/color' as color-mx;
|
|
11
|
-
@use './../mixins/icons';
|
|
12
|
+
@use './../mixins/icons' as icon-mx;
|
|
12
13
|
@use './../mixins/utilities';
|
|
13
14
|
@use './../mixins/forms';
|
|
14
15
|
@use './../mixins/button' as button-mx;
|
|
@@ -18,7 +19,9 @@
|
|
|
18
19
|
|
|
19
20
|
.btn {
|
|
20
21
|
@include button-mx.button-size();
|
|
21
|
-
@include
|
|
22
|
+
@include utilities.focus-style() {
|
|
23
|
+
border-radius: commons.$border-radius;
|
|
24
|
+
}
|
|
22
25
|
|
|
23
26
|
// Resets
|
|
24
27
|
display: inline-flex;
|
|
@@ -60,7 +63,8 @@
|
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
&:disabled {
|
|
63
|
-
color: var(--post-
|
|
66
|
+
color: var(--post-contrast-color);
|
|
67
|
+
background-color: var(--post-gray-40);
|
|
64
68
|
}
|
|
65
69
|
}
|
|
66
70
|
|
|
@@ -134,22 +138,48 @@
|
|
|
134
138
|
}
|
|
135
139
|
|
|
136
140
|
// Animated
|
|
141
|
+
|
|
142
|
+
.btn-animated,
|
|
143
|
+
.btn-animated-start {
|
|
144
|
+
&:not(.btn-link, .btn-tertiary) {
|
|
145
|
+
&::after {
|
|
146
|
+
@include icon-mx.icon(2111);
|
|
147
|
+
content: '';
|
|
148
|
+
display: block;
|
|
149
|
+
height: 2em;
|
|
150
|
+
width: 2em;
|
|
151
|
+
position: absolute;
|
|
152
|
+
transition:
|
|
153
|
+
opacity 250ms,
|
|
154
|
+
transform 250ms;
|
|
155
|
+
opacity: 0;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
> span {
|
|
159
|
+
transition: transform 250ms;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
163
|
+
@include utilities.not-disabled-focus-hover() {
|
|
164
|
+
&::after {
|
|
165
|
+
transform: translateX(0);
|
|
166
|
+
opacity: 1;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
> span {
|
|
171
|
+
// Initially transform to place text in the right rendering context for a smooth animation
|
|
172
|
+
transform: translateX(0);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
137
178
|
.btn-animated:not(.btn-link, .btn-tertiary) {
|
|
138
179
|
&::after {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
width: 0.625em;
|
|
143
|
-
height: 0.625em;
|
|
144
|
-
transform: rotateZ(315deg)
|
|
145
|
-
translate(button.$btn-border-width * -1, button.$btn-border-width * -1);
|
|
146
|
-
transform-origin: center center;
|
|
147
|
-
transition:
|
|
148
|
-
opacity 250ms,
|
|
149
|
-
transform 250ms;
|
|
150
|
-
border-right: button.$btn-border-width solid currentColor;
|
|
151
|
-
border-bottom: button.$btn-border-width solid currentColor;
|
|
152
|
-
opacity: 0;
|
|
180
|
+
right: button.$btn-padding-x-md - button.$btn-animation-distance-md -
|
|
181
|
+
(math.div(button.$btn-font-size-md * 2, 3));
|
|
182
|
+
transform: translateX(button.$btn-border-width * -1);
|
|
153
183
|
}
|
|
154
184
|
|
|
155
185
|
@each $size in button.$btn-non-default-sizes {
|
|
@@ -157,14 +187,11 @@
|
|
|
157
187
|
right: map.get(button.$btn-padding-x-map, $size) - map.get(
|
|
158
188
|
button.$btn-animation-distance-map,
|
|
159
189
|
$size
|
|
160
|
-
)
|
|
190
|
+
) -
|
|
191
|
+
(math.div(map.get(button.$btn-font-size-map, $size) * 2, 3));
|
|
161
192
|
}
|
|
162
193
|
}
|
|
163
194
|
|
|
164
|
-
> span {
|
|
165
|
-
transition: transform 250ms;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
195
|
// Only animate when user prefers to see animations
|
|
169
196
|
@media (prefers-reduced-motion: no-preference) {
|
|
170
197
|
@include utilities.not-disabled-focus-hover() {
|
|
@@ -177,16 +204,40 @@
|
|
|
177
204
|
transform: translateX(map.get(button.$btn-animation-distance-map, $size) * -1);
|
|
178
205
|
}
|
|
179
206
|
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
180
210
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
211
|
+
.btn-animated-start:not(.btn-link, .btn-tertiary) {
|
|
212
|
+
&::after {
|
|
213
|
+
@include icon-mx.icon(2110);
|
|
214
|
+
left: button.$btn-padding-x-md - button.$btn-animation-distance-md -
|
|
215
|
+
(math.div(button.$btn-font-size-md * 2, 3));
|
|
216
|
+
transform: translateX(button.$btn-border-width);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@each $size in button.$btn-non-default-sizes {
|
|
220
|
+
&.btn-#{$size}::after {
|
|
221
|
+
left: map.get(button.$btn-padding-x-map, $size) - map.get(
|
|
222
|
+
button.$btn-animation-distance-map,
|
|
223
|
+
$size
|
|
224
|
+
) -
|
|
225
|
+
(math.div(map.get(button.$btn-font-size-map, $size) * 2, 3));
|
|
185
226
|
}
|
|
227
|
+
}
|
|
186
228
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
229
|
+
// Only animate when user prefers to see animations
|
|
230
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
231
|
+
@include utilities.not-disabled-focus-hover() {
|
|
232
|
+
> span {
|
|
233
|
+
transform: translateX(map.get(button.$btn-animation-distance-map, md));
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
@each $size in button.$btn-non-default-sizes {
|
|
237
|
+
&.btn-#{$size} > span {
|
|
238
|
+
transform: translateX(map.get(button.$btn-animation-distance-map, $size));
|
|
239
|
+
}
|
|
240
|
+
}
|
|
190
241
|
}
|
|
191
242
|
}
|
|
192
243
|
}
|
|
@@ -203,7 +254,7 @@
|
|
|
203
254
|
@include button-mx.button-color-variant($name, $color);
|
|
204
255
|
}
|
|
205
256
|
|
|
206
|
-
// Intranet
|
|
207
|
-
@each $name, $color in color.$
|
|
257
|
+
// Intranet signal buttons
|
|
258
|
+
@each $name, $color in color.$signal-colors {
|
|
208
259
|
@include button-mx.button-color-variant($name, $color);
|
|
209
260
|
}
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
@use '../variables/color';
|
|
2
|
+
@use '../variables/commons';
|
|
3
|
+
@use '../variables/spacing';
|
|
4
|
+
@use '../variables/components/forms';
|
|
5
|
+
@use '../variables/components/form-check';
|
|
6
|
+
@use '../mixins/utilities';
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* There are a whole bunch of !important statments in this file.
|
|
10
|
+
* They are necessary and should not be removed, because we need to override the .form-check styles here.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
fieldset {
|
|
14
|
+
.radio-button-card,
|
|
15
|
+
.checkbox-button-card {
|
|
16
|
+
&:not(:last-child) {
|
|
17
|
+
margin-bottom: spacing.$size-regular;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.radio-button-card,
|
|
23
|
+
.checkbox-button-card {
|
|
24
|
+
--post-card-control-border-color: #{color.$gray-60};
|
|
25
|
+
--post-card-control-bg: #{color.$white};
|
|
26
|
+
--post-card-control-color: #{color.$gray-80};
|
|
27
|
+
--post-card-control-input-border-color: #{color.$gray-80};
|
|
28
|
+
--post-card-control-input-bg: #{color.$white};
|
|
29
|
+
|
|
30
|
+
display: grid;
|
|
31
|
+
grid-template: 'input label icon' 'input content content' / min-content auto min-content;
|
|
32
|
+
gap: 0 spacing.$size-mini;
|
|
33
|
+
position: relative;
|
|
34
|
+
padding: spacing.$size-regular;
|
|
35
|
+
width: 100%;
|
|
36
|
+
background-color: var(--post-card-control-bg);
|
|
37
|
+
border: spacing.$size-line solid var(--post-card-control-border-color);
|
|
38
|
+
border-radius: commons.$border-radius;
|
|
39
|
+
color: var(--post-card-control-color);
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
|
|
42
|
+
input.form-check-input[type] {
|
|
43
|
+
grid-area: input;
|
|
44
|
+
position: relative;
|
|
45
|
+
z-index: 2;
|
|
46
|
+
margin: spacing.$size-micro 0;
|
|
47
|
+
background-color: var(--post-card-control-input-bg) !important;
|
|
48
|
+
border-color: var(--post-card-control-input-border-color) !important;
|
|
49
|
+
color: var(--post-card-control-input-border-color) !important;
|
|
50
|
+
cursor: inherit;
|
|
51
|
+
transition: none;
|
|
52
|
+
|
|
53
|
+
&:focus,
|
|
54
|
+
&:focus-visible {
|
|
55
|
+
box-shadow: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
~ label.form-check-label {
|
|
59
|
+
color: inherit !important;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
label.form-check-label {
|
|
64
|
+
grid-area: label;
|
|
65
|
+
margin: spacing.$size-micro 0;
|
|
66
|
+
padding: 0;
|
|
67
|
+
border-radius: inherit;
|
|
68
|
+
transition: none;
|
|
69
|
+
|
|
70
|
+
&::before {
|
|
71
|
+
display: block;
|
|
72
|
+
content: '';
|
|
73
|
+
position: absolute;
|
|
74
|
+
inset: spacing.$size-line * -1;
|
|
75
|
+
border-radius: inherit;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
> * {
|
|
79
|
+
display: block;
|
|
80
|
+
// Lift content above the :before element to make it selectable
|
|
81
|
+
position: relative;
|
|
82
|
+
z-index: 2;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:not(:has(+ post-icon)) {
|
|
86
|
+
grid-area: 1 / label / 1 / icon;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.card-control--content {
|
|
91
|
+
grid-area: content;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
post-icon {
|
|
95
|
+
grid-area: icon;
|
|
96
|
+
width: spacing.$size-big;
|
|
97
|
+
height: spacing.$size-big;
|
|
98
|
+
pointer-events: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&:where(:not(:has(input:disabled)), :not(.disabled)) {
|
|
102
|
+
&:where(:has(input:checked), .checked) {
|
|
103
|
+
--post-card-control-border-color: #{color.$black};
|
|
104
|
+
--post-card-control-bg: #{color.$yellow};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:where(:has(input:invalid), :has(input[aria-invalid]), :has(input.is-invalid), .is-invalid) {
|
|
108
|
+
--post-card-control-border-color: #{color.$error};
|
|
109
|
+
--post-card-control-color: #{color.$error};
|
|
110
|
+
--post-card-control-input-border-color: #{color.$error};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&:where(:hover) {
|
|
114
|
+
--post-card-control-border-color: #{color.$gray-80};
|
|
115
|
+
--post-card-control-bg: #{color.$gray-60};
|
|
116
|
+
--post-card-control-color: #{color.$white};
|
|
117
|
+
--post-card-control-input-border-color: #{color.$black};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
input:focus-visible ~ label::before {
|
|
121
|
+
outline-offset: forms.$input-focus-outline-thickness;
|
|
122
|
+
outline: forms.$input-focus-outline-thickness solid commons.$outline-color;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:where(:has(input:disabled), .disabled) {
|
|
127
|
+
--post-card-control-border-color: #{color.$gray-60};
|
|
128
|
+
--post-card-control-bg: transparent;
|
|
129
|
+
--post-card-control-color: #{color.$gray-60};
|
|
130
|
+
--post-card-control-input-border-color: #{color.$gray-60};
|
|
131
|
+
--post-card-control-input-bg: transparent;
|
|
132
|
+
|
|
133
|
+
border-style: dashed;
|
|
134
|
+
text-decoration: line-through;
|
|
135
|
+
cursor: default;
|
|
136
|
+
|
|
137
|
+
input.form-check-input[type] {
|
|
138
|
+
border: 0 none;
|
|
139
|
+
padding: form-check.$form-check-input-border-width;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@include utilities.high-contrast-mode() {
|
|
144
|
+
--post-card-control-border-color: FieldText;
|
|
145
|
+
--post-card-control-bg: Field;
|
|
146
|
+
--post-card-control-color: FieldText;
|
|
147
|
+
--post-card-control-input-border-color: FieldText;
|
|
148
|
+
--post-card-control-input-bg: Field;
|
|
149
|
+
|
|
150
|
+
outline: spacing.$size-line solid Field;
|
|
151
|
+
outline-offset: spacing.$size-line * -2;
|
|
152
|
+
|
|
153
|
+
input.form-check-input[type] {
|
|
154
|
+
outline: spacing.$size-line solid Field;
|
|
155
|
+
background-color: Field !important;
|
|
156
|
+
|
|
157
|
+
&::after {
|
|
158
|
+
border-color: Field !important;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
label.form-check-label,
|
|
163
|
+
.card-control--content {
|
|
164
|
+
background-color: var(--post-card-control-bg) !important;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&:where(:not(:has(input:disabled)), :not(.disabled)) {
|
|
168
|
+
&:where(:has(input:checked), .checked) {
|
|
169
|
+
--post-card-control-border-color: FieldText;
|
|
170
|
+
--post-card-control-bg: SelectedItem;
|
|
171
|
+
--post-card-control-color: SelectedItemText;
|
|
172
|
+
--post-card-control-input-border-color: FieldText;
|
|
173
|
+
|
|
174
|
+
input.form-check-input[type] {
|
|
175
|
+
&::after {
|
|
176
|
+
background-color: FieldText !important;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&:where(:hover) {
|
|
182
|
+
--post-card-control-border-color: Highlight;
|
|
183
|
+
--post-card-control-bg: Field;
|
|
184
|
+
--post-card-control-color: FieldText;
|
|
185
|
+
--post-card-control-input-border-color: Highlight;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&:where(:has(input:disabled), .disabled) {
|
|
190
|
+
--post-card-control-border-color: GrayText;
|
|
191
|
+
--post-card-control-bg: Field;
|
|
192
|
+
--post-card-control-color: FieldText;
|
|
193
|
+
--post-card-control-input-border-color: GrayText;
|
|
194
|
+
--post-card-control-input-bg: Field;
|
|
195
|
+
|
|
196
|
+
&:where(:has(input:checked), .checked) {
|
|
197
|
+
--post-card-control-bg: SelectedItem;
|
|
198
|
+
--post-card-control-color: SelectedItemText;
|
|
199
|
+
|
|
200
|
+
position: relative;
|
|
201
|
+
background-color: Field;
|
|
202
|
+
|
|
203
|
+
&::before {
|
|
204
|
+
display: block;
|
|
205
|
+
content: '';
|
|
206
|
+
position: absolute;
|
|
207
|
+
inset: spacing.$size-line;
|
|
208
|
+
background-color: SelectedItem;
|
|
209
|
+
z-index: 1;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
> * {
|
|
213
|
+
position: relative;
|
|
214
|
+
z-index: 2;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
input.form-check-input[type] {
|
|
218
|
+
&::after {
|
|
219
|
+
background-color: FieldText !important;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@each $bg in color.$dark-backgrounds {
|
|
228
|
+
#{$bg} {
|
|
229
|
+
.radio-button-card,
|
|
230
|
+
.checkbox-button-card {
|
|
231
|
+
--post-card-control-border-color: #{color.$white};
|
|
232
|
+
--post-card-control-bg: transparent;
|
|
233
|
+
--post-card-control-color: #{color.$white};
|
|
234
|
+
--post-card-control-input-border-color: #{color.$white};
|
|
235
|
+
--post-card-control-input-bg: transparent;
|
|
236
|
+
|
|
237
|
+
&:where(:not(:has(input:disabled)), :not(.disabled)) {
|
|
238
|
+
&:where(:has(input:checked), .checked) {
|
|
239
|
+
--post-card-control-border-color: #{color.$yellow};
|
|
240
|
+
--post-card-control-bg: #{color.$yellow};
|
|
241
|
+
--post-card-control-color: #{color.$gray-80};
|
|
242
|
+
--post-card-control-input-border-color: #{color.$gray-80};
|
|
243
|
+
--post-card-control-input-bg: #{color.$white};
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
&:where(
|
|
247
|
+
:has(input:invalid),
|
|
248
|
+
:has(input[aria-invalid]),
|
|
249
|
+
:has(input.is-invalid),
|
|
250
|
+
.is-invalid
|
|
251
|
+
) {
|
|
252
|
+
--post-card-control-border-color: #{color.$error};
|
|
253
|
+
--post-card-control-bg: #{color.$error-background};
|
|
254
|
+
--post-card-control-color: #{color.$error};
|
|
255
|
+
--post-card-control-input-border-color: #{color.$error};
|
|
256
|
+
--post-card-control-input-bg: #{color.$white};
|
|
257
|
+
|
|
258
|
+
&:where(:has(input:checked), .checked) {
|
|
259
|
+
--post-card-control-bg: #{color.$yellow};
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
&:where(:hover) {
|
|
264
|
+
--post-card-control-border-color: #{color.$black};
|
|
265
|
+
--post-card-control-bg: #{color.$gray-20};
|
|
266
|
+
--post-card-control-color: #{color.$black};
|
|
267
|
+
--post-card-control-input-border-color: #{color.$black};
|
|
268
|
+
--post-card-control-input-bg: #{color.$white};
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
input:focus-visible ~ label::before {
|
|
272
|
+
outline-color: color.$white;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
&:where(:has(input:disabled), .disabled) {
|
|
277
|
+
--post-card-control-border-color: color.$white-alpha-80;
|
|
278
|
+
--post-card-control-bg: transparent;
|
|
279
|
+
--post-card-control-color: color.$white-alpha-80;
|
|
280
|
+
--post-card-control-input-border-color: color.$white-alpha-80;
|
|
281
|
+
--post-card-control-input-bg: transparent;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
@include utilities.high-contrast-mode() {
|
|
285
|
+
--post-card-control-border-color: FieldText;
|
|
286
|
+
--post-card-control-bg: Field;
|
|
287
|
+
--post-card-control-color: FieldText;
|
|
288
|
+
--post-card-control-input-border-color: FieldText;
|
|
289
|
+
--post-card-control-input-bg: Field;
|
|
290
|
+
|
|
291
|
+
&:where(:not(:has(input:disabled)), :not(.disabled)) {
|
|
292
|
+
&:where(:has(input:checked), .checked) {
|
|
293
|
+
--post-card-control-border-color: FieldText;
|
|
294
|
+
--post-card-control-bg: SelectedItem;
|
|
295
|
+
--post-card-control-color: SelectedItemText;
|
|
296
|
+
--post-card-control-input-border-color: FieldText;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
&:where(:hover) {
|
|
300
|
+
--post-card-control-border-color: Highlight;
|
|
301
|
+
--post-card-control-bg: Field;
|
|
302
|
+
--post-card-control-color: FieldText;
|
|
303
|
+
--post-card-control-input-border-color: Highlight;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
&:where(:has(input:disabled), .disabled) {
|
|
308
|
+
--post-card-control-border-color: GrayText;
|
|
309
|
+
--post-card-control-bg: Field;
|
|
310
|
+
--post-card-control-color: FieldText;
|
|
311
|
+
--post-card-control-input-border-color: GrayText;
|
|
312
|
+
--post-card-control-input-bg: Field;
|
|
313
|
+
|
|
314
|
+
&:where(:has(input:checked), .checked) {
|
|
315
|
+
--post-card-control-bg: SelectedItem;
|
|
316
|
+
--post-card-control-color: SelectedItemText;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|