@swisspost/design-system-styles 9.0.0-next.2 → 9.0.0-next.21
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 +85 -23
- package/basics.css +1 -1
- package/basics.scss +2 -6
- package/cargo-external.css +7 -0
- package/cargo-external.scss +10 -0
- package/cargo-internal.css +7 -0
- package/cargo-internal.scss +10 -0
- package/cargo-tokens-external.css +1 -0
- package/cargo-tokens-external.scss +8 -0
- package/cargo-tokens-internal.css +1 -0
- package/cargo-tokens-internal.scss +8 -0
- package/components/_form-check.scss +166 -0
- package/components/_index.scss +21 -13
- package/components/appstore-badge.css +1 -0
- package/components/appstore-badge.scss +18 -0
- package/components/avatar.css +1 -0
- package/components/avatar.scss +41 -0
- package/components/badge.css +1 -1
- package/components/badge.scss +8 -2
- package/components/banner.css +1 -0
- package/components/banner.scss +105 -0
- package/components/blockquote.css +1 -0
- package/components/blockquote.scss +46 -0
- package/components/breadcrumb.css +1 -1
- package/components/breadcrumb.scss +4 -24
- package/components/breakpoints.css +1 -0
- package/components/breakpoints.scss +17 -0
- package/components/button-group.css +1 -1
- package/components/button-group.scss +7 -6
- package/components/button.css +1 -1
- package/components/button.scss +41 -228
- package/components/card-control.css +1 -1
- package/components/card-control.scss +33 -24
- package/components/card.css +1 -1
- package/components/card.scss +72 -68
- package/components/checkbox.css +1 -0
- package/components/checkbox.scss +127 -0
- package/components/chip.css +1 -1
- package/components/chip.scss +9 -8
- package/components/close.css +1 -1
- package/components/close.scss +0 -2
- package/components/datatable.css +1 -3
- package/components/datatable.scss +22 -17
- package/components/datepicker.css +1 -1
- package/components/datepicker.scss +6 -22
- package/components/dialog.css +1 -1
- package/components/dialog.scss +26 -38
- package/components/dropdown.css +1 -1
- package/components/dropdown.scss +9 -6
- package/components/fonts.css +1 -1
- package/components/fonts.scss +7 -45
- package/components/form-footer.css +1 -0
- package/components/form-footer.scss +18 -0
- package/components/form-hint.css +1 -0
- package/components/form-hint.scss +15 -0
- package/components/form-input.css +1 -0
- package/components/form-input.scss +301 -0
- package/components/form-range.css +1 -1
- package/components/form-range.scss +9 -9
- package/components/form-search-input.css +1 -0
- package/components/form-search-input.scss +97 -0
- package/components/form-select.css +1 -1
- package/components/form-select.scss +266 -55
- package/components/form-textarea.css +1 -1
- package/components/form-textarea.scss +172 -9
- package/components/globals/_index.scss +1 -0
- package/components/globals/post-footer.css +1 -0
- package/components/globals/post-footer.scss +113 -0
- package/components/header/_mixins.scss +48 -0
- package/components/header/index.css +1 -0
- package/components/header/index.scss +131 -0
- package/components/icon-button.css +1 -0
- package/components/icon-button.scss +19 -0
- package/components/icon-close-button.css +1 -0
- package/components/icon-close-button.scss +29 -0
- package/components/intranet-header/_icon.scss +1 -1
- package/components/intranet-header/_index.scss +0 -2
- package/components/intranet-header/_language-chooser.scss +3 -2
- package/components/intranet-header/_nav-overflow.scss +2 -2
- package/components/intranet-header/_scaffolding.scss +1 -1
- package/components/intranet-header/_searchbox.scss +1 -1
- package/components/intranet-header/_sidebar.scss +11 -11
- package/components/intranet-header/_top-navigation.scss +1 -1
- package/components/list-check.css +1 -0
- package/components/list-check.scss +79 -0
- package/components/list-group.css +1 -1
- package/components/list-group.scss +72 -127
- package/components/modal.css +2 -2
- package/components/modal.scss +2 -4
- package/components/offcanvas.css +1 -1
- package/components/offcanvas.scss +0 -2
- package/components/pagination.css +1 -1
- package/components/pagination.scss +10 -9
- package/components/popover.css +1 -1
- package/components/popover.scss +0 -2
- package/components/product-card.css +1 -1
- package/components/product-card.scss +11 -5
- package/components/progress.scss +0 -2
- package/components/radio-button.css +1 -0
- package/components/radio-button.scss +125 -0
- package/components/segmented-button.css +3 -0
- package/components/segmented-button.scss +207 -0
- package/components/skiplinks.css +1 -0
- package/components/skiplinks.scss +20 -0
- package/components/spinner.scss +0 -1
- package/components/stepper.css +1 -1
- package/components/stepper.scss +40 -33
- package/components/subnavigation.css +1 -1
- package/components/subnavigation.scss +17 -14
- package/components/switch.css +1 -0
- package/components/switch.scss +212 -0
- package/components/tables.css +1 -1
- package/components/tables.scss +0 -1
- package/components/tabs/_tab-title.scss +16 -55
- package/components/tabs/_tabs-wrapper.scss +3 -13
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.scss +0 -2
- package/components/tag.css +1 -1
- package/components/tag.scss +1 -2
- package/components/teaser.css +1 -0
- package/components/teaser.scss +83 -0
- package/components/text-highlight.css +1 -1
- package/components/timepicker.css +1 -1
- package/components/timepicker.scss +13 -16
- package/components/toast.css +1 -1
- package/components/toast.scss +19 -16
- package/components/tooltip.css +1 -1
- package/components/tooltip.scss +0 -2
- package/components/transitions.scss +0 -2
- package/components/validation.css +1 -0
- package/components/validation.scss +120 -0
- package/elements/_index.scss +7 -1
- package/elements/anchor.css +1 -0
- package/elements/anchor.scss +33 -0
- package/elements/body.css +1 -1
- package/elements/body.scss +5 -1
- package/elements/fieldset-legend.css +1 -1
- package/elements/fieldset-legend.scss +7 -3
- package/elements/heading.css +1 -1
- package/elements/heading.scss +10 -12
- package/elements/list-bullet.css +1 -0
- package/elements/list-bullet.scss +43 -0
- package/elements/list-description.css +1 -0
- package/elements/list-description.scss +5 -0
- package/elements/list-number.css +1 -0
- package/elements/list-number.scss +33 -0
- package/elements/paragraph.css +1 -0
- package/elements/paragraph.scss +17 -0
- package/elements/reset.css +1 -1
- package/elements/reset.scss +16 -7
- package/elements.css +1 -0
- package/elements.scss +1 -0
- package/fonts.css +1 -1
- package/functions/_breakpoint.scss +26 -0
- package/functions/_forms.scss +46 -3
- package/functions/_icons.scss +2 -14
- package/helpers/_index.scss +4 -0
- package/helpers/clearfix.css +1 -0
- package/helpers/clearfix.scss +5 -0
- package/helpers/focus-ring.css +1 -0
- package/helpers/focus-ring.scss +5 -0
- package/helpers/text-truncation.css +1 -0
- package/helpers/text-truncation.scss +5 -0
- package/helpers/visually-hidden.css +1 -0
- package/helpers/visually-hidden.scss +5 -0
- package/index.css +3 -3
- package/index.scss +2 -5
- package/intranet.css +3 -3
- package/intranet.scss +2 -2
- package/layout/_containers.scss +32 -0
- package/layout/_section.scss +133 -0
- package/layout/grid/_index.scss +11 -0
- package/layout/grid/_mixins.scss +104 -0
- package/layout/grid/_variables.scss +2 -0
- package/layout/index.css +1 -0
- package/layout/index.scss +3 -0
- package/mixins/_button.scss +19 -15
- package/mixins/_form-checks.scss +1 -1
- package/mixins/_forms.scss +42 -33
- package/mixins/_icon-button.scss +27 -0
- package/mixins/_icons.scss +22 -32
- package/mixins/_index.scss +3 -2
- package/mixins/_layout.scss +26 -0
- package/mixins/_list.scss +112 -0
- package/mixins/_media.scss +58 -2
- package/mixins/_notification.scss +59 -53
- package/mixins/_utilities.scss +46 -25
- package/package.json +16 -16
- package/palettes/_mixins.scss +74 -0
- package/palettes/_utilities.scss +3 -0
- package/palettes/_variables.scss +2 -0
- package/palettes/cargo-palettes.css +1 -0
- package/palettes/cargo-palettes.scss +3 -0
- package/palettes/post-palettes.css +1 -0
- package/palettes/post-palettes.scss +3 -0
- package/placeholders/_button.scss +3 -6
- package/placeholders/_close.scss +2 -5
- package/placeholders/_schemes.scss +10 -0
- package/post-external.css +3 -3
- package/post-external.scss +7 -1
- package/post-internal.css +3 -3
- package/post-internal.scss +7 -1
- package/post-tokens-external.css +1 -1
- package/post-tokens-external.scss +1 -1
- package/post-tokens-internal.css +1 -1
- package/post-tokens-internal.scss +1 -1
- package/themes/bootstrap/_core.scss +0 -2
- package/themes/bootstrap/_forms.scss +0 -4
- package/themes/bootstrap/_overrides-variables.scss +0 -6
- package/themes/bootstrap/_utilities.scss +45 -1
- package/tokens/_cargo-theme.scss +8 -0
- package/tokens/_helpers.scss +1 -0
- package/tokens/_palettes.scss +9 -0
- package/tokens/_schemes.scss +11 -0
- package/tokens/_utilities_formatted.scss +1 -0
- package/tokens/temp/_channel.scss +4 -3
- package/tokens/temp/_components.scss +594 -503
- package/tokens/temp/_core.scss +49 -37
- package/tokens/temp/_device.scss +210 -239
- package/tokens/temp/_elements.scss +11 -11
- package/tokens/temp/_helpers.scss +13 -0
- package/tokens/temp/_index.scss +6 -4
- package/tokens/temp/_palettes.scss +19 -0
- package/tokens/temp/_scheme.scss +334 -0
- package/tokens/temp/_theme.scss +28 -9
- package/tokens/temp/_utilities-formatted.scss +128 -0
- package/tokens/temp/_utilities.scss +34 -58
- package/tokens/temp/palettes/_cargo-dark.scss +19 -0
- package/tokens/temp/palettes/_cargo-light.scss +19 -0
- package/tokens/temp/palettes/_post-dark.scss +19 -0
- package/tokens/temp/palettes/_post-light.scss +19 -0
- package/utilities/_not-defined.scss +44 -0
- package/utilities/_variables.scss +304 -22
- package/utilities/index.css +1 -0
- package/utilities/{_index.scss → index.scss} +1 -2
- package/variables/_animation.scss +10 -6
- package/variables/_breakpoints.scss +9 -5
- package/variables/_color.scss +0 -61
- package/variables/_commons.scss +1 -0
- package/variables/_elevation.scss +16 -22
- package/variables/_grid.scss +2 -12
- package/variables/_icons.scss +19 -696
- package/variables/_index.scss +1 -1
- package/variables/_sizing.scss +17 -0
- package/variables/_spacing.scss +0 -152
- package/variables/_type.scss +17 -27
- package/variables/components/_accordion.scss +0 -47
- package/variables/components/_badge.scss +9 -5
- package/variables/components/_button.scss +61 -113
- package/variables/components/_card.scss +7 -4
- package/variables/components/_chip.scss +13 -7
- package/variables/components/_close.scss +14 -8
- package/variables/components/_code.scss +1 -1
- package/variables/components/_datatable.scss +12 -8
- package/variables/components/_dropdowns.scss +1 -1
- package/variables/components/_form-check.scss +9 -46
- package/variables/components/_forms.scss +8 -101
- package/variables/components/_index.scss +0 -5
- package/variables/components/_modal.scss +17 -12
- package/variables/components/_nav.scss +3 -3
- package/variables/components/_navbar.scss +7 -4
- package/variables/components/_notification.scss +48 -37
- package/variables/components/_pagination.scss +14 -6
- package/variables/components/_spinners.scss +7 -2
- package/variables/components/_stepper.scss +15 -10
- package/variables/components/_subnavigation.scss +11 -9
- package/variables/components/_tables.scss +11 -6
- package/variables/components/_tag.scss +10 -7
- package/components/accordion.css +0 -1
- package/components/accordion.scss +0 -100
- package/components/alert.css +0 -1
- package/components/alert.scss +0 -137
- package/components/carousel.css +0 -1
- package/components/carousel.scss +0 -178
- package/components/elevation.css +0 -1
- package/components/elevation.scss +0 -8
- package/components/floating-label.css +0 -1
- package/components/floating-label.scss +0 -353
- package/components/form-check.css +0 -1
- package/components/form-check.scss +0 -297
- package/components/form-validation.css +0 -1
- package/components/form-validation.scss +0 -148
- package/components/forms.css +0 -1
- package/components/forms.scss +0 -215
- package/components/grid.css +0 -1
- package/components/grid.scss +0 -170
- package/components/icons.css +0 -1
- package/components/icons.scss +0 -60
- package/components/sizing.css +0 -1
- package/components/sizing.scss +0 -85
- package/components/topic-teaser.css +0 -1
- package/components/topic-teaser.scss +0 -196
- package/layouts/portal/_grid.scss +0 -85
- package/layouts/portal/_index.scss +0 -2
- package/layouts/portal/_subnavigation.scss +0 -5
- package/layouts/portal/_variables.scss +0 -8
- package/mixins/_accordion.scss +0 -16
- package/mixins/_elevation.scss +0 -6
- package/mixins/_focus.scss +0 -9
- package/mixins/_form-validation.scss +0 -5
- package/mixins/_size.scss +0 -65
- package/placeholders/_modes.scss +0 -10
- package/themes/bootstrap/_carousel.scss +0 -2
- package/themes/bootstrap/_containers.scss +0 -2
- package/themes/bootstrap/_grid.scss +0 -2
- package/themes/bootstrap/_overrides-mixins.scss +0 -33
- package/themes/bootstrap/forms/_floating-labels.scss +0 -2
- package/themes/bootstrap/forms/_form-control.scss +0 -2
- package/themes/bootstrap/forms/_form-select.scss +0 -2
- package/themes/bootstrap/forms/_form-text.scss +0 -2
- package/tokens/_modes.scss +0 -11
- package/tokens/temp/_mode.scss +0 -299
- package/utilities/_functions.scss +0 -35
- package/utilities/temp/_legacy.scss +0 -95
- package/variables/_options.scss +0 -5
- package/variables/components/_carousel.scss +0 -27
- package/variables/components/_figures.scss +0 -6
- package/variables/components/_form-select.scss +0 -13
- package/variables/components/_form-validation.scss +0 -38
- package/variables/components/_list-group.scss +0 -29
- package/variables/components/_topic-teaser.scss +0 -32
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@counter-style post-bullet{system:extends disc;suffix:" "}ul{list-style:post-bullet;margin-block:var(--post-device-spacing-padding-block-8);padding-inline-start:calc(var(--post-device-sizing-notification-icon-3) + var(--post-device-spacing-gap-inline-10))}ul>li::marker{line-height:1}ul.list-bullet{list-style:none;margin-block:var(--post-device-spacing-padding-block-8);padding-inline-start:calc(var(--post-device-sizing-notification-icon-3) + var(--post-device-spacing-gap-inline-10))}ul.list-bullet>li{margin:0;padding-inline:0;padding-block:var(--post-device-spacing-padding-block-6)}ul.list-bullet>li~li{margin-block-start:var(--post-device-spacing-gap-1)}ul.list-bullet>li::before{display:block;content:"";box-sizing:content-box;float:inline-start;margin-block-start:calc(var(--post-device-line-height-content)*.5em - var(--post-device-sizing-interactive-button-icon-6)*.5);margin-inline-start:calc(var(--post-device-sizing-notification-icon-3)*-0.5 + var(--post-device-sizing-interactive-button-icon-6)*-0.5 + var(--post-device-spacing-gap-inline-10)*-1);width:var(--post-device-sizing-interactive-button-icon-6);height:var(--post-device-sizing-interactive-button-icon-6);background-color:currentColor;border-radius:50%}ul.list-inline{all:unset;display:block;list-style:none;display:flex;flex-wrap:wrap;row-gap:var(--post-device-spacing-gap-1);column-gap:calc(var(--post-device-spacing-gap-inline-10)*2);margin-block:var(--post-device-spacing-padding-block-8)}ul.list-inline>li{all:unset;display:list-item}ul.list-inline>li~li{all:unset;display:list-item}ul.list-inline>li::before{all:unset}ul.list-revert{all:revert}ul.list-revert>li{all:revert}ul.list-revert>li~li{all:revert}ul.list-revert>li::before{all:revert}ul.list-unstyled{all:unset;display:block;list-style:none}ul.list-unstyled>li{all:unset;display:list-item}ul.list-unstyled>li~li{all:unset;display:list-item}ul.list-unstyled>li::before{all:unset}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@use '../functions/tokens';
|
|
2
|
+
@use '../tokens/elements';
|
|
3
|
+
@use '../mixins/list' as list-mx;
|
|
4
|
+
|
|
5
|
+
tokens.$default-map: elements.$post-listbullet;
|
|
6
|
+
|
|
7
|
+
/* The chars used in suffix are spaces with different widths
|
|
8
|
+
For more information, visit: https://www.fileformat.info/info/unicode/char/search.htm?q=space
|
|
9
|
+
*/
|
|
10
|
+
@counter-style post-bullet {
|
|
11
|
+
system: extends disc;
|
|
12
|
+
suffix: '\2007\2009\200a\200a';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
ul {
|
|
16
|
+
list-style: post-bullet;
|
|
17
|
+
margin-block: tokens.get('list-bullet-margin-block');
|
|
18
|
+
padding-inline-start: calc(
|
|
19
|
+
#{tokens.get('list-bullet-item-icon-size')} + #{tokens.get('list-bullet-item-icon-gap-inline')}
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
> li {
|
|
23
|
+
&::marker {
|
|
24
|
+
line-height: 1;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&.list-bullet {
|
|
29
|
+
@include list-mx.list-bullet();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.list-inline {
|
|
33
|
+
@include list-mx.list-inline();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.list-revert {
|
|
37
|
+
@include list-mx.list-revert();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&.list-unstyled {
|
|
41
|
+
@include list-mx.list-unstyled();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dl dd{margin:0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ol{margin-block:var(--post-device-spacing-gap-1);padding-inline-end:var(--post-device-spacing-gap-1);padding-inline-start:calc(var(--post-device-sizing-notification-icon-3) + var(--post-device-spacing-gap-inline-10))}ol ::marker{font-weight:var(--post-device-font-weight-bold)}ol.list-number{margin-block:var(--post-device-spacing-gap-1);padding-inline-end:var(--post-device-spacing-gap-1);padding-inline-start:calc(var(--post-device-sizing-notification-icon-3) + var(--post-device-spacing-gap-inline-10))}ol.list-number>li{margin-block-end:var(--post-device-spacing-padding-block-8);padding-inline-start:var(--post-device-spacing-gap-inline-10);padding-block:var(--post-device-spacing-padding-block-6)}ol.list-number>li:last-child{margin-block-end:0}ol.list-inline{all:unset;display:block;list-style:none;display:flex;flex-wrap:wrap;row-gap:var(--post-device-spacing-gap-1);column-gap:calc(var(--post-device-spacing-gap-inline-10)*2);margin-block:var(--post-device-spacing-padding-block-8)}ol.list-inline>li{all:unset;display:list-item}ol.list-inline>li~li{all:unset;display:list-item}ol.list-inline>li::before{all:unset}ol.list-revert{all:revert}ol.list-revert>li{all:revert}ol.list-revert>li~li{all:revert}ol.list-revert>li::before{all:revert}ol.list-unstyled{all:unset;display:block;list-style:none}ol.list-unstyled>li{all:unset;display:list-item}ol.list-unstyled>li~li{all:unset;display:list-item}ol.list-unstyled>li::before{all:unset}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@use '../functions/tokens';
|
|
2
|
+
@use '../tokens/elements';
|
|
3
|
+
@use '../mixins/list';
|
|
4
|
+
|
|
5
|
+
tokens.$default-map: elements.$post-listnumber;
|
|
6
|
+
|
|
7
|
+
ol {
|
|
8
|
+
margin-block: tokens.get('list-number-item-gap-block');
|
|
9
|
+
padding-inline-end: tokens.get('list-number-item-gap-block');
|
|
10
|
+
padding-inline-start: calc(
|
|
11
|
+
tokens.get('list-number-item-icon-size') + tokens.get('list-number-item-icon-gap-inline')
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
::marker {
|
|
15
|
+
font-weight: tokens.get('list-number-item-icon-font-weight');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&.list-number {
|
|
19
|
+
@include list.list-number();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.list-inline {
|
|
23
|
+
@include list.list-inline();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.list-revert {
|
|
27
|
+
@include list.list-revert();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.list-unstyled {
|
|
31
|
+
@include list.list-unstyled();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
p{margin-block:var(--post-device-spacing-margin-3)}p:first-child{margin-block-start:0}p:last-child{margin-block-end:0}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../functions/tokens';
|
|
3
|
+
@use '../tokens/elements';
|
|
4
|
+
|
|
5
|
+
tokens.$default-map: elements.$post-paragraph;
|
|
6
|
+
|
|
7
|
+
p {
|
|
8
|
+
margin-block: tokens.get('paragraph-margin-block-start');
|
|
9
|
+
|
|
10
|
+
&:first-child {
|
|
11
|
+
margin-block-start: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&:last-child {
|
|
15
|
+
margin-block-end: 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
package/elements/reset.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
*,*::before,*::after{box-sizing:border-box}
|
|
1
|
+
@supports(interpolate-size: allow-keywords){:root{interpolate-size:allow-keywords}}*,*::before,*::after{box-sizing:border-box}body{-webkit-font-smoothing:antialiased;margin:0}img,picture,video,canvas,svg{display:block;max-width:100%;height:auto}button,input,textarea,select{font:inherit}button:not(:disabled),[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled){cursor:pointer}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word;hyphens:auto}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}code,kbd,samp{font-family:monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{caption-side:bottom;border-collapse:collapse}thead,tbody,tfoot,tr,td,th{border-color:inherit;border-style:solid;border-width:0}fieldset,legend{padding:0}fieldset{border:0}input,select,textarea{margin:0}
|
package/elements/reset.scss
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
// Enable transitions to height: auto and the like
|
|
2
|
+
// https://utilitybend.com/blog/added-to-my-css-reset-interpolate-size-the-quality-of-life-feature-we-all-wanted-at-some-point
|
|
3
|
+
:root {
|
|
4
|
+
@supports (interpolate-size: allow-keywords) {
|
|
5
|
+
interpolate-size: allow-keywords;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
1
9
|
/* === Source: Josh Comeau, https://www.joshwcomeau.com/css/custom-css-reset/ (adapted) === */
|
|
2
10
|
|
|
3
11
|
/*
|
|
@@ -9,13 +17,6 @@
|
|
|
9
17
|
box-sizing: border-box;
|
|
10
18
|
}
|
|
11
19
|
|
|
12
|
-
/*
|
|
13
|
-
Remove default margin
|
|
14
|
-
*/
|
|
15
|
-
* {
|
|
16
|
-
margin: 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
20
|
/*
|
|
20
21
|
Typographic tweaks!
|
|
21
22
|
- Add accessible line-height
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
*/
|
|
24
25
|
body {
|
|
25
26
|
-webkit-font-smoothing: antialiased;
|
|
27
|
+
margin: 0;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
/*
|
|
@@ -35,6 +37,7 @@ canvas,
|
|
|
35
37
|
svg {
|
|
36
38
|
display: block;
|
|
37
39
|
max-width: 100%;
|
|
40
|
+
height: auto;
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
/*
|
|
@@ -152,3 +155,9 @@ legend {
|
|
|
152
155
|
fieldset {
|
|
153
156
|
border: 0;
|
|
154
157
|
}
|
|
158
|
+
|
|
159
|
+
input,
|
|
160
|
+
select,
|
|
161
|
+
textarea {
|
|
162
|
+
margin: 0;
|
|
163
|
+
}
|
package/elements.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@supports(interpolate-size: allow-keywords){:root{interpolate-size:allow-keywords}}*,*::before,*::after{box-sizing:border-box}body{-webkit-font-smoothing:antialiased;margin:0}img,picture,video,canvas,svg{display:block;max-width:100%;height:auto}button,input,textarea,select{font:inherit}button:not(:disabled),[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled){cursor:pointer}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word;hyphens:auto}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}code,kbd,samp{font-family:monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{caption-side:bottom;border-collapse:collapse}thead,tbody,tfoot,tr,td,th{border-color:inherit;border-style:solid;border-width:0}fieldset,legend{padding:0}fieldset{border:0}input,select,textarea{margin:0}@font-face{font-family:"Swiss Post Sans";font-weight:900;font-display:swap;src:url("https://fonts.post.ch/swiss-post-sans/v1/SwissPostSans-Black.woff2") format("woff2")}@font-face{font-family:"Swiss Post Sans";font-weight:700;font-display:swap;src:url("https://fonts.post.ch/swiss-post-sans/v1/SwissPostSans-Bold.woff2") format("woff2")}@font-face{font-family:"Swiss Post Sans";font-weight:400;font-display:swap;src:url("https://fonts.post.ch/swiss-post-sans/v1/SwissPostSans-Regular.woff2") format("woff2")}body{font-family:var(--post-device-font-family-default),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--post-device-font-size-6);font-weight:var(--post-device-font-weight-regular);line-height:var(--post-device-line-height-content);letter-spacing:var(--post-core-letter-spacing-default);font-variant-numeric:proportional-nums;color:var(--post-scheme-color-surface-default-fg);min-height:100vh}a{-webkit-text-decoration:var(--post-core-text-decoration-underline);text-decoration:var(--post-core-text-decoration-underline);border-radius:var(--post-device-border-radius-focus);color:inherit}a:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}a{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){a:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){a:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){a,a:focus{color:LinkText !important}a:hover{text-decoration-thickness:2px}a:visited{color:VisitedText}}@counter-style post-bullet{system:extends disc;suffix:" "}ul{list-style:post-bullet;margin-block:var(--post-device-spacing-padding-block-8);padding-inline-start:calc(var(--post-device-sizing-notification-icon-3) + var(--post-device-spacing-gap-inline-10))}ul>li::marker{line-height:1}ul.list-bullet{list-style:none;margin-block:var(--post-device-spacing-padding-block-8);padding-inline-start:calc(var(--post-device-sizing-notification-icon-3) + var(--post-device-spacing-gap-inline-10))}ul.list-bullet>li{margin:0;padding-inline:0;padding-block:var(--post-device-spacing-padding-block-6)}ul.list-bullet>li~li{margin-block-start:var(--post-device-spacing-gap-1)}ul.list-bullet>li::before{display:block;content:"";box-sizing:content-box;float:inline-start;margin-block-start:calc(var(--post-device-line-height-content)*.5em - var(--post-device-sizing-interactive-button-icon-6)*.5);margin-inline-start:calc(var(--post-device-sizing-notification-icon-3)*-0.5 + var(--post-device-sizing-interactive-button-icon-6)*-0.5 + var(--post-device-spacing-gap-inline-10)*-1);width:var(--post-device-sizing-interactive-button-icon-6);height:var(--post-device-sizing-interactive-button-icon-6);background-color:currentColor;border-radius:50%}ul.list-inline{all:unset;display:block;list-style:none;display:flex;flex-wrap:wrap;row-gap:var(--post-device-spacing-gap-1);column-gap:calc(var(--post-device-spacing-gap-inline-10)*2);margin-block:var(--post-device-spacing-padding-block-8)}ul.list-inline>li{all:unset;display:list-item}ul.list-inline>li~li{all:unset;display:list-item}ul.list-inline>li::before{all:unset}ul.list-revert{all:revert}ul.list-revert>li{all:revert}ul.list-revert>li~li{all:revert}ul.list-revert>li::before{all:revert}ul.list-unstyled{all:unset;display:block;list-style:none}ul.list-unstyled>li{all:unset;display:list-item}ul.list-unstyled>li~li{all:unset;display:list-item}ul.list-unstyled>li::before{all:unset}dl dd{margin:0}ol{margin-block:var(--post-device-spacing-gap-1);padding-inline-end:var(--post-device-spacing-gap-1);padding-inline-start:calc(var(--post-device-sizing-notification-icon-3) + var(--post-device-spacing-gap-inline-10))}ol ::marker{font-weight:var(--post-device-font-weight-bold)}ol.list-number{margin-block:var(--post-device-spacing-gap-1);padding-inline-end:var(--post-device-spacing-gap-1);padding-inline-start:calc(var(--post-device-sizing-notification-icon-3) + var(--post-device-spacing-gap-inline-10))}ol.list-number>li{margin-block-end:var(--post-device-spacing-padding-block-8);padding-inline-start:var(--post-device-spacing-gap-inline-10);padding-block:var(--post-device-spacing-padding-block-6)}ol.list-number>li:last-child{margin-block-end:0}ol.list-inline{all:unset;display:block;list-style:none;display:flex;flex-wrap:wrap;row-gap:var(--post-device-spacing-gap-1);column-gap:calc(var(--post-device-spacing-gap-inline-10)*2);margin-block:var(--post-device-spacing-padding-block-8)}ol.list-inline>li{all:unset;display:list-item}ol.list-inline>li~li{all:unset;display:list-item}ol.list-inline>li::before{all:unset}ol.list-revert{all:revert}ol.list-revert>li{all:revert}ol.list-revert>li~li{all:revert}ol.list-revert>li::before{all:revert}ol.list-unstyled{all:unset;display:block;list-style:none}ol.list-unstyled>li{all:unset;display:list-item}ol.list-unstyled>li~li{all:unset;display:list-item}ol.list-unstyled>li::before{all:unset}p{margin-block:var(--post-device-spacing-margin-3)}p:first-child{margin-block-start:0}p:last-child{margin-block-end:0}legend{margin-bottom:var(--post-core-dimension-16);font-weight:var(--post-device-font-weight-bold);line-height:var(--post-device-line-height-legend);width:100%}legend.large{font-size:var(--post-device-font-size-3);padding-block-start:var(--post-device-spacing-margin-1);padding-block-end:calc(var(--post-device-spacing-padding-17) - var(--post-device-border-width-default));margin-block-end:var(--post-device-spacing-margin-4);border-bottom:var(--post-device-border-width-default) var(--post-scheme-color-surface-default-stroke) var(--post-core-border-style-solid)}:is(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){line-height:var(--post-device-line-height-heading);font-weight:var(--post-device-font-weight-black)}:is(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6):first-child{margin-block-start:0}:is(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6):last-child{margin-block-end:0}h1,.h1{font-size:var(--post-device-font-size-1);margin-block-start:var(--post-device-spacing-margin-1);margin-block-end:var(--post-device-spacing-margin-2)}h2,.h2{font-size:var(--post-device-font-size-2);margin-block-start:var(--post-device-spacing-margin-1);margin-block-end:var(--post-device-spacing-margin-2)}h3,.h3{font-size:var(--post-device-font-size-3);margin-block-start:var(--post-device-spacing-margin-1);margin-block-end:var(--post-device-spacing-margin-3)}h4,.h4{font-size:var(--post-device-font-size-4);margin-block-start:var(--post-device-spacing-margin-1);margin-block-end:var(--post-device-spacing-margin-3)}h5,.h5{font-size:var(--post-device-font-size-5);margin-block-start:var(--post-device-spacing-margin-1);margin-block-end:var(--post-device-spacing-margin-3)}h6,.h6{font-size:var(--post-device-font-size-6);margin-block-start:var(--post-device-spacing-margin-1);margin-block-end:var(--post-device-spacing-margin-3)}
|
package/elements.scss
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use './elements/index';
|
package/fonts.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-
|
|
1
|
+
@font-face{font-family:"Swiss Post Sans";font-weight:900;font-display:swap;src:url("https://fonts.post.ch/swiss-post-sans/v1/SwissPostSans-Black.woff2") format("woff2")}@font-face{font-family:"Swiss Post Sans";font-weight:700;font-display:swap;src:url("https://fonts.post.ch/swiss-post-sans/v1/SwissPostSans-Bold.woff2") format("woff2")}@font-face{font-family:"Swiss Post Sans";font-weight:400;font-display:swap;src:url("https://fonts.post.ch/swiss-post-sans/v1/SwissPostSans-Regular.woff2") format("woff2")}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:list';
|
|
3
|
+
@use '../variables/breakpoints';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
Gets a breakpoint from the map based on the key
|
|
7
|
+
*/
|
|
8
|
+
@function min-width($key) {
|
|
9
|
+
@return map.get(breakpoints.$grid-breakpoints, $key);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
Gets a breakpoint infix
|
|
14
|
+
*/
|
|
15
|
+
@function infix($key) {
|
|
16
|
+
@return if(min-width($key) == 0, '', '-#{$key}');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Gets the next breakpoint key
|
|
21
|
+
*/
|
|
22
|
+
@function next($key) {
|
|
23
|
+
$breakpoint-names: map.keys(breakpoints.$grid-breakpoints);
|
|
24
|
+
$n: list.index($breakpoint-names, $key);
|
|
25
|
+
@return if($n < list.length($breakpoint-names), list.nth($breakpoint-names, $n + 1), null);
|
|
26
|
+
}
|
package/functions/_forms.scss
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@use './color';
|
|
4
|
+
@use '../functions/tokens';
|
|
5
|
+
@use '../functions/icons';
|
|
6
|
+
@use '../functions/utilities';
|
|
7
|
+
@use '../variables/components/forms';
|
|
8
|
+
|
|
1
9
|
// Source: https://kovart.github.io/dashed-border-generator/ + added stroke-vector-effect
|
|
2
10
|
@function get-background-svg-stroke(
|
|
3
11
|
$type,
|
|
@@ -12,11 +20,46 @@
|
|
|
12
20
|
@if ($type == 'circle') {
|
|
13
21
|
$svg-additional-attributes: "rx='100' ry='100'";
|
|
14
22
|
}
|
|
23
|
+
@if ($type == 'switch') {
|
|
24
|
+
$svg-additional-attributes: "rx='12' ry='12'";
|
|
25
|
+
}
|
|
15
26
|
@if ($stroke-pathlength != 'initial') {
|
|
16
27
|
$stroke-pathlength-attribute: " pathLength='" + $stroke-pathlength + "'";
|
|
17
28
|
}
|
|
18
29
|
@return "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' " +
|
|
19
|
-
$svg-additional-attributes + " fill='none' stroke='" + $color + "' stroke-width='" +
|
|
20
|
-
$stroke-width "' stroke-dasharray='" + $stroke-dasharray + "'" + $stroke-pathlength-attribute +
|
|
21
|
-
|
|
30
|
+
$svg-additional-attributes + " fill='none' stroke='" + #{color.encode-uri-color($color)} + "' stroke-width='" +
|
|
31
|
+
$stroke-width "' stroke-dasharray='" + $stroke-dasharray + "'" + $stroke-pathlength-attribute + ' /%3e%3c/svg%3e';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@function select-arrow-icon($state: null, $mode: 'light') {
|
|
35
|
+
// Hardcoded colors because CSS variables cannot be used as fill color of background-image
|
|
36
|
+
$arrow-color-map: (
|
|
37
|
+
'enabled-light': #050400,
|
|
38
|
+
'enabled-dark': #fff,
|
|
39
|
+
'hover-light': #504f4b,
|
|
40
|
+
'hover-dark': #fff,
|
|
41
|
+
'selected-light': #050400,
|
|
42
|
+
'selected-dark': #fff,
|
|
43
|
+
'disabled-light': #696864,
|
|
44
|
+
'disabled-dark': #fff,
|
|
45
|
+
'enabled-hcm-light': #050400,
|
|
46
|
+
'enabled-hcm-dark': #fff,
|
|
47
|
+
'selected-hcm-dark': #fff,
|
|
48
|
+
'hover-hcm-dark': #fff,
|
|
49
|
+
'hover-hcm-light': #050400,
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
@if ($state) {
|
|
53
|
+
$state: url('#{icons.get-colored-svg-url('2052', map.get($arrow-color-map, '#{$state}-#{$mode}'))}');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@return $state;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@function success-icon($color: #107800) {
|
|
60
|
+
@return url('#{icons.get-colored-svg-url('success', $color)}');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@function warning-icon($color: #b20000) {
|
|
64
|
+
@return url('#{icons.get-colored-svg-url('warning', $color)}');
|
|
22
65
|
}
|
package/functions/_icons.scss
CHANGED
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
|
|
62
62
|
@if (map.has-key(icons.$svg-icon-map, #{$icon-name})) {
|
|
63
63
|
$svg-url: map.get(icons.$svg-icon-map, #{$icon-name});
|
|
64
|
-
} @else if(map.has-key(icons.$
|
|
64
|
+
} @else if(map.has-key(icons.$other-icons, #{$icon-name})) {
|
|
65
65
|
$svg-url: icons.$svg-pre-path +
|
|
66
|
-
map.get(icons.$
|
|
66
|
+
map.get(icons.$other-icons, #{$icon-name}) +
|
|
67
67
|
icons.$svg-post-path;
|
|
68
68
|
} @else {
|
|
69
69
|
@error "Icon '#{$icon-name}' does not exist.";
|
|
@@ -75,15 +75,3 @@
|
|
|
75
75
|
@function get-colored-svg-url($icon-name, $color) {
|
|
76
76
|
@return add-fill-color(get-svg-url($icon-name), $color);
|
|
77
77
|
}
|
|
78
|
-
|
|
79
|
-
@function get-pre-colored-svg-url($icon-name) {
|
|
80
|
-
$path-definition: map.get(icons.$svg-pre-colored-icon-map, #{$icon-name});
|
|
81
|
-
|
|
82
|
-
@if (not map.has-key(icons.$svg-pre-colored-icon-map, #{$icon-name})) {
|
|
83
|
-
@error "Icon '#{$icon-name}' does not exist.";
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
$svg-url: icons.$svg-pre-path + $path-definition + icons.$svg-post-path;
|
|
87
|
-
|
|
88
|
-
@return $svg-url;
|
|
89
|
-
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.clearfix::after{content:"";display:block;clear:both}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.focus-ring{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.focus-ring:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.focus-ring:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.focus-ring:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.focus-ring:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.text-truncate{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}
|