@siemens/element-theme 51.0.0-rc.6 → 51.0.0-rc.8
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/_density.scss +144 -0
- 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/_utilities.scss +5 -0
- package/src/styles/_variables.scss +1 -0
- package/src/styles/bootstrap/_badges.scss +3 -3
- package/src/styles/bootstrap/_button-group.scss +3 -3
- package/src/styles/bootstrap/_buttons.scss +2 -3
- package/src/styles/bootstrap/_card.scss +18 -11
- package/src/styles/bootstrap/_dropdowns.scss +12 -12
- package/src/styles/bootstrap/_images.scss +2 -1
- package/src/styles/bootstrap/_modals.scss +8 -8
- package/src/styles/bootstrap/_nav.scss +10 -1
- package/src/styles/bootstrap/_pagination.scss +3 -3
- package/src/styles/bootstrap/_popovers.scss +1 -1
- package/src/styles/bootstrap/_reboot.scss +9 -3
- package/src/styles/bootstrap/_root.scss +2 -1
- package/src/styles/bootstrap/_tables.scss +8 -6
- package/src/styles/bootstrap/_type.scss +129 -3
- package/src/styles/bootstrap/_utilities.scss +40 -45
- package/src/styles/bootstrap/_variables.scss +63 -58
- package/src/styles/bootstrap/forms/_form-check.scss +13 -11
- package/src/styles/bootstrap/forms/_form-control.scss +19 -13
- package/src/styles/bootstrap/forms/_form-file.scss +2 -2
- package/src/styles/bootstrap/forms/_form-label.scss +1 -1
- package/src/styles/bootstrap/forms/_form-layout.scss +36 -0
- package/src/styles/bootstrap/forms/_validation.scss +2 -2
- package/src/styles/bootstrap/mixins/_badge-text.scss +2 -2
- package/src/styles/bootstrap/mixins/_form-layout.scss +7 -5
- package/src/styles/bootstrap/mixins/_grid.scss +3 -3
- package/src/styles/bootstrap/mixins/_utilities.scss +14 -3
- package/src/styles/components/_application-header.scss +8 -8
- package/src/styles/components/_datatable.scss +38 -27
- package/src/styles/components/_drag_drop.scss +2 -1
- package/src/styles/components/_layout.scss +12 -12
- package/src/styles/components/_list-item.scss +47 -17
- package/src/styles/components/_markdown.scss +8 -8
- package/src/styles/components/_pills.scss +3 -3
- package/src/styles/components/_scrollbar.scss +2 -1
- package/src/styles/components/_search-bar.scss +67 -0
- package/src/styles/components/_switch.scss +4 -4
- package/src/styles/components/_widgets.scss +9 -7
- package/src/styles/mixins/_utilities.scss +259 -0
- package/src/styles/variables/_si-vars.scss +13 -7
- package/src/styles/variables/_sizing.scss +22 -0
- package/src/styles/variables/_spacers.scss +53 -25
- package/src/styles/variables/_typography.scss +108 -40
- package/src/styles/variables/_utilities.scss +56 -51
- package/src/theme-shadow-dom.scss +17 -0
- package/src/theme.scss +14 -3
|
@@ -104,13 +104,15 @@ $container-max-widths: (
|
|
|
104
104
|
// Set the number of columns and specify the width of the gutters.
|
|
105
105
|
|
|
106
106
|
$grid-columns: 12 !default;
|
|
107
|
-
$grid-gutter-width: spacers.$
|
|
107
|
+
$grid-gutter-width: map.get(spacers.$spacers-inline, 6) !default;
|
|
108
108
|
$grid-row-columns: 6 !default;
|
|
109
|
-
$gutters: spacers.$spacers !default;
|
|
109
|
+
$gutters-inline: spacers.$spacers-inline !default;
|
|
110
|
+
$gutters-block: spacers.$spacers-block !default;
|
|
111
|
+
$gutters: $gutters-block !default;
|
|
110
112
|
|
|
111
113
|
// Container padding
|
|
112
114
|
|
|
113
|
-
$container-padding-x: $grid-gutter-width * 0.5 !default;
|
|
115
|
+
$container-padding-x: calc(#{$grid-gutter-width} * 0.5) !default;
|
|
114
116
|
|
|
115
117
|
// Components
|
|
116
118
|
//
|
|
@@ -155,8 +157,7 @@ $aspect-ratios: (
|
|
|
155
157
|
//
|
|
156
158
|
// Font, line-height, and color for body text, headings, and more.
|
|
157
159
|
$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;
|
|
160
|
+
$font-family-monospace: typography.$si-font-family-mono !default;
|
|
160
161
|
|
|
161
162
|
$font-family-base: $font-family-sans-serif !default;
|
|
162
163
|
$font-family-code: $font-family-monospace !default;
|
|
@@ -170,7 +171,7 @@ $font-weight-lighter: typography.$si-font-weight-lighter;
|
|
|
170
171
|
$font-weight-light: typography.$si-font-weight-light;
|
|
171
172
|
$font-weight-normal: typography.$si-font-weight-normal;
|
|
172
173
|
$font-weight-medium: typography.$si-font-weight-medium;
|
|
173
|
-
$font-weight-semibold: typography.$si-font-weight-
|
|
174
|
+
$font-weight-semibold: typography.$si-font-weight-sbold;
|
|
174
175
|
$font-weight-bold: typography.$si-font-weight-bold;
|
|
175
176
|
$font-weight-bolder: typography.$si-font-weight-bolder;
|
|
176
177
|
|
|
@@ -185,7 +186,7 @@ $h2-font-size: typography.$si-font-size-h2 !default;
|
|
|
185
186
|
$h3-font-size: typography.$si-font-size-h3 !default;
|
|
186
187
|
$h4-font-size: typography.$si-font-size-h4 !default;
|
|
187
188
|
$h5-font-size: typography.$si-font-size-h5 !default;
|
|
188
|
-
$h6-font-size:
|
|
189
|
+
$h6-font-size: typography.$si-font-size-h6 !default;
|
|
189
190
|
|
|
190
191
|
$font-sizes: (
|
|
191
192
|
1: $h1-font-size,
|
|
@@ -196,10 +197,10 @@ $font-sizes: (
|
|
|
196
197
|
6: $h6-font-size
|
|
197
198
|
) !default;
|
|
198
199
|
|
|
199
|
-
$headings-margin-bottom: spacers.$
|
|
200
|
+
$headings-margin-bottom: map.get(spacers.$spacers-block, 4) !default;
|
|
200
201
|
$headings-font-family: null !default;
|
|
201
202
|
$headings-font-style: null !default;
|
|
202
|
-
$headings-font-weight: typography.$si-font-weight-
|
|
203
|
+
$headings-font-weight: typography.$si-font-weight-sbold !default;
|
|
203
204
|
$headings-line-height: 1.2 !default;
|
|
204
205
|
$headings-color: system-tokens.$si-sys-text-primary !default;
|
|
205
206
|
|
|
@@ -213,14 +214,14 @@ $sub-sup-font-size: 0.75em !default;
|
|
|
213
214
|
|
|
214
215
|
$initialism-font-size: $small-font-size !default;
|
|
215
216
|
|
|
216
|
-
$text-
|
|
217
|
+
$text-disabled: system-tokens.$si-sys-text-disabled !default;
|
|
217
218
|
|
|
218
|
-
$blockquote-margin-y: spacers.$
|
|
219
|
+
$blockquote-margin-y: map.get(spacers.$spacers-block, 6) !default;
|
|
219
220
|
$blockquote-font-size: typography.$si-font-size-body-lg !default;
|
|
220
221
|
$blockquote-footer-color: system-tokens.$si-sys-text-secondary !default;
|
|
221
222
|
$blockquote-footer-font-size: $small-font-size !default;
|
|
222
223
|
|
|
223
|
-
$hr-margin-y: spacers.$
|
|
224
|
+
$hr-margin-y: map.get(spacers.$spacers-block, 6) !default;
|
|
224
225
|
$hr-color: system-tokens.$si-sys-border-4 !default;
|
|
225
226
|
$hr-height: $border-width !default;
|
|
226
227
|
$hr-opacity: 1 !default;
|
|
@@ -244,10 +245,10 @@ $mark-color: system-tokens.$si-sys-text-on-caution;
|
|
|
244
245
|
//
|
|
245
246
|
// Customizes the `.table` component with basic values, each used across all table variations.
|
|
246
247
|
|
|
247
|
-
$table-cell-padding-y: map.get(spacers.$spacers, 4) !default;
|
|
248
|
-
$table-cell-padding-x: map.get(spacers.$spacers, 4) !default;
|
|
249
|
-
$table-cell-padding-y-sm: map.get(spacers.$spacers, 2) !default;
|
|
250
|
-
$table-cell-padding-x-sm: map.get(spacers.$spacers, 4) !default;
|
|
248
|
+
$table-cell-padding-y: map.get(spacers.$spacers-block, 4) !default;
|
|
249
|
+
$table-cell-padding-x: map.get(spacers.$spacers-inline, 4) !default;
|
|
250
|
+
$table-cell-padding-y-sm: map.get(spacers.$spacers-block, 2) !default;
|
|
251
|
+
$table-cell-padding-x-sm: map.get(spacers.$spacers-inline, 4) !default;
|
|
251
252
|
|
|
252
253
|
$table-cell-vertical-align: top !default;
|
|
253
254
|
|
|
@@ -273,7 +274,7 @@ $table-striped-order: odd !default;
|
|
|
273
274
|
|
|
274
275
|
$table-group-separator-color: currentColor !default;
|
|
275
276
|
|
|
276
|
-
$table-caption-color:
|
|
277
|
+
$table-caption-color: semantic-tokens.$element-text-secondary !default;
|
|
277
278
|
|
|
278
279
|
$table-variants: (
|
|
279
280
|
'success': system-tokens.$si-sys-background-success-subtle,
|
|
@@ -286,14 +287,14 @@ $table-variants: (
|
|
|
286
287
|
//
|
|
287
288
|
// For each of Bootstrap's buttons, define text, background, and border color.
|
|
288
289
|
|
|
289
|
-
$btn-padding-y: map.get(spacers.$spacers, 4);
|
|
290
|
-
$btn-padding-x: map.get(spacers.$spacers, 4);
|
|
290
|
+
$btn-padding-y: map.get(spacers.$spacers-block, 4);
|
|
291
|
+
$btn-padding-x: map.get(spacers.$spacers-inline, 4);
|
|
291
292
|
$btn-font-size: $font-size-base;
|
|
292
293
|
$btn-line-height: $line-height-base;
|
|
293
294
|
$btn-white-space: null !default; // Set to `nowrap` to prevent text wrapping
|
|
294
295
|
|
|
295
|
-
$btn-padding-y-sm: map.get(spacers.$spacers, 2);
|
|
296
|
-
$btn-padding-y-lg: map.get(spacers.$spacers, 5);
|
|
296
|
+
$btn-padding-y-sm: map.get(spacers.$spacers-block, 2);
|
|
297
|
+
$btn-padding-y-lg: map.get(spacers.$spacers-block, 5);
|
|
297
298
|
|
|
298
299
|
$btn-link-color: $link-color !default;
|
|
299
300
|
$btn-link-hover-color: $link-hover-color !default;
|
|
@@ -313,7 +314,7 @@ $btn-transition:
|
|
|
313
314
|
// Forms
|
|
314
315
|
// According to figma it should be 2px + line-height: 16px
|
|
315
316
|
// As overriding line-height is not planned by bootstrap, we use 4px + line-height of 14px
|
|
316
|
-
$form-text-margin-top: map.get(spacers.$spacers, 2);
|
|
317
|
+
$form-text-margin-top: map.get(spacers.$spacers-block, 2);
|
|
317
318
|
$form-text-font-size: $small-font-size !default;
|
|
318
319
|
$form-text-font-style: null !default;
|
|
319
320
|
$form-text-font-weight: null !default;
|
|
@@ -325,14 +326,16 @@ $form-label-font-style: null !default;
|
|
|
325
326
|
$form-label-font-weight: null !default;
|
|
326
327
|
$form-label-color: system-tokens.$si-sys-text-secondary !default;
|
|
327
328
|
|
|
328
|
-
$input-padding-y:
|
|
329
|
-
$input-padding-
|
|
329
|
+
$input-padding-y-full: map.get(spacers.$spacers-block, 4);
|
|
330
|
+
$input-padding-y: calc(map.get(spacers.$spacers-block, 4) - 1px); // 8px including 1px border
|
|
331
|
+
$input-padding-x-full: map.get(spacers.$spacers-inline, 4);
|
|
332
|
+
$input-padding-x: calc(map.get(spacers.$spacers-inline, 4) - 1px); // 8px including 1px border
|
|
330
333
|
$input-font-family: null !default;
|
|
331
334
|
$input-font-size: $font-size-base;
|
|
332
335
|
$input-font-weight: $font-weight-base;
|
|
333
336
|
// Use an explicit rem value instead of a unitless ratio to prevent cross-browser
|
|
334
337
|
// rounding differences (Safari rounds 14 × 1.1428... to 15px, Chrome to 16px). See #2031
|
|
335
|
-
$input-line-height: typography.$si-line-height-body
|
|
338
|
+
$input-line-height: calc(typography.$si-font-size-body * typography.$si-line-height-body);
|
|
336
339
|
|
|
337
340
|
$input-bg: system-tokens.$si-sys-background-1 !default;
|
|
338
341
|
$input-disabled-bg: system-tokens.$si-sys-background-1 !default;
|
|
@@ -356,10 +359,10 @@ $input-plaintext-color: $body-color !default;
|
|
|
356
359
|
|
|
357
360
|
$input-height-border: $input-border-width * 2 !default;
|
|
358
361
|
|
|
359
|
-
$input-height:
|
|
362
|
+
$input-height: calc(1lh + ($input-padding-y-full * 2));
|
|
360
363
|
|
|
361
364
|
// don't derive from $input-height as it generates a nested calc() expression
|
|
362
|
-
$input-height-inner:
|
|
365
|
+
$input-height-inner: calc($input-line-height + ($input-padding-y-full - 1px) * 2) !default;
|
|
363
366
|
// Wrap in parenthesis: `*` binds tighter than `-`, so without them only the border term gets multiplied.
|
|
364
367
|
// DEPRECATED: Calculate it yourself using $input-height-inner
|
|
365
368
|
$input-height-inner-half: calc((#{$input-height-inner}) * 0.5) !default;
|
|
@@ -419,7 +422,7 @@ $form-validation-states: (
|
|
|
419
422
|
// Navs
|
|
420
423
|
|
|
421
424
|
$nav-link-padding-y: 10px;
|
|
422
|
-
$nav-link-padding-x: map.get(spacers.$spacers, 8);
|
|
425
|
+
$nav-link-padding-x: map.get(spacers.$spacers-inline, 8);
|
|
423
426
|
$nav-link-font-size: typography.$si-font-size-h4;
|
|
424
427
|
$nav-link-font-weight: typography.$si-font-weight-h4;
|
|
425
428
|
$nav-link-line-height: typography.$si-line-height-h4;
|
|
@@ -439,8 +442,8 @@ $nav-tabs-link-active-bg: transparent !default;
|
|
|
439
442
|
$badge-font-size: typography.$si-font-size-body;
|
|
440
443
|
$badge-font-weight: typography.$si-font-weight-body;
|
|
441
444
|
$badge-color: system-tokens.$si-sys-text-inverse !default;
|
|
442
|
-
$badge-padding-y: map.get(spacers.$spacers, 1);
|
|
443
|
-
$badge-padding-x: map.get(spacers.$spacers, 4);
|
|
445
|
+
$badge-padding-y: map.get(spacers.$spacers-block, 1);
|
|
446
|
+
$badge-padding-x: map.get(spacers.$spacers-inline, 4);
|
|
444
447
|
$badge-border-radius: 0.75rem;
|
|
445
448
|
$badge-dot-size: 0.625rem;
|
|
446
449
|
$badge-line-height: 1.25rem;
|
|
@@ -451,7 +454,7 @@ $badge-height: calc($badge-line-height + 2 * $badge-padding-y);
|
|
|
451
454
|
// Dropdown menu container and contents.
|
|
452
455
|
$dropdown-min-width: 10rem !default;
|
|
453
456
|
$dropdown-padding-x: 0 !default;
|
|
454
|
-
$dropdown-padding-y: map.get(spacers.$spacers, 4) !default;
|
|
457
|
+
$dropdown-padding-y: map.get(spacers.$spacers-block, 4) !default;
|
|
455
458
|
$dropdown-spacer: 0.125rem !default;
|
|
456
459
|
$dropdown-font-size: $font-size-base !default;
|
|
457
460
|
// this is to have room for icon and badges
|
|
@@ -464,25 +467,25 @@ $dropdown-divider-margin-y: 4px !default;
|
|
|
464
467
|
$dropdown-box-shadow: elevation.$element-elevation-2 !default;
|
|
465
468
|
$dropdown-link-color: system-tokens.$si-sys-text-primary !default;
|
|
466
469
|
$dropdown-link-disabled-color: system-tokens.$si-sys-text-disabled !default;
|
|
467
|
-
$dropdown-item-padding-y: map.get(spacers.$spacers, 2);
|
|
468
|
-
$dropdown-item-padding-x: map.get(spacers.$spacers, 5);
|
|
470
|
+
$dropdown-item-padding-y: map.get(spacers.$spacers-block, 2);
|
|
471
|
+
$dropdown-item-padding-x: map.get(spacers.$spacers-inline, 5);
|
|
469
472
|
$dropdown-header-color: system-tokens.$si-sys-text-primary !default;
|
|
470
473
|
|
|
471
474
|
// Cards
|
|
472
475
|
|
|
473
|
-
$card-spacer-y: map.get(spacers.$spacers, 6) !default;
|
|
474
|
-
$card-spacer-x: map.get(spacers.$spacers, 6) !default;
|
|
475
|
-
$card-title-spacer-y: map.get(spacers.$spacers, 5) !default;
|
|
476
|
+
$card-spacer-y: map.get(spacers.$spacers-block, 6) !default;
|
|
477
|
+
$card-spacer-x: map.get(spacers.$spacers-inline, 6) !default;
|
|
478
|
+
$card-title-spacer-y: map.get(spacers.$spacers-block, 5) !default;
|
|
476
479
|
$card-border-radius: $border-radius !default;
|
|
477
480
|
$card-inner-border-radius: $card-border-radius;
|
|
478
|
-
$card-cap-padding-y: map.get(spacers.$spacers, 5) !default;
|
|
481
|
+
$card-cap-padding-y: map.get(spacers.$spacers-block, 5) !default;
|
|
479
482
|
$card-cap-padding-x: $card-spacer-x !default;
|
|
480
483
|
$card-cap-bg: system-tokens.$si-sys-background-1 !default;
|
|
481
484
|
$card-cap-color: null !default;
|
|
482
485
|
$card-height: null !default;
|
|
483
486
|
$card-color: null !default;
|
|
484
487
|
$card-bg: system-tokens.$si-sys-background-1 !default;
|
|
485
|
-
$card-img-overlay-padding: spacers.$
|
|
488
|
+
$card-img-overlay-padding: map.get(spacers.$spacers-block, 6) map.get(spacers.$spacers-inline, 6) !default;
|
|
486
489
|
$card-group-margin: $grid-gutter-width !default;
|
|
487
490
|
|
|
488
491
|
// Tooltips
|
|
@@ -493,8 +496,8 @@ $tooltip-color: system-tokens.$si-sys-text-inverse !default;
|
|
|
493
496
|
$tooltip-bg: system-tokens.$si-sys-background-inverse !default;
|
|
494
497
|
$tooltip-border-radius: semantic-tokens.$element-radius-2 !default;
|
|
495
498
|
$tooltip-opacity: 0.9 !default;
|
|
496
|
-
$tooltip-padding-y: map.get(spacers.$spacers, 4) !default;
|
|
497
|
-
$tooltip-padding-x: map.get(spacers.$spacers, 6) !default;
|
|
499
|
+
$tooltip-padding-y: map.get(spacers.$spacers-block, 4) !default;
|
|
500
|
+
$tooltip-padding-x: map.get(spacers.$spacers-inline, 6) !default;
|
|
498
501
|
$tooltip-margin: 0 !default;
|
|
499
502
|
|
|
500
503
|
$tooltip-arrow-width: 12px !default;
|
|
@@ -517,8 +520,8 @@ $popover-box-shadow: $box-shadow !default;
|
|
|
517
520
|
|
|
518
521
|
$popover-header-bg: system-tokens.$si-sys-background-3 !default;
|
|
519
522
|
$popover-header-color: system-tokens.$si-sys-text-accent;
|
|
520
|
-
$popover-header-padding-y: map.get(spacers.$spacers, 5) !default;
|
|
521
|
-
$popover-header-padding-x: map.get(spacers.$spacers, 5) !default;
|
|
523
|
+
$popover-header-padding-y: map.get(spacers.$spacers-block, 5) !default;
|
|
524
|
+
$popover-header-padding-x: map.get(spacers.$spacers-inline, 5) !default;
|
|
522
525
|
|
|
523
526
|
$popover-body-color: system-tokens.$si-sys-text-primary !default;
|
|
524
527
|
$popover-body-padding-y: $popover-header-padding-y !default;
|
|
@@ -533,13 +536,13 @@ $popover-arrow-outer-color: $popover-border-color !default;
|
|
|
533
536
|
// Modals
|
|
534
537
|
|
|
535
538
|
// Padding applied to the modal body
|
|
536
|
-
$modal-inner-padding: map.get(spacers.$spacers, 8);
|
|
539
|
+
$modal-inner-padding: map.get(spacers.$spacers-block, 8);
|
|
537
540
|
|
|
538
541
|
// Margin between elements in footer, must be lower than or equal to 2 * $modal-inner-padding
|
|
539
|
-
$modal-footer-margin-between: map.get(spacers.$spacers, 6);
|
|
542
|
+
$modal-footer-margin-between: map.get(spacers.$spacers-block, 6);
|
|
540
543
|
|
|
541
|
-
$modal-dialog-margin: map.get(spacers.$spacers, 4);
|
|
542
|
-
$modal-dialog-margin-y-sm-up: map.get(spacers.$spacers, 9);
|
|
544
|
+
$modal-dialog-margin: map.get(spacers.$spacers-block, 4);
|
|
545
|
+
$modal-dialog-margin-y-sm-up: map.get(spacers.$spacers-block, 9);
|
|
543
546
|
|
|
544
547
|
$modal-title-line-height: typography.$si-line-height-h4 !default;
|
|
545
548
|
|
|
@@ -560,8 +563,8 @@ $modal-header-border-color: $border-color !default;
|
|
|
560
563
|
$modal-footer-border-color: $modal-header-border-color !default;
|
|
561
564
|
$modal-header-border-width: 0 !default;
|
|
562
565
|
$modal-footer-border-width: 0 !default;
|
|
563
|
-
$modal-header-padding-y: map.get(spacers.$spacers, 5);
|
|
564
|
-
$modal-header-padding-x: map.get(spacers.$spacers, 8);
|
|
566
|
+
$modal-header-padding-y: map.get(spacers.$spacers-block, 5);
|
|
567
|
+
$modal-header-padding-x: map.get(spacers.$spacers-inline, 8);
|
|
565
568
|
|
|
566
569
|
$modal-sm: 300px !default;
|
|
567
570
|
$modal-md: 500px !default;
|
|
@@ -578,17 +581,19 @@ $modal-scale-transform: scale(1.02) !default;
|
|
|
578
581
|
// Define alert colors, border radius, and padding.
|
|
579
582
|
|
|
580
583
|
$alert-padding-y: 10px !default;
|
|
581
|
-
$alert-padding-x: map.get(spacers.$spacers, 5) !default;
|
|
584
|
+
$alert-padding-x: map.get(spacers.$spacers-inline, 5) !default;
|
|
582
585
|
$alert-margin-bottom: 0 !default;
|
|
583
586
|
$alert-border-radius: 0 !default;
|
|
584
587
|
$alert-link-font-weight: $font-weight-bold !default;
|
|
585
588
|
$alert-border-width: 0 !default;
|
|
586
|
-
$alert-dismissible-padding-r:
|
|
589
|
+
$alert-dismissible-padding-r: calc(
|
|
590
|
+
$alert-padding-x * 3
|
|
591
|
+
) !default; // 3x covers width of x plus default padding on either side
|
|
587
592
|
|
|
588
593
|
// Progress bars
|
|
589
594
|
|
|
590
595
|
$progress-height: 0.5rem !default;
|
|
591
|
-
$progress-font-size: $font-size-base * 0.75 !default;
|
|
596
|
+
$progress-font-size: calc(#{$font-size-base} * 0.75) !default;
|
|
592
597
|
$progress-bg: system-tokens.$si-sys-border-4 !default;
|
|
593
598
|
$progress-border-radius: $progress-height * 0.5 !default;
|
|
594
599
|
$progress-box-shadow: none !default;
|
|
@@ -605,8 +610,8 @@ $list-group-border-color: $border-color !default;
|
|
|
605
610
|
$list-group-border-width: $border-width !default;
|
|
606
611
|
$list-group-border-radius: $border-radius !default;
|
|
607
612
|
|
|
608
|
-
$list-group-item-padding-y: map.get(spacers.$spacers, 4) !default;
|
|
609
|
-
$list-group-item-padding-x: map.get(spacers.$spacers, 6) !default; // 1.25rem !default;
|
|
613
|
+
$list-group-item-padding-y: map.get(spacers.$spacers-block, 4) !default;
|
|
614
|
+
$list-group-item-padding-x: map.get(spacers.$spacers-inline, 6) !default; // 1.25rem !default;
|
|
610
615
|
|
|
611
616
|
$list-group-hover-bg: system-tokens.$si-sys-background-hover !default;
|
|
612
617
|
$list-group-active-color: $body-color !default;
|
|
@@ -641,7 +646,7 @@ $figure-caption-color: system-tokens.$si-sys-text-secondary !default;
|
|
|
641
646
|
$breadcrumb-font-size: null !default;
|
|
642
647
|
$breadcrumb-padding-y: 0;
|
|
643
648
|
$breadcrumb-padding-x: 0;
|
|
644
|
-
$breadcrumb-item-padding-x: map.get(spacers.$spacers, 5);
|
|
649
|
+
$breadcrumb-item-padding-x: map.get(spacers.$spacers-inline, 5);
|
|
645
650
|
$breadcrumb-margin-bottom: 0;
|
|
646
651
|
$breadcrumb-bg: inherit !default;
|
|
647
652
|
$breadcrumb-divider-color: system-tokens.$si-sys-text-secondary !default;
|
|
@@ -656,8 +661,8 @@ $code-font-size: typography.$si-font-size-body !default;
|
|
|
656
661
|
$code-line-height: typography.$si-line-height-body !default;
|
|
657
662
|
$code-color: system-tokens.$si-sys-text-primary !default;
|
|
658
663
|
$code-background: system-tokens.$si-sys-background-selected !default;
|
|
659
|
-
$code-padding-y: map.get(spacers.$spacers, 1) !default;
|
|
660
|
-
$code-padding-x: map.get(spacers.$spacers, 2) !default;
|
|
664
|
+
$code-padding-y: map.get(spacers.$spacers-block, 1) !default;
|
|
665
|
+
$code-padding-x: map.get(spacers.$spacers-inline, 2) !default;
|
|
661
666
|
$code-border-radius: semantic-tokens.$element-radius-1 !default;
|
|
662
667
|
|
|
663
668
|
$kbd-padding-y: 0.2rem !default;
|
|
@@ -668,8 +673,8 @@ $kbd-bg: system-tokens.$si-sys-background-3 !default;
|
|
|
668
673
|
$kbd-font-size: $code-font-size !default;
|
|
669
674
|
|
|
670
675
|
$pre-color: system-tokens.$si-sys-text-primary !default;
|
|
671
|
-
$pre-padding-y: map.get(spacers.$spacers, 4) !default;
|
|
672
|
-
$pre-padding-x: map.get(spacers.$spacers, 4) !default;
|
|
676
|
+
$pre-padding-y: map.get(spacers.$spacers-block, 4) !default;
|
|
677
|
+
$pre-padding-x: map.get(spacers.$spacers-inline, 4) !default;
|
|
673
678
|
$pre-border-color: system-tokens.$si-sys-border-4 !default;
|
|
674
679
|
$pre-border-width: $border-width !default;
|
|
675
680
|
$pre-border-radius: semantic-tokens.$element-radius-1 !default;
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
// there's too many differences between what BS5 does and what the design system expects
|
|
10
10
|
@use 'sass:map';
|
|
11
11
|
|
|
12
|
-
$form-check-size: 1rem;
|
|
13
|
-
$form-radio-size: 1rem;
|
|
14
|
-
$form-radio-inner-size: 0.375rem;
|
|
12
|
+
$form-check-size: max(1rem, 16px); // FIXME: ref value
|
|
13
|
+
$form-radio-size: max(1rem, 16px); // FIXME: ref value
|
|
14
|
+
$form-radio-inner-size: max(0.375rem, 6px); // FIXME: ref value
|
|
15
15
|
$form-radio-offset: calc((#{$form-radio-size} - #{$form-radio-inner-size}) * 0.5 - 1px);
|
|
16
|
-
$form-check-padding-x: map.get(spacers.$spacers, 2);
|
|
16
|
+
$form-check-padding-x: map.get(spacers.$spacers-inline, 2);
|
|
17
17
|
|
|
18
|
-
$form-check-label-start: calc($form-check-size + map.get(spacers.$spacers, 4));
|
|
18
|
+
$form-check-label-start: calc($form-check-size + map.get(spacers.$spacers-inline, 4));
|
|
19
19
|
|
|
20
20
|
%form-check-spacing {
|
|
21
21
|
.form-check-input {
|
|
@@ -24,8 +24,9 @@ $form-check-label-start: calc($form-check-size + map.get(spacers.$spacers, 4));
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.form-check {
|
|
27
|
-
padding-block: map.get(spacers.$spacers, 1);
|
|
28
|
-
padding-inline-start: calc($form-check-size + map.get(spacers.$spacers, 4));
|
|
27
|
+
padding-block: map.get(spacers.$spacers-block, 1);
|
|
28
|
+
padding-inline-start: calc($form-check-size + map.get(spacers.$spacers-inline, 4));
|
|
29
|
+
margin-block-end: map.get(spacers.$spacers-block, 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
|
}
|
|
@@ -107,11 +109,11 @@ $form-check-label-start: calc($form-check-size + map.get(spacers.$spacers, 4));
|
|
|
107
109
|
&:indeterminate {
|
|
108
110
|
&::after {
|
|
109
111
|
mask-image: none;
|
|
110
|
-
inline-size: 0.
|
|
111
|
-
block-size: 0.
|
|
112
|
+
inline-size: calc($form-check-size * 0.625);
|
|
113
|
+
block-size: calc($form-check-size * 0.125);
|
|
112
114
|
opacity: 1;
|
|
113
|
-
inset-inline-start: 0.
|
|
114
|
-
inset-block-start: 0.
|
|
115
|
+
inset-inline-start: calc($form-check-size * 0.125);
|
|
116
|
+
inset-block-start: calc($form-check-size * 0.375);
|
|
115
117
|
}
|
|
116
118
|
}
|
|
117
119
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use '../../variables/focus';
|
|
2
2
|
@use '../../variables/system-tokens';
|
|
3
3
|
@use '../../variables/spacers';
|
|
4
|
+
@use '../../variables/sizing';
|
|
4
5
|
@use '../../variables/utilities';
|
|
5
6
|
@use '../../variables/si-vars';
|
|
6
7
|
@use '../variables';
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
// + 3px (min padding between input and first action or validation icon)
|
|
17
18
|
--si-input-padding-inline-end: calc(
|
|
18
19
|
var(--si-feedback-icon-size, 0px) + var(--si-action-icon-offset, 0px) +
|
|
19
|
-
#{map.get(spacers.$spacers, 2) - variables.$input-border-width}
|
|
20
|
+
#{map.get(spacers.$spacers-block, 2)} - #{variables.$input-border-width}
|
|
20
21
|
);
|
|
21
22
|
display: block;
|
|
22
23
|
inline-size: 100%;
|
|
@@ -40,14 +41,15 @@
|
|
|
40
41
|
calc((#{variables.$input-height-inner} - #{variables.$form-feedback-icon-size}) * 0.5);
|
|
41
42
|
background-position-x: right
|
|
42
43
|
calc(
|
|
43
|
-
|
|
44
|
+
map.get(spacers.$spacers-block, 2) - variables.$input-border-width +
|
|
44
45
|
var(--si-action-icon-offset, 0px)
|
|
45
46
|
);
|
|
46
47
|
|
|
47
48
|
@include utilities.rtl {
|
|
48
49
|
background-position-x: left
|
|
49
50
|
calc(
|
|
50
|
-
map.get(spacers.$spacers, 1) +
|
|
51
|
+
map.get(spacers.$spacers-block, 1) +
|
|
52
|
+
var(--si-action-icon-offset, variables.$input-border-width)
|
|
51
53
|
);
|
|
52
54
|
}
|
|
53
55
|
|
|
@@ -61,7 +63,9 @@
|
|
|
61
63
|
// form-control must not add extra `padding-inline-end` for it.
|
|
62
64
|
&:has(.form-control-actions) {
|
|
63
65
|
background-image: none;
|
|
64
|
-
--si-input-padding-inline-end:
|
|
66
|
+
--si-input-padding-inline-end: calc(
|
|
67
|
+
#{map.get(spacers.$spacers-block, 2)} - #{variables.$input-border-width}
|
|
68
|
+
);
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
&:autofill {
|
|
@@ -117,10 +121,11 @@
|
|
|
117
121
|
.form-control:not(textarea):not(select[multiple]) {
|
|
118
122
|
// force height to fix line-height issue in firefox
|
|
119
123
|
block-size: variables.$input-height;
|
|
124
|
+
min-block-size: map.get(sizing.$sizing, 80);
|
|
120
125
|
}
|
|
121
126
|
|
|
122
127
|
.addon-second-icon {
|
|
123
|
-
--input-addon-inset-end: #{map.get(spacers.$spacers, 9)};
|
|
128
|
+
--input-addon-inset-end: #{map.get(spacers.$spacers-block, 9)};
|
|
124
129
|
}
|
|
125
130
|
|
|
126
131
|
// Wrapper for trailing actions (buttons, icons, unit labels) inside
|
|
@@ -135,7 +140,7 @@
|
|
|
135
140
|
display: inline-flex;
|
|
136
141
|
align-items: center;
|
|
137
142
|
block-size: variables.$input-height-inner;
|
|
138
|
-
padding-inline-start: map.get(spacers.$spacers, 1);
|
|
143
|
+
padding-inline-start: map.get(spacers.$spacers-inline, 1);
|
|
139
144
|
}
|
|
140
145
|
|
|
141
146
|
.form-control .form-control-actions::before {
|
|
@@ -143,13 +148,13 @@
|
|
|
143
148
|
margin-block: auto;
|
|
144
149
|
inline-size: variables.$form-feedback-icon-size;
|
|
145
150
|
block-size: variables.$form-feedback-icon-size;
|
|
146
|
-
padding-inline-end: map.get(spacers.$spacers, 1);
|
|
151
|
+
padding-inline-end: map.get(spacers.$spacers-inline, 1);
|
|
147
152
|
content: var(--si-feedback-icon, none);
|
|
148
153
|
}
|
|
149
154
|
|
|
150
155
|
.form-control + .form-control-actions {
|
|
151
156
|
position: absolute;
|
|
152
|
-
inset-inline-end: map.get(spacers.$spacers, 2);
|
|
157
|
+
inset-inline-end: map.get(spacers.$spacers-inline, 2);
|
|
153
158
|
inset-block-start: variables.$input-border-width;
|
|
154
159
|
z-index: 2;
|
|
155
160
|
}
|
|
@@ -187,15 +192,16 @@ select:is(.form-control, .form-select):not([multiple]) {
|
|
|
187
192
|
// + spacer-1(between arrow and validation)
|
|
188
193
|
right
|
|
189
194
|
calc(
|
|
190
|
-
|
|
191
|
-
map.get(spacers.$spacers, 1)
|
|
195
|
+
map.get(spacers.$spacers-block, 2) - variables.$input-border-width +
|
|
196
|
+
map.get(spacers.$spacers-block, 1) + si-vars.$si-icon-font-size
|
|
192
197
|
)
|
|
193
198
|
center,
|
|
194
|
-
right map.get(spacers.$spacers, 2) - variables.$input-border-width top 50%;
|
|
199
|
+
right calc(map.get(spacers.$spacers-block, 2) - variables.$input-border-width) top 50%;
|
|
195
200
|
background-size: si-vars.$si-icon-font-size, variables.$form-feedback-icon-size;
|
|
196
201
|
|
|
197
202
|
@include utilities.rtl {
|
|
198
|
-
background-position: left
|
|
203
|
+
background-position: left
|
|
204
|
+
calc(map.get(spacers.$spacers-inline, 2) - variables.$input-border-width) top 50%;
|
|
199
205
|
}
|
|
200
206
|
|
|
201
207
|
.app--dark & {
|
|
@@ -211,7 +217,7 @@ select:is(.form-control, .form-select)[multiple] {
|
|
|
211
217
|
padding: 0;
|
|
212
218
|
|
|
213
219
|
option {
|
|
214
|
-
padding: map.get(spacers.$spacers, 4);
|
|
220
|
+
padding: map.get(spacers.$spacers-block, 4) map.get(spacers.$spacers-inline, 4);
|
|
215
221
|
}
|
|
216
222
|
|
|
217
223
|
option:checked,
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
border-color: inherit;
|
|
17
17
|
border-block-width: 0;
|
|
18
18
|
border-inline-width: 0 1px;
|
|
19
|
-
margin-block:
|
|
20
|
-
margin-inline:
|
|
19
|
+
margin-block: calc(variables.$input-padding-y * -1);
|
|
20
|
+
margin-inline: calc(variables.$input-padding-x * -1) variables.$input-padding-x;
|
|
21
21
|
block-size: inherit;
|
|
22
22
|
padding-inline: variables.$btn-padding-x;
|
|
23
23
|
}
|
|
@@ -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-block, 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-block, 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;
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
display: none;
|
|
64
64
|
inline-size: 100%;
|
|
65
65
|
line-height: typography.$si-line-height-caption;
|
|
66
|
-
margin-block: map.get(spacers.$spacers, 1);
|
|
67
|
-
margin-inline: map.get(spacers.$spacers, 1);
|
|
66
|
+
margin-block: map.get(spacers.$spacers-block, 1);
|
|
67
|
+
margin-inline: map.get(spacers.$spacers-inline, 1);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
@mixin form-validation-state-enh($state, $color, $icon, $text-color) {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
font-size: typography.$si-font-size-caption;
|
|
11
11
|
line-height: 0.875rem;
|
|
12
12
|
padding-block: 0;
|
|
13
|
-
padding-inline: map.get(spacers.$spacers, 2);
|
|
13
|
+
padding-inline: map.get(spacers.$spacers-inline, 2);
|
|
14
14
|
font-family: variables.$font-family-sans-serif;
|
|
15
|
-
font-weight: typography.$si-font-weight-
|
|
15
|
+
font-weight: typography.$si-font-weight-sbold;
|
|
16
16
|
text-align: center;
|
|
17
17
|
}
|
|
@@ -6,18 +6,19 @@ $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;
|
|
12
13
|
flex-direction: row;
|
|
13
14
|
align-items: start;
|
|
14
|
-
column-gap: map.get(spacers.$spacers, 6);
|
|
15
|
+
column-gap: map.get(spacers.$spacers-inline, 6);
|
|
15
16
|
|
|
16
17
|
> .form-label {
|
|
17
18
|
flex: 0 0 var(--si-form-label-width, #{$form-col-layout-label-width});
|
|
18
19
|
max-inline-size: var(--si-form-label-width, #{$form-col-layout-label-width});
|
|
19
20
|
align-self: start;
|
|
20
|
-
padding-block: variables.$input-padding-y
|
|
21
|
+
padding-block: variables.$input-padding-y-full;
|
|
21
22
|
line-height: variables.$input-line-height;
|
|
22
23
|
|
|
23
24
|
&:empty {
|
|
@@ -36,16 +37,17 @@ $form-col-layout-label-width: 16ch !default;
|
|
|
36
37
|
|
|
37
38
|
.form-check-input {
|
|
38
39
|
margin-inline-start: 0;
|
|
39
|
-
margin-inline-end: map.get(spacers.$spacers, 4);
|
|
40
|
+
margin-inline-end: map.get(spacers.$spacers-inline, 4);
|
|
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
|
-
padding-block: map.get(spacers.$spacers, 1) 0 !important; // stylelint-disable-line declaration-no-important
|
|
49
|
+
padding-block: map.get(spacers.$spacers-block, 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
|
}
|
|
@@ -133,15 +133,15 @@
|
|
|
133
133
|
// Gutters
|
|
134
134
|
//
|
|
135
135
|
// Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.
|
|
136
|
-
@each $key, $value in variables.$gutters {
|
|
136
|
+
@each $key, $block-value in variables.$gutters-block {
|
|
137
137
|
.g#{$infix}-#{$key},
|
|
138
138
|
.gx#{$infix}-#{$key} {
|
|
139
|
-
--#{variables.$variable-prefix}gutter-x: #{$
|
|
139
|
+
--#{variables.$variable-prefix}gutter-x: #{map.get(variables.$gutters-inline, $key)};
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
.g#{$infix}-#{$key},
|
|
143
143
|
.gy#{$infix}-#{$key} {
|
|
144
|
-
--#{variables.$variable-prefix}gutter-y: #{$value};
|
|
144
|
+
--#{variables.$variable-prefix}gutter-y: #{$block-value};
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
}
|