@swisspost/design-system-styles 6.4.2 → 6.4.4
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 +1 -1
- package/components/button-group.scss +9 -1
- package/components/button.scss +7 -3
- package/components/carousel.scss +4 -1
- package/components/choice-control-card.scss +3 -1
- package/components/dropdown.scss +0 -1
- package/components/floating-label.scss +32 -32
- package/components/fonts.scss +12 -6
- package/components/form-check.scss +6 -3
- package/components/form-validation.scss +3 -1
- package/components/forms.scss +1 -0
- package/components/tables.scss +48 -0
- package/components/tabs/index.scss +2 -0
- package/components/topic-teaser.scss +2 -1
- package/components/type.scss +2 -2
- package/functions/_contrast.scss +8 -6
- package/functions/_list.scss +10 -6
- package/functions/_sizing.scss +13 -12
- package/functions/_utilities.scss +3 -2
- package/index.css +3 -3
- package/intranet.css +3 -3
- package/mixins/_button.scss +11 -9
- package/mixins/_icons.scss +2 -4
- package/mixins/_notification.scss +6 -1
- package/package.json +15 -15
- package/placeholders/{badge.scss → _badge.scss} +7 -5
- package/placeholders/_index.scss +4 -0
- package/schematics/utils/dom-migration/get-dom-migration-rule.js +6 -5
- package/schematics/utils/dom-migration/get-dom-migration-rule.js.map +1 -1
- package/variables/_animation.scss +3 -1
- package/variables/_elevation.scss +15 -5
- package/variables/_spacing.scss +4 -2
- package/variables/components/_form-select.scss +3 -3
- package/variables/components/_forms.scss +5 -0
package/_svg-icon-map.scss
CHANGED
|
@@ -36,7 +36,7 @@ $svg-icon-map: (
|
|
|
36
36
|
'8001':
|
|
37
37
|
"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Crect/%3E%3Cpath d='m13.9 12.7-5.5 9.7H1.8l5.5-9.7-3.7-6.4h6.6l3.7 6.4zM30 0h-6.6L12.7 19.1 19.8 32h6.5l-7-12.9L30 0z'/%3E%3C/g%3E%3C/svg%3E",
|
|
38
38
|
'8000':
|
|
39
|
-
"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%
|
|
39
|
+
"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M24.87 2.667h4.714L19.288 14.465 31.401 30.52h-9.483l-7.428-9.739-8.5 9.739H1.274L12.286 17.9.667 2.667h9.725l6.713 8.899 7.766-8.899h-.001zm-1.652 25.025h2.612L8.971 5.346H6.17l17.048 22.346z'/%3E%3C/g%3E%3C/svg%3E",
|
|
40
40
|
'3260':
|
|
41
41
|
"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Crect/%3E%3Cpath d='M16 4C9.3 4 4 9.4 4 16s5.4 12 12 12 12-5.4 12-12S22.6 4 16 4zm0 1.3c2 0 3.9.6 5.5 1.6-1.5 1.7-6.8 6.6-14.7 3.7 1.9-3.2 5.3-5.3 9.2-5.3zm0 21.4c-5.9 0-10.7-4.8-10.7-10.7 0-1.5.3-2.9.9-4.2 1.9.7 3.8 1.1 5.4 1.1 5.8 0 9.7-3.8 11-5.2 2.5 2 4.1 5 4.1 8.4 0 5.8-4.8 10.6-10.7 10.6zm-3.3-10h-1.3c0-.4-.3-.7-.7-.7-.4 0-.7.3-.7.7H8.7c0-1.1.9-2 2-2s2 .9 2 2zm10.6 0H22c0-.4-.3-.7-.7-.7s-.7.3-.7.7h-1.3c0-1.1.9-2 2-2s2 .9 2 2zm-11.9 3.8h9.3v1.3h-9.3v-1.3z'/%3E%3C/g%3E%3C/svg%3E",
|
|
42
42
|
'3259':
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
|
|
18
18
|
// added a transition delay on the "z-index" so the button only moves back after all other transitions
|
|
19
19
|
z-index: 0;
|
|
20
|
-
transition:
|
|
20
|
+
transition:
|
|
21
|
+
z-index 0s ease (0.5 * button.$btn-transition-duration),
|
|
22
|
+
button.$btn-transition;
|
|
21
23
|
|
|
22
24
|
@include utilities.high-contrast-mode() {
|
|
23
25
|
transition: none !important;
|
|
@@ -43,3 +45,9 @@
|
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
}
|
|
48
|
+
|
|
49
|
+
.btn-check {
|
|
50
|
+
position: absolute;
|
|
51
|
+
clip: rect(0, 0, 0, 0);
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
}
|
package/components/button.scss
CHANGED
|
@@ -144,7 +144,9 @@
|
|
|
144
144
|
transform: rotateZ(315deg)
|
|
145
145
|
translate(button.$btn-border-width * -1, button.$btn-border-width * -1);
|
|
146
146
|
transform-origin: center center;
|
|
147
|
-
transition:
|
|
147
|
+
transition:
|
|
148
|
+
opacity 250ms,
|
|
149
|
+
transform 250ms;
|
|
148
150
|
border-right: button.$btn-border-width solid currentColor;
|
|
149
151
|
border-bottom: button.$btn-border-width solid currentColor;
|
|
150
152
|
opacity: 0;
|
|
@@ -152,8 +154,10 @@
|
|
|
152
154
|
|
|
153
155
|
@each $size in button.$btn-non-default-sizes {
|
|
154
156
|
&.btn-#{$size}::after {
|
|
155
|
-
right: map.get(button.$btn-padding-x-map, $size) -
|
|
156
|
-
|
|
157
|
+
right: map.get(button.$btn-padding-x-map, $size) - map.get(
|
|
158
|
+
button.$btn-animation-distance-map,
|
|
159
|
+
$size
|
|
160
|
+
);
|
|
157
161
|
}
|
|
158
162
|
}
|
|
159
163
|
|
package/components/carousel.scss
CHANGED
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
.carousel {
|
|
15
15
|
&:focus-visible {
|
|
16
16
|
outline: transparent;
|
|
17
|
-
box-shadow:
|
|
17
|
+
box-shadow:
|
|
18
|
+
0 0 0 2px #fff,
|
|
19
|
+
0 0 0 4px #000,
|
|
20
|
+
0 0 12px 5px rgba(0, 0, 0, 0.24);
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
@include utilities.high-contrast-mode() {
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
border: 2px solid color.$gray-60;
|
|
19
19
|
border-radius: commons.$border-radius;
|
|
20
20
|
padding: spacing.$size-regular;
|
|
21
|
-
transition:
|
|
21
|
+
transition:
|
|
22
|
+
color 100ms ease-in-out,
|
|
23
|
+
background-color 100ms ease-in-out,
|
|
22
24
|
border-color 100ms ease-in-out;
|
|
23
25
|
|
|
24
26
|
// Checked
|
package/components/dropdown.scss
CHANGED
|
@@ -20,17 +20,14 @@
|
|
|
20
20
|
left: forms.$input-border-width;
|
|
21
21
|
margin: 0;
|
|
22
22
|
padding-inline: forms.$form-floating-padding-x;
|
|
23
|
-
padding-top:
|
|
24
|
-
#{forms.$input-border-width} + #{forms.$form-floating-label-height * 0.5} - #{forms.$form-floating-label-font-size *
|
|
25
|
-
type.$line-height-copy * 0.5}
|
|
26
|
-
);
|
|
23
|
+
padding-top: forms.$form-floating-label-padding-t;
|
|
27
24
|
padding-bottom: 0;
|
|
28
25
|
border: 0;
|
|
29
26
|
color: forms.$form-floating-label-color;
|
|
30
27
|
font-size: forms.$form-floating-label-font-size;
|
|
31
28
|
width: auto;
|
|
32
29
|
height: auto;
|
|
33
|
-
max-width: calc(100% - (forms.$input-border-width * 2));
|
|
30
|
+
max-width: calc(100% - (#{forms.$input-border-width * 2}));
|
|
34
31
|
white-space: nowrap;
|
|
35
32
|
overflow: hidden;
|
|
36
33
|
text-overflow: ellipsis;
|
|
@@ -56,9 +53,9 @@
|
|
|
56
53
|
~ label {
|
|
57
54
|
padding-top: 0.7rem;
|
|
58
55
|
max-width: calc(
|
|
59
|
-
(100% * forms.$form-floating-label-upscale) -
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
(100% * #{forms.$form-floating-label-upscale}) - #{forms.$form-floating-label-translate-x *
|
|
57
|
+
forms.$form-floating-label-upscale * 2} - #{forms.$input-border-width * forms.$form-floating-label-upscale *
|
|
58
|
+
2}
|
|
62
59
|
);
|
|
63
60
|
transition: forms.$form-floating-transition-in;
|
|
64
61
|
}
|
|
@@ -78,24 +75,28 @@
|
|
|
78
75
|
|
|
79
76
|
padding-top: forms.$form-floating-input-padding-t;
|
|
80
77
|
padding-bottom: forms.$form-floating-input-padding-b;
|
|
78
|
+
background-size: forms.$form-floating-select-bg-size;
|
|
81
79
|
|
|
82
80
|
~ label {
|
|
83
81
|
padding-top: 0.7rem;
|
|
84
82
|
max-width: calc(
|
|
85
|
-
(100% * forms.$form-floating-label-upscale) -
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
(100% * #{forms.$form-floating-label-upscale}) - #{forms.$form-floating-label-translate-x *
|
|
84
|
+
forms.$form-floating-label-upscale * 2} - #{forms.$input-border-width * forms.$form-floating-label-upscale *
|
|
85
|
+
2}
|
|
88
86
|
);
|
|
89
87
|
transition: forms.$form-floating-transition-in;
|
|
90
88
|
}
|
|
91
89
|
|
|
92
|
-
|
|
90
|
+
// TODO: replace with :has
|
|
91
|
+
&:empty,
|
|
92
|
+
&.form-select-empty {
|
|
93
93
|
padding-top: forms.$form-floating-input-padding-t;
|
|
94
94
|
padding-bottom: forms.$form-floating-input-padding-b;
|
|
95
95
|
|
|
96
96
|
~ label {
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
color: forms.$form-floating-label-color;
|
|
98
|
+
padding-top: forms.$form-floating-label-padding-t;
|
|
99
|
+
max-width: calc(100% - (#{forms.$input-border-width * 2}));
|
|
99
100
|
transform: none;
|
|
100
101
|
}
|
|
101
102
|
}
|
|
@@ -109,10 +110,9 @@
|
|
|
109
110
|
padding-top: forms.$input-padding-y-lg * forms.$form-floating-label-scale;
|
|
110
111
|
padding-bottom: 0;
|
|
111
112
|
width: calc(
|
|
112
|
-
(100% * forms.$form-floating-label-upscale) -
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
(forms.$form-floating-padding-x * forms.$form-floating-label-upscale)
|
|
113
|
+
(100% * #{forms.$form-floating-label-upscale}) - #{forms.$form-floating-label-translate-x *
|
|
114
|
+
forms.$form-floating-label-upscale * 2} - #{forms.$input-border-width * forms.$form-floating-label-upscale *
|
|
115
|
+
2} - #{forms.$form-floating-padding-x * forms.$form-floating-label-upscale}
|
|
116
116
|
);
|
|
117
117
|
height: auto;
|
|
118
118
|
background: forms.$input-bg;
|
|
@@ -122,7 +122,9 @@
|
|
|
122
122
|
~ label {
|
|
123
123
|
padding-top: forms.$form-floating-padding-y;
|
|
124
124
|
padding-bottom: forms.$form-floating-padding-y;
|
|
125
|
-
width: calc(
|
|
125
|
+
width: calc(
|
|
126
|
+
100% - (#{forms.$input-border-width * 2}) - #{forms.$form-floating-padding-x}
|
|
127
|
+
);
|
|
126
128
|
height: forms.$form-floating-label-height;
|
|
127
129
|
}
|
|
128
130
|
}
|
|
@@ -136,7 +138,7 @@
|
|
|
136
138
|
|
|
137
139
|
~ label {
|
|
138
140
|
padding-bottom: 0;
|
|
139
|
-
width: calc(100% - (forms.$input-border-width * 2));
|
|
141
|
+
width: calc(100% - (#{forms.$input-border-width * 2}));
|
|
140
142
|
max-width: none;
|
|
141
143
|
height: unset;
|
|
142
144
|
}
|
|
@@ -149,10 +151,9 @@
|
|
|
149
151
|
~ label {
|
|
150
152
|
padding-top: forms.$input-padding-y-lg * forms.$form-floating-label-scale;
|
|
151
153
|
width: calc(
|
|
152
|
-
(100% * forms.$form-floating-label-upscale) -
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
(forms.$form-floating-padding-x * forms.$form-floating-label-upscale)
|
|
154
|
+
(100% * #{forms.$form-floating-label-upscale}) - #{forms.$form-floating-label-translate-x *
|
|
155
|
+
forms.$form-floating-label-upscale * 2} - #{forms.$input-border-width * forms.$form-floating-label-upscale *
|
|
156
|
+
2} - #{forms.$form-floating-padding-x * forms.$form-floating-label-upscale}
|
|
156
157
|
);
|
|
157
158
|
max-width: none;
|
|
158
159
|
background: forms.$input-bg;
|
|
@@ -162,8 +163,8 @@
|
|
|
162
163
|
&:is(.is-valid, .is-invalid) {
|
|
163
164
|
~ label {
|
|
164
165
|
width: calc(
|
|
165
|
-
100% - (forms.$input-border-width * 2) - forms.$form-floating-padding-x -
|
|
166
|
-
form-validation.$form-feedback-icon-
|
|
166
|
+
100% - (#{forms.$input-border-width * 2}) - #{forms.$form-floating-padding-x} - #{form-validation.$form-feedback-icon-offset} -
|
|
167
|
+
#{form-validation.$form-feedback-icon-size}
|
|
167
168
|
);
|
|
168
169
|
}
|
|
169
170
|
|
|
@@ -171,12 +172,11 @@
|
|
|
171
172
|
&:not(:placeholder-shown) {
|
|
172
173
|
~ label {
|
|
173
174
|
width: calc(
|
|
174
|
-
(100% * forms.$form-floating-label-upscale) -
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
(form-validation.$form-feedback-icon-size * forms.$form-floating-label-upscale)
|
|
175
|
+
(100% * #{forms.$form-floating-label-upscale}) - #{forms.$form-floating-label-translate-x *
|
|
176
|
+
forms.$form-floating-label-upscale * 2} - #{forms.$input-border-width * forms.$form-floating-label-upscale *
|
|
177
|
+
2} - #{forms.$form-floating-padding-x * forms.$form-floating-label-upscale} - #{form-validation.$form-feedback-icon-offset *
|
|
178
|
+
forms.$form-floating-label-upscale} - #{form-validation.$form-feedback-icon-size *
|
|
179
|
+
forms.$form-floating-label-upscale}
|
|
180
180
|
);
|
|
181
181
|
}
|
|
182
182
|
}
|
package/components/fonts.scss
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
font-display: swap;
|
|
7
7
|
font-family: 'Frutiger Neue For Post';
|
|
8
8
|
font-weight: 700;
|
|
9
|
-
src:
|
|
9
|
+
src:
|
|
10
|
+
url('#{options.$font-base-path}/FrutigerNeueforPostW05-Bold.woff2') format('woff2'),
|
|
10
11
|
url('#{options.$font-base-path}/FrutigerNeueforPostW05-Bold.woff') format('woff');
|
|
11
12
|
}
|
|
12
13
|
|
|
@@ -15,7 +16,8 @@
|
|
|
15
16
|
font-family: 'Frutiger Neue For Post';
|
|
16
17
|
font-weight: 700;
|
|
17
18
|
font-style: italic;
|
|
18
|
-
src:
|
|
19
|
+
src:
|
|
20
|
+
url('#{options.$font-base-path}/FrutigerNeueforPostW05-BdIt.woff2') format('woff2'),
|
|
19
21
|
url('#{options.$font-base-path}/FrutigerNeueforPostW05-BdIt.woff') format('woff');
|
|
20
22
|
}
|
|
21
23
|
|
|
@@ -23,7 +25,8 @@
|
|
|
23
25
|
font-display: swap;
|
|
24
26
|
font-family: 'Frutiger Neue For Post';
|
|
25
27
|
font-weight: 400;
|
|
26
|
-
src:
|
|
28
|
+
src:
|
|
29
|
+
url('#{options.$font-base-path}/FrutigerNeueforPostW05-Rg.woff2') format('woff2'),
|
|
27
30
|
url('#{options.$font-base-path}/FrutigerNeueforPostW05-Rg.woff') format('woff');
|
|
28
31
|
}
|
|
29
32
|
|
|
@@ -32,7 +35,8 @@
|
|
|
32
35
|
font-family: 'Frutiger Neue For Post';
|
|
33
36
|
font-weight: 400;
|
|
34
37
|
font-style: italic;
|
|
35
|
-
src:
|
|
38
|
+
src:
|
|
39
|
+
url('#{options.$font-base-path}/FrutigerNeueforPostW05-It.woff2') format('woff2'),
|
|
36
40
|
url('#{options.$font-base-path}/FrutigerNeueforPostW05-It.woff') format('woff');
|
|
37
41
|
}
|
|
38
42
|
|
|
@@ -40,7 +44,8 @@
|
|
|
40
44
|
font-display: swap;
|
|
41
45
|
font-family: 'Frutiger Neue For Post';
|
|
42
46
|
font-weight: 300;
|
|
43
|
-
src:
|
|
47
|
+
src:
|
|
48
|
+
url('#{options.$font-base-path}/FrutigerNeueforPostW05-Lt.woff2') format('woff2'),
|
|
44
49
|
url('#{options.$font-base-path}/FrutigerNeueforPostW05-Lt.woff') format('woff');
|
|
45
50
|
}
|
|
46
51
|
|
|
@@ -49,6 +54,7 @@
|
|
|
49
54
|
font-family: 'Frutiger Neue For Post';
|
|
50
55
|
font-weight: 300;
|
|
51
56
|
font-style: italic;
|
|
52
|
-
src:
|
|
57
|
+
src:
|
|
58
|
+
url('#{options.$font-base-path}/FrutigerNeueforPostW05-LtIt.woff2') format('woff2'),
|
|
53
59
|
url('#{options.$font-base-path}/FrutigerNeueforPostW05-LtIt.woff') format('woff');
|
|
54
60
|
}
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
&-input {
|
|
41
41
|
display: inline-flex;
|
|
42
42
|
flex: 0 auto;
|
|
43
|
-
appearance: none;
|
|
43
|
+
-webkit-appearance: none;
|
|
44
|
+
appearance: none;
|
|
44
45
|
background: none;
|
|
45
46
|
height: form-check.$form-check-input-size;
|
|
46
47
|
width: form-check.$form-check-input-size;
|
|
@@ -83,9 +84,10 @@
|
|
|
83
84
|
border-radius: 50%;
|
|
84
85
|
|
|
85
86
|
&:checked::after {
|
|
86
|
-
border: spacing.$size-micro solid
|
|
87
|
+
border: spacing.$size-micro solid transparent;
|
|
87
88
|
background-color: currentColor;
|
|
88
89
|
border-radius: inherit;
|
|
90
|
+
background-clip: padding-box;
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
93
|
|
|
@@ -127,7 +129,8 @@
|
|
|
127
129
|
background-image: form-check.$form-switch-background-image;
|
|
128
130
|
background-size: 2 * form-check.$form-switch-width;
|
|
129
131
|
background-position-x: 0;
|
|
130
|
-
transition:
|
|
132
|
+
transition:
|
|
133
|
+
background-color animation.$transition-base-timing,
|
|
131
134
|
background-position animation.$transition-base-timing;
|
|
132
135
|
|
|
133
136
|
&::after {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
@forward './../variables/options';
|
|
2
2
|
|
|
3
|
+
@use 'sass:map';
|
|
4
|
+
|
|
3
5
|
@use './../lic/bootstrap-license';
|
|
4
6
|
@use './../themes/bootstrap/core' as *;
|
|
5
7
|
@use './../themes/bootstrap/forms/validation' as bfv;
|
|
@@ -42,7 +44,7 @@
|
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
@each $state, $data in $form-validation-states {
|
|
45
|
-
$icon: map
|
|
47
|
+
$icon: map.get($data, 'icon');
|
|
46
48
|
|
|
47
49
|
@include form-validation-state-selector($state) {
|
|
48
50
|
~ .#{$state}-feedback,
|
package/components/forms.scss
CHANGED
|
@@ -54,6 +54,7 @@ select.form-control-rg:not([size]):not([multiple]) {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
// Fix Safari cutoff when change the initial position of the selector button.
|
|
57
|
+
/* stylelint-disable-next-line */
|
|
57
58
|
@supports (background: -webkit-named-image(i)) {
|
|
58
59
|
&::file-selector-button {
|
|
59
60
|
display: initial;
|
package/components/tables.scss
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@forward './../variables/options';
|
|
2
2
|
@use './../variables/color';
|
|
3
|
+
@use './../variables/commons';
|
|
3
4
|
@use './../lic/bootstrap-license';
|
|
4
5
|
@use './../themes/bootstrap/tables' as bt;
|
|
5
6
|
|
|
@@ -8,3 +9,50 @@
|
|
|
8
9
|
border-width: 0;
|
|
9
10
|
}
|
|
10
11
|
}
|
|
12
|
+
|
|
13
|
+
.table-mono {
|
|
14
|
+
// Set all border color
|
|
15
|
+
> thead,
|
|
16
|
+
> tbody,
|
|
17
|
+
> tfoot,
|
|
18
|
+
> :is(thead, tbody, tfoot) > tr,
|
|
19
|
+
> :is(thead, tbody, tfoot) > tr > :is(td, th) {
|
|
20
|
+
border-color: color.$white;
|
|
21
|
+
border-width: commons.$border-thick;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Remove striped background, but only if not associated with table-hover and hover
|
|
25
|
+
&.table-striped:not(.table-hover) > tbody > tr > :is(th, td),
|
|
26
|
+
&.table-striped.table-hover > tbody > tr:not(:hover) > :is(th, td) {
|
|
27
|
+
box-shadow: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Hide border between cells on tbody when hovered, but not bordered
|
|
31
|
+
&.table-hover:not(.table-bordered) {
|
|
32
|
+
> tbody > tr > :is(td, th) {
|
|
33
|
+
border: 0;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Underline by default (Hide cells border)
|
|
38
|
+
&:not(.table-bordered) {
|
|
39
|
+
> :is(thead, tbody, tfoot) > tr > :is(td, th) {
|
|
40
|
+
border: 0;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Remove border when borderless
|
|
45
|
+
&.table-borderless {
|
|
46
|
+
> thead,
|
|
47
|
+
> tbody,
|
|
48
|
+
> tfoot,
|
|
49
|
+
> :is(thead, tbody, tfoot) > tr,
|
|
50
|
+
> :is(thead, tbody, tfoot) > tr > :is(td, th) {
|
|
51
|
+
border: 0;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
> tbody > tr {
|
|
56
|
+
background-color: color.$gray-background;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
padding-right: 0;
|
|
41
41
|
// webkit subpixel-issue fix
|
|
42
42
|
margin-right: -1px;
|
|
43
|
-
clip-path: inset(0 1px (map.get(spacing.$size-curve-huge, 'xxl') * -1) 0);
|
|
43
|
+
-webkit-clip-path: inset(0 1px (map.get(spacing.$size-curve-huge, 'xxl') * -1) 0);
|
|
44
|
+
clip-path: inset(0 1px (map.get(spacing.$size-curve-huge, 'xxl') * -1) 0);
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
> .row {
|
package/components/type.scss
CHANGED
package/functions/_contrast.scss
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
|
+
@use 'sass:color';
|
|
3
|
+
@use 'sass:map';
|
|
2
4
|
|
|
3
5
|
// From https://codetuts.dev/text-contrast-sass/
|
|
4
6
|
// with updated math.pow and math.div
|
|
5
7
|
|
|
6
8
|
@function luminance($color) {
|
|
7
9
|
$rgb: (
|
|
8
|
-
'red': red($color),
|
|
9
|
-
'green': green($color),
|
|
10
|
-
'blue': blue($color),
|
|
10
|
+
'red': color.red($color),
|
|
11
|
+
'green': color.green($color),
|
|
12
|
+
'blue': color.blue($color),
|
|
11
13
|
);
|
|
12
14
|
|
|
13
15
|
@each $color, $value in $rgb {
|
|
@@ -20,7 +22,7 @@
|
|
|
20
22
|
$value: math.pow($value, 2.4);
|
|
21
23
|
}
|
|
22
24
|
|
|
23
|
-
$rgb: map
|
|
25
|
+
$rgb: map.merge(
|
|
24
26
|
$rgb,
|
|
25
27
|
(
|
|
26
28
|
$color: $value,
|
|
@@ -28,8 +30,8 @@
|
|
|
28
30
|
);
|
|
29
31
|
}
|
|
30
32
|
|
|
31
|
-
$result-luminance: (map
|
|
32
|
-
(map
|
|
33
|
+
$result-luminance: (map.get($rgb, 'red') * 0.2126) + (map.get($rgb, 'green') * 0.7152) +
|
|
34
|
+
(map.get($rgb, 'blue') * 0.0722);
|
|
33
35
|
|
|
34
36
|
@return $result-luminance;
|
|
35
37
|
}
|
package/functions/_list.scss
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use 'sass:math';
|
|
3
|
+
@use 'sass:string';
|
|
4
|
+
|
|
1
5
|
@function remove-nth($list, $index) {
|
|
2
6
|
$result: null;
|
|
3
7
|
|
|
4
8
|
@if type-of($index) != number {
|
|
5
|
-
@warn '$index: #{quote($index)} is not a number for `remove-nth`.';
|
|
9
|
+
@warn '$index: #{string.quote($index)} is not a number for `remove-nth`.';
|
|
6
10
|
} @else if $index == 0 {
|
|
7
11
|
@warn 'List index 0 must be a non-zero integer for `remove-nth`.';
|
|
8
|
-
} @else if abs($index) > length($list) {
|
|
9
|
-
@warn 'List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.';
|
|
12
|
+
} @else if math.abs($index) > list.length($list) {
|
|
13
|
+
@warn 'List index is #{$index} but list is only #{list.length($list)} item long for `remove-nth`.';
|
|
10
14
|
} @else {
|
|
11
15
|
$result: ();
|
|
12
|
-
$index: if($index < 0, length($list) + $index + 1, $index);
|
|
16
|
+
$index: if($index < 0, list.length($list) + $index + 1, $index);
|
|
13
17
|
|
|
14
|
-
@for $i from 1 through length($list) {
|
|
18
|
+
@for $i from 1 through list.length($list) {
|
|
15
19
|
@if $i != $index {
|
|
16
|
-
$result: append($result, nth($list, $i));
|
|
20
|
+
$result: list.append($result, list.nth($list, $i));
|
|
17
21
|
}
|
|
18
22
|
}
|
|
19
23
|
}
|
package/functions/_sizing.scss
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
|
+
@use 'sass:list';
|
|
2
3
|
|
|
3
4
|
@use './utilities';
|
|
4
|
-
@use './list';
|
|
5
|
+
@use './list' as list-fn;
|
|
5
6
|
|
|
6
7
|
@function strip-unit($value) {
|
|
7
8
|
@return math.div($value, $value * 0 + 1);
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
@function calculate-single-box-shadow-size($box-shadow) {
|
|
62
|
-
$len: length($box-shadow);
|
|
63
|
+
$len: list.length($box-shadow);
|
|
63
64
|
$multiplier: 1;
|
|
64
65
|
$box-shadow-size: 0;
|
|
65
66
|
|
|
@@ -67,37 +68,37 @@
|
|
|
67
68
|
@error "The function 'calculate-single-box-shadow-size($box-shadow)' is not for calculating the combined size of multiple box-shadows. Failed value: '#{$box-shadow}'.";
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
@if (nth($box-shadow, 1) == 'inset') {
|
|
71
|
+
@if (list.nth($box-shadow, 1) == 'inset') {
|
|
71
72
|
$multiplier: -1;
|
|
72
|
-
$box-shadow: list.remove-nth($box-shadow, 1);
|
|
73
|
+
$box-shadow: list-fn.remove-nth($box-shadow, 1);
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
@if (utilities.starts-with-any(nth($box-shadow, -1), 'hsl', 'rgb', '#')) {
|
|
76
|
-
$box-shadow: list.remove-nth($box-shadow, -1);
|
|
77
|
+
$box-shadow: list-fn.remove-nth($box-shadow, -1);
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
$len: length($box-shadow);
|
|
80
|
+
$len: list.length($box-shadow);
|
|
80
81
|
|
|
81
82
|
@if ($len > 4) {
|
|
82
83
|
@error "The function 'calculate-single-box-shadow-size($box-shadow)' is not for calculating the combined size of multiple box-shadows. Failed value: '#{$box-shadow}'.";
|
|
83
84
|
}
|
|
84
85
|
|
|
85
|
-
@if (abs(nth($box-shadow, 1)) >= abs(nth($box-shadow, 2))) {
|
|
86
|
-
$box-shadow-size: $box-shadow-size + abs(nth($box-shadow, 1));
|
|
86
|
+
@if (math.abs(list.nth($box-shadow, 1)) >= math.abs(list.nth($box-shadow, 2))) {
|
|
87
|
+
$box-shadow-size: $box-shadow-size + math.abs(list.nth($box-shadow, 1));
|
|
87
88
|
} @else {
|
|
88
|
-
$box-shadow-size: $box-shadow-size + abs(nth($box-shadow, 2));
|
|
89
|
+
$box-shadow-size: $box-shadow-size + math.abs(list.nth($box-shadow, 2));
|
|
89
90
|
}
|
|
90
91
|
|
|
91
92
|
@if ($len >= 3) {
|
|
92
|
-
$box-shadow-size: $box-shadow-size + (abs(nth($box-shadow, 3)) * 0.7);
|
|
93
|
+
$box-shadow-size: $box-shadow-size + (math.abs(list.nth($box-shadow, 3)) * 0.7);
|
|
93
94
|
}
|
|
94
95
|
|
|
95
96
|
@if ($len == 4) {
|
|
96
|
-
$box-shadow-size: $box-shadow-size + nth($box-shadow, 4);
|
|
97
|
+
$box-shadow-size: $box-shadow-size + list.nth($box-shadow, 4);
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
@if (unit($box-shadow-size) == 'px') {
|
|
100
|
-
$box-shadow-size: ceil($box-shadow-size);
|
|
101
|
+
$box-shadow-size: math.ceil($box-shadow-size);
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
@return $box-shadow-size;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
|
+
@use 'sass:list';
|
|
2
3
|
|
|
3
4
|
@use 'sass:string';
|
|
4
5
|
@use 'sass:map';
|
|
@@ -17,11 +18,11 @@
|
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
@if (map-has-key($map, $key1)) {
|
|
20
|
-
$found-index: index(map.keys($map), $key1);
|
|
21
|
+
$found-index: list.index(map.keys($map), $key1);
|
|
21
22
|
|
|
22
23
|
@if ($key2) {
|
|
23
24
|
$map: map.get($map, $key1);
|
|
24
|
-
$found-index: index($map, $key2);
|
|
25
|
+
$found-index: list.index($map, $key2);
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
|