@siemens/element-theme 51.0.0-rc.6 → 51.0.0-rc.7
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/package.json +1 -1
- package/src/styles/_accessibility.scss +4 -2
- package/src/styles/_reboot-shadow-dom.scss +5 -0
- package/src/styles/_root-font-size.scss +4 -2
- package/src/styles/_selectors.scss +3 -0
- package/src/styles/_themes.scss +15 -3
- package/src/styles/bootstrap/_nav.scss +10 -1
- package/src/styles/bootstrap/_reboot.scss +8 -2
- package/src/styles/bootstrap/_root.scss +2 -1
- package/src/styles/bootstrap/_type.scss +64 -2
- package/src/styles/bootstrap/_utilities.scss +45 -45
- package/src/styles/bootstrap/_variables.scss +3 -4
- package/src/styles/bootstrap/forms/_form-check.scss +2 -0
- package/src/styles/bootstrap/forms/_form-layout.scss +36 -0
- package/src/styles/bootstrap/mixins/_form-layout.scss +3 -1
- package/src/styles/components/_datatable.scss +18 -19
- package/src/styles/components/_drag_drop.scss +2 -1
- package/src/styles/components/_scrollbar.scss +2 -1
- package/src/styles/variables/_typography.scss +53 -18
- package/src/theme-shadow-dom.scss +17 -0
- package/src/theme.scss +11 -3
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
@use 'selectors';
|
|
2
|
+
|
|
1
3
|
$element-root-font-size: initial !default;
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
#{selectors.$document} {
|
|
4
6
|
// defines the default with low specificity, i.e. easy overridable with :root
|
|
5
7
|
--element-root-font-size: #{$element-root-font-size};
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
#{selectors.$root} {
|
|
9
11
|
font-size: var(--element-root-font-size);
|
|
10
12
|
}
|
|
11
13
|
|
package/src/styles/_themes.scss
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
$_theme-default: 'element';
|
|
4
4
|
$_themes: () !default;
|
|
5
|
+
$_root-selector: ':root';
|
|
5
6
|
|
|
6
|
-
@mixin configure($defaultTheme: null, $themes: ()) {
|
|
7
|
+
@mixin configure($defaultTheme: null, $themes: (), $rootSelector: null) {
|
|
7
8
|
@if $defaultTheme {
|
|
8
9
|
$_theme-default: $defaultTheme !global;
|
|
9
10
|
}
|
|
@@ -11,11 +12,17 @@ $_themes: () !default;
|
|
|
11
12
|
@if $themes {
|
|
12
13
|
$_themes: $themes !global;
|
|
13
14
|
}
|
|
15
|
+
|
|
16
|
+
@if $rootSelector {
|
|
17
|
+
$_root-selector: $rootSelector !global;
|
|
18
|
+
}
|
|
14
19
|
}
|
|
15
20
|
|
|
16
|
-
@mixin make-theme($vars, $name, $dark: false, $force-generate: false) {
|
|
21
|
+
@mixin make-theme($vars, $name, $dark: false, $force-generate: false, $root-selector: null) {
|
|
17
22
|
$theme-name: '';
|
|
18
23
|
$mode: '';
|
|
24
|
+
$actual-root-selector: $root-selector or $_root-selector;
|
|
25
|
+
$selector: '';
|
|
19
26
|
|
|
20
27
|
@if list.index($_themes, $name) or $name == $_theme-default or $force-generate {
|
|
21
28
|
@if $name != $_theme-default {
|
|
@@ -26,7 +33,12 @@ $_themes: () !default;
|
|
|
26
33
|
$mode: '.app--dark';
|
|
27
34
|
}
|
|
28
35
|
|
|
29
|
-
:root#{$theme-name}#{$mode}
|
|
36
|
+
$selector: '#{$actual-root-selector}#{$theme-name}#{$mode}';
|
|
37
|
+
@if $actual-root-selector == ':host' and ($theme-name != '' or $mode != '') {
|
|
38
|
+
$selector: ':host(#{$theme-name}#{$mode})';
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
#{$selector} {
|
|
30
42
|
@each $token, $val in $vars {
|
|
31
43
|
--#{$token}: #{$val};
|
|
32
44
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use '../variables/system-tokens';
|
|
2
2
|
@use '../variables/spacers';
|
|
3
|
+
@use '../variables/typography';
|
|
3
4
|
@use './variables';
|
|
4
5
|
|
|
5
6
|
@use 'sass:map';
|
|
@@ -56,7 +57,7 @@ $nav-tabs-min-width: 100px;
|
|
|
56
57
|
position: absolute;
|
|
57
58
|
inset-inline: 0;
|
|
58
59
|
inset-block-end: 0;
|
|
59
|
-
block-size:
|
|
60
|
+
block-size: 1px;
|
|
60
61
|
background: system-tokens.$si-sys-border-4;
|
|
61
62
|
}
|
|
62
63
|
|
|
@@ -78,6 +79,7 @@ $nav-tabs-min-width: 100px;
|
|
|
78
79
|
border-start-start-radius: variables.$btn-border-radius;
|
|
79
80
|
border-start-end-radius: variables.$btn-border-radius;
|
|
80
81
|
cursor: pointer;
|
|
82
|
+
font-weight: typography.$si-font-weight-body-lg;
|
|
81
83
|
|
|
82
84
|
.badge {
|
|
83
85
|
margin-inline-end: 0;
|
|
@@ -85,12 +87,19 @@ $nav-tabs-min-width: 100px;
|
|
|
85
87
|
|
|
86
88
|
&.active {
|
|
87
89
|
border-color: system-tokens.$si-sys-border-accent-hover;
|
|
90
|
+
font-size: typography.$si-font-size-body-lg-bold;
|
|
91
|
+
font-weight: typography.$si-font-weight-body-lg-bold;
|
|
92
|
+
line-height: typography.$si-line-height-body-lg-bold;
|
|
88
93
|
}
|
|
89
94
|
|
|
90
95
|
&:hover {
|
|
91
96
|
isolation: isolate;
|
|
92
97
|
}
|
|
93
98
|
|
|
99
|
+
&:not(.active):hover {
|
|
100
|
+
color: variables.$nav-link-color;
|
|
101
|
+
}
|
|
102
|
+
|
|
94
103
|
&.disabled {
|
|
95
104
|
color: variables.$nav-link-disabled-color;
|
|
96
105
|
background-color: transparent;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use '../variables/typography';
|
|
2
|
+
@use '../selectors';
|
|
2
3
|
@use './variables';
|
|
3
4
|
|
|
4
5
|
// stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
|
|
@@ -25,7 +26,7 @@
|
|
|
25
26
|
// Ability to the value of the root font sizes, affecting the value of `rem`.
|
|
26
27
|
// null by default, thus nothing is generated.
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
#{selectors.$root} {
|
|
29
30
|
@if variables.$enable-smooth-scroll {
|
|
30
31
|
@media (prefers-reduced-motion: no-preference) {
|
|
31
32
|
scroll-behavior: smooth;
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
// 4. Change the default tap highlight to be completely transparent in iOS.
|
|
42
43
|
|
|
43
44
|
// scss-docs-start reboot-body-rules
|
|
44
|
-
body {
|
|
45
|
+
#{selectors.$body} {
|
|
45
46
|
margin: 0; // 1
|
|
46
47
|
font-family: var(--#{variables.$variable-prefix}body-font-family);
|
|
47
48
|
font-size: var(--#{variables.$variable-prefix}body-font-size);
|
|
@@ -341,6 +342,11 @@ table {
|
|
|
341
342
|
}
|
|
342
343
|
|
|
343
344
|
caption {
|
|
345
|
+
@include typography.si-font(
|
|
346
|
+
typography.$si-font-size-caption,
|
|
347
|
+
typography.$si-line-height-caption,
|
|
348
|
+
typography.$si-font-weight-caption
|
|
349
|
+
);
|
|
344
350
|
padding-block: variables.$table-cell-padding-y;
|
|
345
351
|
color: variables.$table-caption-color;
|
|
346
352
|
text-align: start;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
@use './variables';
|
|
2
|
+
@use '../selectors';
|
|
2
3
|
|
|
3
4
|
@use 'sass:meta';
|
|
4
5
|
|
|
5
6
|
// this is _root.scss without the automatic `to-rgb` brain damage
|
|
6
|
-
|
|
7
|
+
#{selectors.$root} {
|
|
7
8
|
// Note: Use `inspect` for lists so that quoted items keep the quotes.
|
|
8
9
|
// See https://github.com/sass/sass/issues/2383#issuecomment-336349172
|
|
9
10
|
--#{variables.$variable-prefix}font-sans-serif: #{meta.inspect(variables.$font-family-sans-serif)};
|
|
@@ -167,9 +167,7 @@ h4,
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
h5,
|
|
170
|
-
h6,
|
|
171
170
|
.h5,
|
|
172
|
-
.h6,
|
|
173
171
|
.si-h5 {
|
|
174
172
|
@include typography.si-font(
|
|
175
173
|
typography.$si-font-size-h5,
|
|
@@ -178,6 +176,16 @@ h6,
|
|
|
178
176
|
);
|
|
179
177
|
}
|
|
180
178
|
|
|
179
|
+
h6,
|
|
180
|
+
.h6,
|
|
181
|
+
.si-h6 {
|
|
182
|
+
@include typography.si-font(
|
|
183
|
+
typography.$si-font-size-h6,
|
|
184
|
+
typography.$si-line-height-h6,
|
|
185
|
+
typography.$si-font-weight-h6
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
181
189
|
.si-body-lg {
|
|
182
190
|
@include typography.si-font(
|
|
183
191
|
typography.$si-font-size-body-lg,
|
|
@@ -194,6 +202,22 @@ h6,
|
|
|
194
202
|
);
|
|
195
203
|
}
|
|
196
204
|
|
|
205
|
+
.si-body-paragraph {
|
|
206
|
+
@include typography.si-font(
|
|
207
|
+
typography.$si-font-size-body-paragraph,
|
|
208
|
+
typography.$si-line-height-body-paragraph,
|
|
209
|
+
typography.$si-font-weight-body-paragraph
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.si-body-sm {
|
|
214
|
+
@include typography.si-font(
|
|
215
|
+
typography.$si-font-size-body-sm,
|
|
216
|
+
typography.$si-line-height-body-sm,
|
|
217
|
+
typography.$si-font-weight-body-sm
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
|
|
197
221
|
.si-caption {
|
|
198
222
|
@include typography.si-font(
|
|
199
223
|
typography.$si-font-size-caption,
|
|
@@ -211,6 +235,14 @@ h6,
|
|
|
211
235
|
);
|
|
212
236
|
}
|
|
213
237
|
|
|
238
|
+
.si-display-xxl {
|
|
239
|
+
@include typography.si-font(
|
|
240
|
+
typography.$si-font-size-display-xxl,
|
|
241
|
+
typography.$si-line-height-display-xxl,
|
|
242
|
+
typography.$si-font-weight-display-xxl
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
|
|
214
246
|
.si-display-lg,
|
|
215
247
|
.display-2 {
|
|
216
248
|
@include typography.si-font(
|
|
@@ -238,6 +270,36 @@ h6,
|
|
|
238
270
|
);
|
|
239
271
|
}
|
|
240
272
|
|
|
273
|
+
.si-code-sm,
|
|
274
|
+
.si-code,
|
|
275
|
+
.si-code-lg {
|
|
276
|
+
font-family: typography.$si-font-family-mono;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.si-code-sm {
|
|
280
|
+
@include typography.si-font(
|
|
281
|
+
typography.$si-font-size-code-sm,
|
|
282
|
+
typography.$si-line-height-code-sm,
|
|
283
|
+
typography.$si-font-weight-code-sm
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.si-code {
|
|
288
|
+
@include typography.si-font(
|
|
289
|
+
typography.$si-font-size-code,
|
|
290
|
+
typography.$si-line-height-code,
|
|
291
|
+
typography.$si-font-weight-code
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.si-code-lg {
|
|
296
|
+
@include typography.si-font(
|
|
297
|
+
typography.$si-font-size-code-lg,
|
|
298
|
+
typography.$si-line-height-code-lg,
|
|
299
|
+
typography.$si-font-weight-code-lg
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
|
|
241
303
|
.text-pre {
|
|
242
304
|
white-space: pre;
|
|
243
305
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '../variables/
|
|
1
|
+
@use '../variables/system-tokens';
|
|
2
2
|
@use '../variables/utilities' as variables-utilities;
|
|
3
3
|
@use 'mixins/breakpoints';
|
|
4
4
|
@use 'mixins/utilities' as mixins-utilities;
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
$text-colors: (
|
|
39
|
-
'primary':
|
|
40
|
-
'body':
|
|
41
|
-
'secondary':
|
|
42
|
-
'tertiary':
|
|
43
|
-
'success':
|
|
44
|
-
'info':
|
|
45
|
-
'warning':
|
|
46
|
-
'caution':
|
|
47
|
-
'danger':
|
|
48
|
-
'inverse':
|
|
49
|
-
'muted':
|
|
39
|
+
'primary': system-tokens.$si-sys-text-accent,
|
|
40
|
+
'body': system-tokens.$si-sys-text-primary,
|
|
41
|
+
'secondary': system-tokens.$si-sys-text-secondary,
|
|
42
|
+
'tertiary': system-tokens.$si-sys-text-disabled,
|
|
43
|
+
'success': system-tokens.$si-sys-text-success,
|
|
44
|
+
'info': system-tokens.$si-sys-text-information,
|
|
45
|
+
'warning': system-tokens.$si-sys-text-warning,
|
|
46
|
+
'caution': system-tokens.$si-sys-text-caution,
|
|
47
|
+
'danger': system-tokens.$si-sys-text-danger,
|
|
48
|
+
'inverse': system-tokens.$si-sys-text-inverse,
|
|
49
|
+
'muted': system-tokens.$si-sys-text-disabled
|
|
50
50
|
) !default;
|
|
51
51
|
|
|
52
52
|
@each $color, $value in $text-colors {
|
|
@@ -56,26 +56,26 @@ $text-colors: (
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
$background-colors: (
|
|
59
|
-
'primary':
|
|
60
|
-
'secondary':
|
|
61
|
-
'tertiary':
|
|
62
|
-
'success':
|
|
63
|
-
'info':
|
|
64
|
-
'warning':
|
|
65
|
-
'danger':
|
|
66
|
-
'base-0':
|
|
67
|
-
'base-1':
|
|
68
|
-
'base-2':
|
|
69
|
-
'base-3':
|
|
70
|
-
'base-4':
|
|
71
|
-
'base-success':
|
|
72
|
-
'base-info':
|
|
73
|
-
'base-caution':
|
|
74
|
-
'base-warning':
|
|
75
|
-
'base-danger':
|
|
76
|
-
'base-critical':
|
|
77
|
-
'base-translucent-1':
|
|
78
|
-
'base-translucent-2':
|
|
59
|
+
'primary': system-tokens.$si-sys-background-accent,
|
|
60
|
+
'secondary': system-tokens.$si-sys-text-secondary,
|
|
61
|
+
'tertiary': system-tokens.$si-sys-text-disabled,
|
|
62
|
+
'success': system-tokens.$si-sys-background-success,
|
|
63
|
+
'info': system-tokens.$si-sys-background-information,
|
|
64
|
+
'warning': system-tokens.$si-sys-background-warning,
|
|
65
|
+
'danger': system-tokens.$si-sys-background-danger,
|
|
66
|
+
'base-0': system-tokens.$si-sys-background-0,
|
|
67
|
+
'base-1': system-tokens.$si-sys-background-1,
|
|
68
|
+
'base-2': system-tokens.$si-sys-background-2,
|
|
69
|
+
'base-3': system-tokens.$si-sys-background-3,
|
|
70
|
+
'base-4': system-tokens.$si-sys-background-4,
|
|
71
|
+
'base-success': system-tokens.$si-sys-background-success-subtle,
|
|
72
|
+
'base-info': system-tokens.$si-sys-background-information-subtle,
|
|
73
|
+
'base-caution': system-tokens.$si-sys-background-caution-subtle,
|
|
74
|
+
'base-warning': system-tokens.$si-sys-background-warning-subtle,
|
|
75
|
+
'base-danger': system-tokens.$si-sys-background-danger-subtle,
|
|
76
|
+
'base-critical': system-tokens.$si-sys-background-critical-subtle,
|
|
77
|
+
'base-translucent-1': system-tokens.$si-sys-effects-backdrop,
|
|
78
|
+
'base-translucent-2': system-tokens.$si-sys-background-inverse
|
|
79
79
|
) !default;
|
|
80
80
|
|
|
81
81
|
@each $color, $value in $background-colors {
|
|
@@ -85,19 +85,19 @@ $background-colors: (
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
$status-colors: (
|
|
88
|
-
'success':
|
|
89
|
-
'info':
|
|
90
|
-
'caution':
|
|
91
|
-
'warning':
|
|
92
|
-
'danger':
|
|
93
|
-
'critical':
|
|
94
|
-
'neutral':
|
|
95
|
-
'success-contrast':
|
|
96
|
-
'info-contrast':
|
|
97
|
-
'caution-contrast':
|
|
98
|
-
'warning-contrast':
|
|
99
|
-
'danger-contrast':
|
|
100
|
-
'critical-contrast':
|
|
88
|
+
'success': system-tokens.$si-sys-background-success,
|
|
89
|
+
'info': system-tokens.$si-sys-background-information,
|
|
90
|
+
'caution': system-tokens.$si-sys-background-caution,
|
|
91
|
+
'warning': system-tokens.$si-sys-background-warning,
|
|
92
|
+
'danger': system-tokens.$si-sys-background-danger,
|
|
93
|
+
'critical': system-tokens.$si-sys-background-critical,
|
|
94
|
+
'neutral': system-tokens.$si-sys-background-neutral,
|
|
95
|
+
'success-contrast': system-tokens.$si-sys-text-on-success,
|
|
96
|
+
'info-contrast': system-tokens.$si-sys-text-on-information,
|
|
97
|
+
'caution-contrast': system-tokens.$si-sys-text-on-caution,
|
|
98
|
+
'warning-contrast': system-tokens.$si-sys-text-on-warning,
|
|
99
|
+
'danger-contrast': system-tokens.$si-sys-text-on-danger,
|
|
100
|
+
'critical-contrast': system-tokens.$si-sys-text-on-critical
|
|
101
101
|
) !default;
|
|
102
102
|
|
|
103
103
|
@each $color, $value in $status-colors {
|
|
@@ -155,8 +155,7 @@ $aspect-ratios: (
|
|
|
155
155
|
//
|
|
156
156
|
// Font, line-height, and color for body text, headings, and more.
|
|
157
157
|
$font-family-sans-serif: var(--element-body-font-family);
|
|
158
|
-
$font-family-monospace:
|
|
159
|
-
SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace !default;
|
|
158
|
+
$font-family-monospace: typography.$si-font-family-mono !default;
|
|
160
159
|
|
|
161
160
|
$font-family-base: $font-family-sans-serif !default;
|
|
162
161
|
$font-family-code: $font-family-monospace !default;
|
|
@@ -185,7 +184,7 @@ $h2-font-size: typography.$si-font-size-h2 !default;
|
|
|
185
184
|
$h3-font-size: typography.$si-font-size-h3 !default;
|
|
186
185
|
$h4-font-size: typography.$si-font-size-h4 !default;
|
|
187
186
|
$h5-font-size: typography.$si-font-size-h5 !default;
|
|
188
|
-
$h6-font-size:
|
|
187
|
+
$h6-font-size: typography.$si-font-size-h6 !default;
|
|
189
188
|
|
|
190
189
|
$font-sizes: (
|
|
191
190
|
1: $h1-font-size,
|
|
@@ -273,7 +272,7 @@ $table-striped-order: odd !default;
|
|
|
273
272
|
|
|
274
273
|
$table-group-separator-color: currentColor !default;
|
|
275
274
|
|
|
276
|
-
$table-caption-color:
|
|
275
|
+
$table-caption-color: semantic-tokens.$element-text-secondary !default;
|
|
277
276
|
|
|
278
277
|
$table-variants: (
|
|
279
278
|
'success': system-tokens.$si-sys-background-success-subtle,
|
|
@@ -26,6 +26,7 @@ $form-check-label-start: calc($form-check-size + map.get(spacers.$spacers, 4));
|
|
|
26
26
|
.form-check {
|
|
27
27
|
padding-block: map.get(spacers.$spacers, 1);
|
|
28
28
|
padding-inline-start: calc($form-check-size + map.get(spacers.$spacers, 4));
|
|
29
|
+
margin-block-end: map.get(spacers.$spacers, 2);
|
|
29
30
|
|
|
30
31
|
@extend %form-check-spacing;
|
|
31
32
|
|
|
@@ -36,6 +37,7 @@ $form-check-label-start: calc($form-check-size + map.get(spacers.$spacers, 4));
|
|
|
36
37
|
|
|
37
38
|
.form-check-inline {
|
|
38
39
|
display: inline-block;
|
|
40
|
+
margin-block-end: 0;
|
|
39
41
|
margin-inline-end: variables.$form-check-inline-margin-end;
|
|
40
42
|
@extend %form-check-spacing;
|
|
41
43
|
}
|
|
@@ -1,4 +1,40 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@use '../mixins/form-layout';
|
|
3
|
+
@use '../../variables/spacers';
|
|
4
|
+
|
|
5
|
+
.si-form-fieldset,
|
|
6
|
+
.si-form-input {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
margin-block-end: map.get(spacers.$spacers, 6);
|
|
10
|
+
|
|
11
|
+
.form-item-content {
|
|
12
|
+
flex-grow: 1;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.si-form-fieldset {
|
|
17
|
+
.form-label {
|
|
18
|
+
margin-block-end: map.get(spacers.$spacers, 2);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.form-check:not(.form-check-inline) {
|
|
22
|
+
display: block;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:is(.si-form-fieldset, .si-form-input) .form-label:empty {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Maintain compatibility with the old si-form-item style which allows wrapping multiple checkboxes.
|
|
31
|
+
:is(.si-form-fieldset, .si-form-input).form-check:not(.form-check-inline) {
|
|
32
|
+
display: block;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:is(.si-form-fieldset, .si-form-input).form-check:has(.form-check) {
|
|
36
|
+
padding-block: 0;
|
|
37
|
+
}
|
|
2
38
|
|
|
3
39
|
.form-col-layout {
|
|
4
40
|
@include form-layout.form-col-layout;
|
|
@@ -6,6 +6,7 @@ $form-col-layout-label-width: 16ch !default;
|
|
|
6
6
|
|
|
7
7
|
/* Turns every inner form-field into a column layout */
|
|
8
8
|
@mixin form-col-layout {
|
|
9
|
+
.si-form-fieldset,
|
|
9
10
|
.si-form-input:not(.form-check),
|
|
10
11
|
.si-form-input.form-check:not(.form-check-inline) {
|
|
11
12
|
display: flex;
|
|
@@ -40,12 +41,13 @@ $form-col-layout-label-width: 16ch !default;
|
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
si-form-fieldset
|
|
44
|
+
.si-form-fieldset {
|
|
44
45
|
align-items: start;
|
|
45
46
|
|
|
46
47
|
> .form-label {
|
|
47
48
|
align-self: start;
|
|
48
49
|
padding-block: map.get(spacers.$spacers, 1) 0 !important; // stylelint-disable-line declaration-no-important
|
|
50
|
+
margin-block-end: 0 !important; // stylelint-disable-line declaration-no-important
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
53
|
}
|
|
@@ -105,6 +105,24 @@ $datatable-ghost-cell-strip-radius: 0 !default;
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
&.scroll-horz {
|
|
109
|
+
.datatable-row-left {
|
|
110
|
+
.datatable-body-cell:last-child,
|
|
111
|
+
.datatable-header-cell:last-child {
|
|
112
|
+
box-shadow: system-tokens.$si-sys-effects-shadow-3;
|
|
113
|
+
clip-path: inset(0 -8px 0 0);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.datatable-row-right {
|
|
118
|
+
.datatable-body-cell:first-child,
|
|
119
|
+
.datatable-header-cell:first-child {
|
|
120
|
+
box-shadow: system-tokens.$si-sys-effects-shadow-3;
|
|
121
|
+
clip-path: inset(0 0 0 -8px);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
108
126
|
// 'checkbox' selection
|
|
109
127
|
:is(.datatable-header-cell, .datatable-body-cell) {
|
|
110
128
|
label.datatable-checkbox {
|
|
@@ -185,24 +203,6 @@ $datatable-ghost-cell-strip-radius: 0 !default;
|
|
|
185
203
|
}
|
|
186
204
|
}
|
|
187
205
|
}
|
|
188
|
-
|
|
189
|
-
.horizontal-overflow {
|
|
190
|
-
.datatable-row-left {
|
|
191
|
-
.datatable-body-cell:last-child,
|
|
192
|
-
.datatable-header-cell:last-child {
|
|
193
|
-
box-shadow: 0 0 8px system-tokens.$si-sys-effects-shadow-1;
|
|
194
|
-
clip-path: inset(0 -8px 0 0);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.datatable-row-right {
|
|
199
|
-
.datatable-body-cell:first-child,
|
|
200
|
-
.datatable-header-cell:first-child {
|
|
201
|
-
box-shadow: 0 0 8px system-tokens.$si-sys-effects-shadow-1;
|
|
202
|
-
clip-path: inset(0 0 0 -8px);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
// Header Styles
|
|
@@ -239,7 +239,6 @@ $datatable-ghost-cell-strip-radius: 0 !default;
|
|
|
239
239
|
|
|
240
240
|
:is(.datatable-row-left, .datatable-row-right) {
|
|
241
241
|
background-color: variables.$table-bg;
|
|
242
|
-
display: flex;
|
|
243
242
|
|
|
244
243
|
.datatable-header-cell {
|
|
245
244
|
flex-shrink: 0;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
@use '../variables';
|
|
2
|
+
@use '../selectors';
|
|
2
3
|
|
|
3
4
|
/* stylelint-disable declaration-no-important */
|
|
4
5
|
|
|
5
|
-
body:has(.cdk-drag-preview, .ui-draggable-dragging) {
|
|
6
|
+
#{selectors.$body}:has(.cdk-drag-preview, .ui-draggable-dragging) {
|
|
6
7
|
cursor: grabbing !important;
|
|
7
8
|
|
|
8
9
|
.cdk-drop-list:not(.cdk-drop-list-dragging) {
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
@return math.div($ratio, $ratio * 0 + 1);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
$si-font-family: 'SiemensSans Pro', sans-serif;
|
|
18
|
+
$si-font-family: 'SiemensSans Pro VF', 'SiemensSans Pro', helvetica, arial, sans-serif;
|
|
19
|
+
$si-font-family-mono: 'JetBrains Mono', monospace;
|
|
19
20
|
|
|
20
21
|
$si-font-weight-lighter: lighter !default;
|
|
21
22
|
$si-font-weight-light: 300 !default;
|
|
@@ -26,19 +27,19 @@ $si-font-weight-bold: 700 !default;
|
|
|
26
27
|
$si-font-weight-bolder: bolder !default;
|
|
27
28
|
$si-font-weight-black: 900 !default;
|
|
28
29
|
|
|
29
|
-
$si-font-size-h1-bold: px-to-rem(
|
|
30
|
+
$si-font-size-h1-bold: px-to-rem(28px);
|
|
30
31
|
$si-line-height-h1-bold: px-to-ratio($si-font-size-h1-bold, 36px);
|
|
31
32
|
$si-font-weight-h1-bold: $si-font-weight-bold;
|
|
32
33
|
|
|
33
|
-
$si-font-size-h1: px-to-rem(
|
|
34
|
+
$si-font-size-h1: px-to-rem(28px);
|
|
34
35
|
$si-line-height-h1: px-to-ratio($si-font-size-h1, 36px);
|
|
35
36
|
$si-font-weight-h1: $si-font-weight-normal;
|
|
36
37
|
|
|
37
|
-
$si-font-size-h2: px-to-rem(
|
|
38
|
-
$si-line-height-h2: px-to-ratio($si-font-size-h2,
|
|
38
|
+
$si-font-size-h2: px-to-rem(24px);
|
|
39
|
+
$si-line-height-h2: px-to-ratio($si-font-size-h2, 32px);
|
|
39
40
|
$si-font-weight-h2: $si-font-weight-semibold;
|
|
40
41
|
|
|
41
|
-
$si-font-size-h3: px-to-rem(
|
|
42
|
+
$si-font-size-h3: px-to-rem(20px);
|
|
42
43
|
$si-line-height-h3: px-to-ratio($si-font-size-h3, 24px);
|
|
43
44
|
$si-font-weight-h3: $si-font-weight-semibold;
|
|
44
45
|
|
|
@@ -51,38 +52,72 @@ $si-line-height-h4-bold: px-to-ratio($si-font-size-h4-bold, 20px);
|
|
|
51
52
|
$si-font-weight-h4-bold: $si-font-weight-bold;
|
|
52
53
|
|
|
53
54
|
$si-font-size-h5: px-to-rem(14px);
|
|
54
|
-
$si-line-height-h5: px-to-ratio($si-font-size-h5,
|
|
55
|
+
$si-line-height-h5: px-to-ratio($si-font-size-h5, 20px);
|
|
55
56
|
$si-font-weight-h5: $si-font-weight-semibold;
|
|
56
57
|
|
|
57
58
|
$si-font-size-h5-bold: px-to-rem(14px);
|
|
58
|
-
$si-line-height-h5-bold: px-to-ratio($si-font-size-h5-bold,
|
|
59
|
+
$si-line-height-h5-bold: px-to-ratio($si-font-size-h5-bold, 20px);
|
|
59
60
|
$si-font-weight-h5-bold: $si-font-weight-bold;
|
|
60
61
|
|
|
62
|
+
$si-font-size-h6: px-to-rem(12px);
|
|
63
|
+
$si-line-height-h6: px-to-ratio($si-font-size-h6, 16px);
|
|
64
|
+
$si-font-weight-h6: $si-font-weight-semibold;
|
|
65
|
+
|
|
61
66
|
$si-font-size-body-lg: px-to-rem(16px);
|
|
62
67
|
$si-line-height-body-lg: px-to-ratio($si-font-size-body-lg, 20px);
|
|
63
68
|
$si-font-weight-body-lg: $si-font-weight-normal;
|
|
64
69
|
|
|
70
|
+
$si-font-size-body-lg-bold: px-to-rem(16px);
|
|
71
|
+
$si-line-height-body-lg-bold: px-to-ratio($si-font-size-body-lg-bold, 20px);
|
|
72
|
+
$si-font-weight-body-lg-bold: $si-font-weight-semibold;
|
|
73
|
+
|
|
65
74
|
$si-font-size-body: px-to-rem(14px);
|
|
66
75
|
$si-line-height-body: px-to-ratio($si-font-size-body, 16px);
|
|
67
76
|
$si-line-height-body-rem: px-to-rem(16px);
|
|
68
77
|
$si-font-weight-body: $si-font-weight-normal;
|
|
69
78
|
|
|
70
|
-
$si-font-size-
|
|
71
|
-
$si-line-height-
|
|
79
|
+
$si-font-size-body-paragraph: px-to-rem(14px);
|
|
80
|
+
$si-line-height-body-paragraph: px-to-ratio($si-font-size-body-paragraph, 20px);
|
|
81
|
+
$si-font-weight-body-paragraph: $si-font-weight-normal;
|
|
82
|
+
|
|
83
|
+
$si-font-size-body-sm: px-to-rem(12px);
|
|
84
|
+
$si-line-height-body-sm: px-to-ratio($si-font-size-body-sm, 16px);
|
|
85
|
+
$si-font-weight-body-sm: $si-font-weight-normal;
|
|
86
|
+
|
|
87
|
+
$si-font-size-caption: $si-font-size-body-sm;
|
|
88
|
+
$si-line-height-caption: $si-line-height-body-sm;
|
|
72
89
|
$si-font-weight-caption: $si-font-weight-normal;
|
|
73
90
|
|
|
74
|
-
$si-font-size-display-
|
|
75
|
-
$si-line-height-display-
|
|
91
|
+
$si-font-size-display-xxl: px-to-rem(58px);
|
|
92
|
+
$si-line-height-display-xxl: px-to-ratio($si-font-size-display-xxl, 72px);
|
|
93
|
+
$si-font-weight-display-xxl: $si-font-weight-normal;
|
|
94
|
+
|
|
95
|
+
$si-font-size-display-xl: px-to-rem(48px);
|
|
96
|
+
$si-line-height-display-xl: px-to-ratio($si-font-size-display-xl, 64px);
|
|
76
97
|
$si-font-weight-display-xl: $si-font-weight-normal;
|
|
77
98
|
|
|
78
|
-
$si-font-size-display-lg: px-to-rem(
|
|
79
|
-
$si-line-height-display-lg: px-to-ratio($si-font-size-display-lg,
|
|
99
|
+
$si-font-size-display-lg: px-to-rem(40px);
|
|
100
|
+
$si-line-height-display-lg: px-to-ratio($si-font-size-display-lg, 52px);
|
|
80
101
|
$si-font-weight-display-lg: $si-font-weight-normal;
|
|
81
102
|
|
|
82
|
-
$si-font-size-display-bold:
|
|
83
|
-
$si-line-height-display-bold:
|
|
103
|
+
$si-font-size-display-bold: $si-font-size-display-lg;
|
|
104
|
+
$si-line-height-display-bold: $si-line-height-display-lg;
|
|
84
105
|
$si-font-weight-display-bold: $si-font-weight-bold;
|
|
85
106
|
|
|
86
|
-
$si-font-size-display: px-to-rem(
|
|
87
|
-
$si-line-height-display: px-to-ratio($si-font-size-display,
|
|
107
|
+
$si-font-size-display: px-to-rem(32px);
|
|
108
|
+
$si-line-height-display: px-to-ratio($si-font-size-display, 40px);
|
|
88
109
|
$si-font-weight-display: $si-font-weight-normal;
|
|
110
|
+
|
|
111
|
+
$si-font-size-code-sm: px-to-rem(12px);
|
|
112
|
+
$si-line-height-code-sm: px-to-ratio($si-font-size-code-sm, 16px);
|
|
113
|
+
$si-font-weight-code-sm: $si-font-weight-normal;
|
|
114
|
+
|
|
115
|
+
$si-font-size-code: px-to-rem(14px);
|
|
116
|
+
$si-line-height-code: px-to-ratio($si-font-size-code, 20px);
|
|
117
|
+
$si-font-weight-code: $si-font-weight-normal;
|
|
118
|
+
|
|
119
|
+
$si-font-size-code-lg: px-to-rem(16px);
|
|
120
|
+
$si-line-height-code-lg: px-to-ratio($si-font-size-code-lg, 20px);
|
|
121
|
+
$si-font-weight-code-lg: $si-font-weight-normal;
|
|
122
|
+
|
|
123
|
+
$si-letter-spacing-normal: 0;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Uses :host selector to apply styles to the shadow DOM root element.
|
|
3
|
+
*
|
|
4
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM
|
|
5
|
+
**/
|
|
6
|
+
$element-theme-default: null !default;
|
|
7
|
+
$element-themes: null !default;
|
|
8
|
+
|
|
9
|
+
@use 'styles/reboot-shadow-dom';
|
|
10
|
+
|
|
11
|
+
@use 'theme' with (
|
|
12
|
+
$element-theme-default: $element-theme-default,
|
|
13
|
+
$element-themes: $element-themes,
|
|
14
|
+
$element-theme-root-selector: ':host',
|
|
15
|
+
$element-theme-document-selector: ':host',
|
|
16
|
+
$element-theme-body-selector: ':host'
|
|
17
|
+
);
|
package/src/theme.scss
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
$element-theme-default: null !default;
|
|
2
2
|
$element-themes: null !default;
|
|
3
|
+
$element-theme-root-selector: ':root' !default;
|
|
4
|
+
$element-theme-document-selector: 'html' !default;
|
|
5
|
+
$element-theme-body-selector: 'body' !default;
|
|
3
6
|
|
|
4
7
|
// Defines the default root font size. Change to 'none' at some point.
|
|
5
8
|
$element-root-font-size: 16px !default;
|
|
@@ -7,6 +10,11 @@ $element-root-font-size: 16px !default;
|
|
|
7
10
|
$_theme-default: 'element';
|
|
8
11
|
$_themes: () !default;
|
|
9
12
|
|
|
13
|
+
@use 'styles/selectors' with (
|
|
14
|
+
$root: $element-theme-root-selector,
|
|
15
|
+
$document: $element-theme-document-selector,
|
|
16
|
+
$body: $element-theme-body-selector
|
|
17
|
+
);
|
|
10
18
|
@use 'styles/root-font-size' with (
|
|
11
19
|
$element-root-font-size: $element-root-font-size
|
|
12
20
|
);
|
|
@@ -41,11 +49,11 @@ $_themes: () !default;
|
|
|
41
49
|
@use 'styles/themes';
|
|
42
50
|
@use 'theme/theme-element';
|
|
43
51
|
|
|
44
|
-
@include themes.configure($element-theme-default, $element-themes);
|
|
52
|
+
@include themes.configure($element-theme-default, $element-themes, $element-theme-root-selector);
|
|
45
53
|
@include themes.make-theme(theme-element.$theme-element-light, 'element');
|
|
46
54
|
@include themes.make-theme(theme-element.$theme-element-dark, 'element', true);
|
|
47
55
|
|
|
48
|
-
|
|
49
|
-
body {
|
|
56
|
+
#{selectors.$document},
|
|
57
|
+
#{selectors.$body} {
|
|
50
58
|
block-size: 100%;
|
|
51
59
|
}
|