@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
package/intranet.scss
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@use '../functions/tokens';
|
|
4
|
+
@use '../mixins/media';
|
|
5
|
+
@use '../tokens/components';
|
|
6
|
+
@use '../variables/breakpoints';
|
|
7
|
+
|
|
8
|
+
tokens.$default-map: components.$post-container;
|
|
9
|
+
|
|
10
|
+
.container,
|
|
11
|
+
.container-fluid {
|
|
12
|
+
width: 100%;
|
|
13
|
+
margin-inline: auto;
|
|
14
|
+
|
|
15
|
+
@each $breakpoint in map.keys(breakpoints.$grid-breakpoints) {
|
|
16
|
+
@include media.min($breakpoint) {
|
|
17
|
+
$gutter: tokens.get('grid-gutter-#{$breakpoint}');
|
|
18
|
+
$padding: tokens.get('grid-padding-#{$breakpoint}');
|
|
19
|
+
|
|
20
|
+
--post-grid-gutter-x: #{$gutter};
|
|
21
|
+
|
|
22
|
+
// The `.row` has a negative margin equal to half the gutter size.
|
|
23
|
+
// To prevent content from overflowing, the container needs to have
|
|
24
|
+
// a padding of at least half the gutter size to offset this negative margin.
|
|
25
|
+
padding-inline: max(#{$padding}, calc(0.5 * var(--post-grid-gutter-x)));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.container {
|
|
31
|
+
max-width: tokens.get('grid-max-width');
|
|
32
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@use '../functions/tokens';
|
|
4
|
+
@use '../mixins/media';
|
|
5
|
+
@use '../tokens/components';
|
|
6
|
+
@use '../variables/breakpoints';
|
|
7
|
+
|
|
8
|
+
tokens.$default-map: components.$post-container;
|
|
9
|
+
|
|
10
|
+
.section {
|
|
11
|
+
container: section / inline-size;
|
|
12
|
+
margin-inline: auto;
|
|
13
|
+
max-width: 1920px;
|
|
14
|
+
|
|
15
|
+
> .container {
|
|
16
|
+
--section-width: 100cqw;
|
|
17
|
+
--section-container-width: min(#{tokens.get('grid-max-width')}, var(--section-width));
|
|
18
|
+
--section-container-content-offset: calc(
|
|
19
|
+
(var(--section-width) - var(--section-container-width)) * 0.5 +
|
|
20
|
+
var(--section-container-padding)
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
@each $breakpoint in map.keys(breakpoints.$grid-breakpoints) {
|
|
24
|
+
@include media.min($breakpoint) {
|
|
25
|
+
--section-container-padding: #{tokens.get('grid-padding-#{$breakpoint}')};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@each $breakpoint in map.keys(breakpoints.$grid-breakpoints) {
|
|
30
|
+
@include media.min($breakpoint) {
|
|
31
|
+
@if $breakpoint == 'xs' {
|
|
32
|
+
.align-section-stretch,
|
|
33
|
+
.align-section-start,
|
|
34
|
+
.align-section-end,
|
|
35
|
+
.align-container-stretch,
|
|
36
|
+
.align-container-start,
|
|
37
|
+
.align-container-end {
|
|
38
|
+
display: block;
|
|
39
|
+
margin-inline: unset;
|
|
40
|
+
min-width: unset;
|
|
41
|
+
max-width: unset;
|
|
42
|
+
width: unset;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.align-section-none,
|
|
46
|
+
.align-container-none {
|
|
47
|
+
margin-inline: 0;
|
|
48
|
+
width: 100%;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.align-section-stretch {
|
|
52
|
+
margin-inline: calc(var(--section-container-content-offset) * -1);
|
|
53
|
+
width: var(--section-width);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.align-section-start {
|
|
57
|
+
margin-inline-start: calc(var(--section-container-content-offset) * -1);
|
|
58
|
+
width: calc(100% + var(--section-container-content-offset));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.align-section-end {
|
|
62
|
+
margin-inline-end: calc(var(--section-container-content-offset) * -1);
|
|
63
|
+
width: calc(100% + var(--section-container-content-offset));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.align-container-stretch {
|
|
67
|
+
margin-inline: calc(var(--section-container-padding) * -1);
|
|
68
|
+
width: var(--section-container-width);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.align-container-start {
|
|
72
|
+
margin-inline-start: calc(var(--section-container-padding) * -1);
|
|
73
|
+
width: calc(100% + var(--section-container-padding));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.align-container-end {
|
|
77
|
+
margin-inline-end: calc(var(--section-container-padding) * -1);
|
|
78
|
+
width: calc(100% + var(--section-container-padding));
|
|
79
|
+
}
|
|
80
|
+
} @else {
|
|
81
|
+
.align-section-#{$breakpoint}-stretch,
|
|
82
|
+
.align-section-#{$breakpoint}-start,
|
|
83
|
+
.align-section-#{$breakpoint}-end,
|
|
84
|
+
.align-container-#{$breakpoint}-stretch,
|
|
85
|
+
.align-container-#{$breakpoint}-start,
|
|
86
|
+
.align-container-#{$breakpoint}-end {
|
|
87
|
+
display: block;
|
|
88
|
+
margin-inline: unset;
|
|
89
|
+
min-width: unset;
|
|
90
|
+
max-width: unset;
|
|
91
|
+
width: unset;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.align-section-#{$breakpoint}-none,
|
|
95
|
+
.align-container-#{$breakpoint}-none {
|
|
96
|
+
margin-inline: 0;
|
|
97
|
+
width: 100%;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.align-section-#{$breakpoint}-stretch {
|
|
101
|
+
margin-inline: calc(var(--section-container-content-offset) * -1);
|
|
102
|
+
width: var(--section-width);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.align-section-#{$breakpoint}-start {
|
|
106
|
+
margin-inline-start: calc(var(--section-container-content-offset) * -1);
|
|
107
|
+
width: calc(100% + var(--section-container-content-offset));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.align-section-#{$breakpoint}-end {
|
|
111
|
+
margin-inline-end: calc(var(--section-container-content-offset) * -1);
|
|
112
|
+
width: calc(100% + var(--section-container-content-offset));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.align-container-#{$breakpoint}-stretch {
|
|
116
|
+
margin-inline: calc(var(--section-container-padding) * -1);
|
|
117
|
+
width: var(--section-container-width);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.align-container-#{$breakpoint}-start {
|
|
121
|
+
margin-inline-start: calc(var(--section-container-padding) * -1);
|
|
122
|
+
width: calc(100% + var(--section-container-padding));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.align-container-#{$breakpoint}-end {
|
|
126
|
+
margin-inline-end: calc(var(--section-container-padding) * -1);
|
|
127
|
+
width: calc(100% + var(--section-container-padding));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:math';
|
|
3
|
+
|
|
4
|
+
@use '../../functions/breakpoint';
|
|
5
|
+
@use '../../functions/tokens';
|
|
6
|
+
@use '../../mixins/media';
|
|
7
|
+
@use '../../tokens/components';
|
|
8
|
+
@use '../../variables/breakpoints';
|
|
9
|
+
|
|
10
|
+
@use './variables' as *;
|
|
11
|
+
|
|
12
|
+
@mixin make-row() {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-wrap: wrap;
|
|
15
|
+
|
|
16
|
+
margin-block-start: calc(-1 * var(--post-grid-gutter-y));
|
|
17
|
+
margin-inline: calc(-0.5 * var(--post-grid-gutter-x));
|
|
18
|
+
|
|
19
|
+
--post-grid-gutter-y: 0;
|
|
20
|
+
@each $breakpoint in map.keys(breakpoints.$grid-breakpoints) {
|
|
21
|
+
@include media.min($breakpoint) {
|
|
22
|
+
--post-grid-gutter-x: #{tokens.get('grid-gutter-#{$breakpoint}', components.$post-container)};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin make-col-ready() {
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
width: 100%;
|
|
30
|
+
max-width: 100%;
|
|
31
|
+
padding-inline: calc(var(--post-grid-gutter-x) * 0.5);
|
|
32
|
+
margin-block-start: var(--post-grid-gutter-y);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@mixin make-col($size: false) {
|
|
36
|
+
@if $size {
|
|
37
|
+
flex: 0 0 auto;
|
|
38
|
+
width: math.percentage(math.div($size, $grid-columns));
|
|
39
|
+
} @else {
|
|
40
|
+
flex: 1 1 0;
|
|
41
|
+
max-width: 100%;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@mixin make-col-auto() {
|
|
46
|
+
flex: 0 0 auto;
|
|
47
|
+
width: auto;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@mixin make-col-offset($size) {
|
|
51
|
+
$num: math.div($size, $grid-columns);
|
|
52
|
+
margin-inline-start: if($num == 0, 0, math.percentage($num));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@mixin row-cols($count) {
|
|
56
|
+
> * {
|
|
57
|
+
flex: 0 0 auto;
|
|
58
|
+
width: math.percentage(math.div(1, $count));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@mixin make-grid-columns() {
|
|
63
|
+
@each $breakpoint in map.keys(breakpoints.$grid-breakpoints) {
|
|
64
|
+
$infix: breakpoint.infix($breakpoint);
|
|
65
|
+
|
|
66
|
+
@include media.min($breakpoint) {
|
|
67
|
+
.col#{$infix} {
|
|
68
|
+
flex: 1 0 0%;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.row-cols#{$infix}-auto > * {
|
|
72
|
+
@include make-col-auto();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@if $grid-row-columns > 0 {
|
|
76
|
+
@for $i from 1 through $grid-row-columns {
|
|
77
|
+
.row-cols#{$infix}-#{$i} {
|
|
78
|
+
@include row-cols($i);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.col#{$infix}-auto {
|
|
84
|
+
@include make-col-auto();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@if $grid-columns > 0 {
|
|
88
|
+
@for $i from 1 through $grid-columns {
|
|
89
|
+
.col#{$infix}-#{$i} {
|
|
90
|
+
@include make-col($i);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@for $i from 0 through ($grid-columns - 1) {
|
|
95
|
+
@if not($infix == '' and $i == 0) {
|
|
96
|
+
.offset#{$infix}-#{$i} {
|
|
97
|
+
@include make-col-offset($i);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
package/layout/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.section{container:section/inline-size;margin-inline:auto;max-width:1920px}.section>.container{--section-width: 100cqw;--section-container-width: min(var(--post-core-dimension-1280), var(--section-width));--section-container-content-offset: calc( (var(--section-width) - var(--section-container-width)) * 0.5 + var(--section-container-padding) );--section-container-padding: var(--post-core-dimension-16)}@media screen and (min-width: 600px){.section>.container{--section-container-padding: var(--post-core-dimension-16)}}@media screen and (min-width: 780px){.section>.container{--section-container-padding: var(--post-core-dimension-40)}}@media screen and (min-width: 1024px){.section>.container{--section-container-padding: var(--post-core-dimension-40)}}@media screen and (min-width: 1280px){.section>.container{--section-container-padding: var(--post-core-dimension-40)}}.section>.container .align-section-stretch,.section>.container .align-section-start,.section>.container .align-section-end,.section>.container .align-container-stretch,.section>.container .align-container-start,.section>.container .align-container-end{display:block;margin-inline:unset;min-width:unset;max-width:unset;width:unset}.section>.container .align-section-none,.section>.container .align-container-none{margin-inline:0;width:100%}.section>.container .align-section-stretch{margin-inline:calc(var(--section-container-content-offset)*-1);width:var(--section-width)}.section>.container .align-section-start{margin-inline-start:calc(var(--section-container-content-offset)*-1);width:calc(100% + var(--section-container-content-offset))}.section>.container .align-section-end{margin-inline-end:calc(var(--section-container-content-offset)*-1);width:calc(100% + var(--section-container-content-offset))}.section>.container .align-container-stretch{margin-inline:calc(var(--section-container-padding)*-1);width:var(--section-container-width)}.section>.container .align-container-start{margin-inline-start:calc(var(--section-container-padding)*-1);width:calc(100% + var(--section-container-padding))}.section>.container .align-container-end{margin-inline-end:calc(var(--section-container-padding)*-1);width:calc(100% + var(--section-container-padding))}@media screen and (min-width: 600px){.section>.container .align-section-sm-stretch,.section>.container .align-section-sm-start,.section>.container .align-section-sm-end,.section>.container .align-container-sm-stretch,.section>.container .align-container-sm-start,.section>.container .align-container-sm-end{display:block;margin-inline:unset;min-width:unset;max-width:unset;width:unset}.section>.container .align-section-sm-none,.section>.container .align-container-sm-none{margin-inline:0;width:100%}.section>.container .align-section-sm-stretch{margin-inline:calc(var(--section-container-content-offset)*-1);width:var(--section-width)}.section>.container .align-section-sm-start{margin-inline-start:calc(var(--section-container-content-offset)*-1);width:calc(100% + var(--section-container-content-offset))}.section>.container .align-section-sm-end{margin-inline-end:calc(var(--section-container-content-offset)*-1);width:calc(100% + var(--section-container-content-offset))}.section>.container .align-container-sm-stretch{margin-inline:calc(var(--section-container-padding)*-1);width:var(--section-container-width)}.section>.container .align-container-sm-start{margin-inline-start:calc(var(--section-container-padding)*-1);width:calc(100% + var(--section-container-padding))}.section>.container .align-container-sm-end{margin-inline-end:calc(var(--section-container-padding)*-1);width:calc(100% + var(--section-container-padding))}}@media screen and (min-width: 780px){.section>.container .align-section-md-stretch,.section>.container .align-section-md-start,.section>.container .align-section-md-end,.section>.container .align-container-md-stretch,.section>.container .align-container-md-start,.section>.container .align-container-md-end{display:block;margin-inline:unset;min-width:unset;max-width:unset;width:unset}.section>.container .align-section-md-none,.section>.container .align-container-md-none{margin-inline:0;width:100%}.section>.container .align-section-md-stretch{margin-inline:calc(var(--section-container-content-offset)*-1);width:var(--section-width)}.section>.container .align-section-md-start{margin-inline-start:calc(var(--section-container-content-offset)*-1);width:calc(100% + var(--section-container-content-offset))}.section>.container .align-section-md-end{margin-inline-end:calc(var(--section-container-content-offset)*-1);width:calc(100% + var(--section-container-content-offset))}.section>.container .align-container-md-stretch{margin-inline:calc(var(--section-container-padding)*-1);width:var(--section-container-width)}.section>.container .align-container-md-start{margin-inline-start:calc(var(--section-container-padding)*-1);width:calc(100% + var(--section-container-padding))}.section>.container .align-container-md-end{margin-inline-end:calc(var(--section-container-padding)*-1);width:calc(100% + var(--section-container-padding))}}@media screen and (min-width: 1024px){.section>.container .align-section-lg-stretch,.section>.container .align-section-lg-start,.section>.container .align-section-lg-end,.section>.container .align-container-lg-stretch,.section>.container .align-container-lg-start,.section>.container .align-container-lg-end{display:block;margin-inline:unset;min-width:unset;max-width:unset;width:unset}.section>.container .align-section-lg-none,.section>.container .align-container-lg-none{margin-inline:0;width:100%}.section>.container .align-section-lg-stretch{margin-inline:calc(var(--section-container-content-offset)*-1);width:var(--section-width)}.section>.container .align-section-lg-start{margin-inline-start:calc(var(--section-container-content-offset)*-1);width:calc(100% + var(--section-container-content-offset))}.section>.container .align-section-lg-end{margin-inline-end:calc(var(--section-container-content-offset)*-1);width:calc(100% + var(--section-container-content-offset))}.section>.container .align-container-lg-stretch{margin-inline:calc(var(--section-container-padding)*-1);width:var(--section-container-width)}.section>.container .align-container-lg-start{margin-inline-start:calc(var(--section-container-padding)*-1);width:calc(100% + var(--section-container-padding))}.section>.container .align-container-lg-end{margin-inline-end:calc(var(--section-container-padding)*-1);width:calc(100% + var(--section-container-padding))}}@media screen and (min-width: 1280px){.section>.container .align-section-xl-stretch,.section>.container .align-section-xl-start,.section>.container .align-section-xl-end,.section>.container .align-container-xl-stretch,.section>.container .align-container-xl-start,.section>.container .align-container-xl-end{display:block;margin-inline:unset;min-width:unset;max-width:unset;width:unset}.section>.container .align-section-xl-none,.section>.container .align-container-xl-none{margin-inline:0;width:100%}.section>.container .align-section-xl-stretch{margin-inline:calc(var(--section-container-content-offset)*-1);width:var(--section-width)}.section>.container .align-section-xl-start{margin-inline-start:calc(var(--section-container-content-offset)*-1);width:calc(100% + var(--section-container-content-offset))}.section>.container .align-section-xl-end{margin-inline-end:calc(var(--section-container-content-offset)*-1);width:calc(100% + var(--section-container-content-offset))}.section>.container .align-container-xl-stretch{margin-inline:calc(var(--section-container-padding)*-1);width:var(--section-container-width)}.section>.container .align-container-xl-start{margin-inline-start:calc(var(--section-container-padding)*-1);width:calc(100% + var(--section-container-padding))}.section>.container .align-container-xl-end{margin-inline-end:calc(var(--section-container-padding)*-1);width:calc(100% + var(--section-container-padding))}}.container,.container-fluid{width:100%;margin-inline:auto;--post-grid-gutter-x: var(--post-core-dimension-16);padding-inline:max(var(--post-core-dimension-16),.5*var(--post-grid-gutter-x))}@media screen and (min-width: 600px){.container,.container-fluid{--post-grid-gutter-x: var(--post-core-dimension-16);padding-inline:max(var(--post-core-dimension-16),.5*var(--post-grid-gutter-x))}}@media screen and (min-width: 780px){.container,.container-fluid{--post-grid-gutter-x: var(--post-core-dimension-16);padding-inline:max(var(--post-core-dimension-40),.5*var(--post-grid-gutter-x))}}@media screen and (min-width: 1024px){.container,.container-fluid{--post-grid-gutter-x: var(--post-core-dimension-24);padding-inline:max(var(--post-core-dimension-40),.5*var(--post-grid-gutter-x))}}@media screen and (min-width: 1280px){.container,.container-fluid{--post-grid-gutter-x: var(--post-core-dimension-24);padding-inline:max(var(--post-core-dimension-40),.5*var(--post-grid-gutter-x))}}.container{max-width:var(--post-core-dimension-1280)}.row{display:flex;flex-wrap:wrap;margin-block-start:calc(-1*var(--post-grid-gutter-y));margin-inline:calc(-0.5*var(--post-grid-gutter-x));--post-grid-gutter-y: 0;--post-grid-gutter-x: var(--post-core-dimension-16)}@media screen and (min-width: 600px){.row{--post-grid-gutter-x: var(--post-core-dimension-16)}}@media screen and (min-width: 780px){.row{--post-grid-gutter-x: var(--post-core-dimension-16)}}@media screen and (min-width: 1024px){.row{--post-grid-gutter-x: var(--post-core-dimension-24)}}@media screen and (min-width: 1280px){.row{--post-grid-gutter-x: var(--post-core-dimension-24)}}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-inline:calc(var(--post-grid-gutter-x)*.5);margin-block-start:var(--post-grid-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.3333333333%}.col-2{flex:0 0 auto;width:16.6666666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.3333333333%}.col-5{flex:0 0 auto;width:41.6666666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.3333333333%}.col-8{flex:0 0 auto;width:66.6666666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.3333333333%}.col-11{flex:0 0 auto;width:91.6666666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-inline-start:8.3333333333%}.offset-2{margin-inline-start:16.6666666667%}.offset-3{margin-inline-start:25%}.offset-4{margin-inline-start:33.3333333333%}.offset-5{margin-inline-start:41.6666666667%}.offset-6{margin-inline-start:50%}.offset-7{margin-inline-start:58.3333333333%}.offset-8{margin-inline-start:66.6666666667%}.offset-9{margin-inline-start:75%}.offset-10{margin-inline-start:83.3333333333%}.offset-11{margin-inline-start:91.6666666667%}@media screen and (min-width: 600px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.3333333333%}.col-sm-2{flex:0 0 auto;width:16.6666666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.3333333333%}.col-sm-5{flex:0 0 auto;width:41.6666666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.3333333333%}.col-sm-8{flex:0 0 auto;width:66.6666666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.3333333333%}.col-sm-11{flex:0 0 auto;width:91.6666666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-inline-start:0}.offset-sm-1{margin-inline-start:8.3333333333%}.offset-sm-2{margin-inline-start:16.6666666667%}.offset-sm-3{margin-inline-start:25%}.offset-sm-4{margin-inline-start:33.3333333333%}.offset-sm-5{margin-inline-start:41.6666666667%}.offset-sm-6{margin-inline-start:50%}.offset-sm-7{margin-inline-start:58.3333333333%}.offset-sm-8{margin-inline-start:66.6666666667%}.offset-sm-9{margin-inline-start:75%}.offset-sm-10{margin-inline-start:83.3333333333%}.offset-sm-11{margin-inline-start:91.6666666667%}}@media screen and (min-width: 780px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.3333333333%}.col-md-2{flex:0 0 auto;width:16.6666666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.3333333333%}.col-md-5{flex:0 0 auto;width:41.6666666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.3333333333%}.col-md-8{flex:0 0 auto;width:66.6666666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.3333333333%}.col-md-11{flex:0 0 auto;width:91.6666666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-inline-start:0}.offset-md-1{margin-inline-start:8.3333333333%}.offset-md-2{margin-inline-start:16.6666666667%}.offset-md-3{margin-inline-start:25%}.offset-md-4{margin-inline-start:33.3333333333%}.offset-md-5{margin-inline-start:41.6666666667%}.offset-md-6{margin-inline-start:50%}.offset-md-7{margin-inline-start:58.3333333333%}.offset-md-8{margin-inline-start:66.6666666667%}.offset-md-9{margin-inline-start:75%}.offset-md-10{margin-inline-start:83.3333333333%}.offset-md-11{margin-inline-start:91.6666666667%}}@media screen and (min-width: 1024px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.3333333333%}.col-lg-2{flex:0 0 auto;width:16.6666666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.3333333333%}.col-lg-5{flex:0 0 auto;width:41.6666666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.3333333333%}.col-lg-8{flex:0 0 auto;width:66.6666666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.3333333333%}.col-lg-11{flex:0 0 auto;width:91.6666666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-inline-start:0}.offset-lg-1{margin-inline-start:8.3333333333%}.offset-lg-2{margin-inline-start:16.6666666667%}.offset-lg-3{margin-inline-start:25%}.offset-lg-4{margin-inline-start:33.3333333333%}.offset-lg-5{margin-inline-start:41.6666666667%}.offset-lg-6{margin-inline-start:50%}.offset-lg-7{margin-inline-start:58.3333333333%}.offset-lg-8{margin-inline-start:66.6666666667%}.offset-lg-9{margin-inline-start:75%}.offset-lg-10{margin-inline-start:83.3333333333%}.offset-lg-11{margin-inline-start:91.6666666667%}}@media screen and (min-width: 1280px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.3333333333%}.col-xl-2{flex:0 0 auto;width:16.6666666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.3333333333%}.col-xl-5{flex:0 0 auto;width:41.6666666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.3333333333%}.col-xl-8{flex:0 0 auto;width:66.6666666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.3333333333%}.col-xl-11{flex:0 0 auto;width:91.6666666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-inline-start:0}.offset-xl-1{margin-inline-start:8.3333333333%}.offset-xl-2{margin-inline-start:16.6666666667%}.offset-xl-3{margin-inline-start:25%}.offset-xl-4{margin-inline-start:33.3333333333%}.offset-xl-5{margin-inline-start:41.6666666667%}.offset-xl-6{margin-inline-start:50%}.offset-xl-7{margin-inline-start:58.3333333333%}.offset-xl-8{margin-inline-start:66.6666666667%}.offset-xl-9{margin-inline-start:75%}.offset-xl-10{margin-inline-start:83.3333333333%}.offset-xl-11{margin-inline-start:91.6666666667%}}
|
package/mixins/_button.scss
CHANGED
|
@@ -6,43 +6,47 @@
|
|
|
6
6
|
@use './../variables/color' as color-var;
|
|
7
7
|
@use './../functions/contrast' as contrast-fn;
|
|
8
8
|
@use 'utilities';
|
|
9
|
+
@use './../mixins/color' as color-mx;
|
|
10
|
+
@use '../functions/tokens';
|
|
11
|
+
@use '../tokens/components';
|
|
12
|
+
|
|
13
|
+
tokens.$default-map: components.$post-button;
|
|
9
14
|
|
|
10
15
|
@mixin reset-button {
|
|
11
16
|
padding: 0;
|
|
12
17
|
overflow: visible;
|
|
13
18
|
border: 0;
|
|
14
19
|
background: none;
|
|
15
|
-
color:
|
|
20
|
+
color: tokens.get('button-secondary-enabled-fg', components.$post-button);
|
|
16
21
|
font: inherit;
|
|
17
22
|
-webkit-user-select: none;
|
|
18
23
|
user-select: none;
|
|
19
24
|
appearance: button; // for input
|
|
25
|
+
|
|
26
|
+
@include utilities.high-contrast-mode() {
|
|
27
|
+
background-color: ButtonFace !important;
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
background-color: Highlight !important;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
20
33
|
}
|
|
21
34
|
|
|
22
35
|
@mixin button-size($size: md) {
|
|
23
36
|
min-height: map.get(button.$btn-height-map, $size);
|
|
24
|
-
font-size: map.get(button.$btn-font-size-map, $size);
|
|
25
37
|
gap: map.get(button.$btn-gap-x-map, $size);
|
|
38
|
+
padding: 0 map.get(button.$btn-padding-x-map, $size);
|
|
26
39
|
|
|
27
|
-
&:where(:not(.btn-link, .btn-tertiary)) {
|
|
28
|
-
padding: 0 map.get(button.$btn-padding-x-map, $size);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
> .pi,
|
|
32
40
|
> post-icon {
|
|
33
41
|
width: map.get(button.$btn-icon-size-map, $size);
|
|
34
42
|
height: map.get(button.$btn-icon-size-map, $size);
|
|
35
43
|
}
|
|
36
44
|
}
|
|
37
45
|
|
|
38
|
-
@mixin
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
$padding-y: ($button-height - $icon-size) * 0.5 - button.$input-btn-focus-width;
|
|
43
|
-
min-width: $button-height;
|
|
44
|
-
padding-right: $padding-y;
|
|
45
|
-
padding-left: $padding-y;
|
|
46
|
+
@mixin button-variant-def($type, $color) {
|
|
47
|
+
border-color: tokens.get('button-#{$color}-#{$type}-stroke');
|
|
48
|
+
background-color: tokens.get('button-#{$color}-#{$type}-bg');
|
|
49
|
+
color: tokens.get('button-#{$color}-#{$type}-fg');
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
@mixin button-color-variant($name, $color) {
|
package/mixins/_form-checks.scss
CHANGED
package/mixins/_forms.scss
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
@use '
|
|
2
|
-
@use './../variables/type';
|
|
3
|
-
@use './../variables/components/form-validation';
|
|
1
|
+
@use 'sass:map';
|
|
4
2
|
@use './../variables/components/forms';
|
|
5
|
-
@use './../variables/components/tooltips';
|
|
6
3
|
@use './../mixins/utilities';
|
|
4
|
+
@use './../functions/icons';
|
|
5
|
+
@use './../functions/forms' as forms-fx;
|
|
6
|
+
@use './../functions/utilities' as utilities-fx;
|
|
7
|
+
@use './../variables/color';
|
|
7
8
|
|
|
8
9
|
// Placeholder in input fields
|
|
9
|
-
|
|
10
10
|
@mixin placeholder() {
|
|
11
11
|
&::placeholder {
|
|
12
12
|
@content;
|
|
@@ -20,33 +20,6 @@
|
|
|
20
20
|
/* stylelint-enable */
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
@mixin icon-placement {
|
|
24
|
-
padding-right: form-validation.$form-feedback-icon-offset +
|
|
25
|
-
form-validation.$form-feedback-icon-size;
|
|
26
|
-
background-repeat: no-repeat;
|
|
27
|
-
background-position: calc(100% - #{form-validation.$form-feedback-icon-offset}) center;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@mixin form-rg {
|
|
31
|
-
padding: forms.$input-padding-y-rg forms.$input-padding-x-rg;
|
|
32
|
-
font-size: type.$font-size-regular;
|
|
33
|
-
line-height: forms.$input-line-height-rg;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@mixin form-sm {
|
|
37
|
-
font-size: type.$font-size-14;
|
|
38
|
-
line-height: forms.$input-line-height-sm;
|
|
39
|
-
min-height: forms.$input-height-sm;
|
|
40
|
-
padding-block: forms.$input-padding-y-sm;
|
|
41
|
-
padding-inline: forms.$input-padding-x-sm;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@mixin form-lg {
|
|
45
|
-
font-size: type.$font-size-16 !important;
|
|
46
|
-
line-height: forms.$input-line-height-lg;
|
|
47
|
-
min-height: forms.$input-height-lg;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
23
|
/* Deprecated use the one in utilities.scss */
|
|
51
24
|
@mixin focus-outline {
|
|
52
25
|
outline: none;
|
|
@@ -54,7 +27,43 @@
|
|
|
54
27
|
|
|
55
28
|
/* Compatibility with button-group */
|
|
56
29
|
&:is(:focus-visible, :focus-within, .pretend-focus) {
|
|
57
|
-
outline: forms.$input-focus-outline-thickness solid
|
|
30
|
+
outline: forms.$input-focus-outline-thickness solid color.$black;
|
|
58
31
|
@content;
|
|
59
32
|
}
|
|
60
33
|
}
|
|
34
|
+
|
|
35
|
+
// Used on form elements to set the correct colored validation icon
|
|
36
|
+
@mixin validation-icons() {
|
|
37
|
+
&.is-valid:not(:disabled) {
|
|
38
|
+
background-image: forms-fx.success-icon();
|
|
39
|
+
|
|
40
|
+
@include utilities.high-contrast-mode-dark() {
|
|
41
|
+
background-image: forms-fx.success-icon(#e0e0e0);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@include utilities.high-contrast-mode-light() {
|
|
45
|
+
background-image: forms-fx.success-icon(#333);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.is-invalid:not(:disabled) {
|
|
50
|
+
background-image: forms-fx.warning-icon();
|
|
51
|
+
|
|
52
|
+
@include utilities.high-contrast-mode-dark() {
|
|
53
|
+
background-image: forms-fx.warning-icon(#e0e0e0);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@include utilities.high-contrast-mode-light() {
|
|
57
|
+
background-image: forms-fx.warning-icon(#333);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@mixin textarea-resizer-svg($color) {
|
|
63
|
+
&::-webkit-resizer {
|
|
64
|
+
$clean-color: utilities-fx.replace('#{$color}', '#', '%23');
|
|
65
|
+
background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="25" height="24" viewBox="0 0 25 24" fill="none"%3E%3Cg clip-path="url(%23clip0_7846_3191)"%3E%3Cpath d="M6.5 18H9.5V21H6.5V18Z" fill="#{$clean-color}"/%3E%3Cpath d="M12.5 18H15.5V21H12.5V18Z" fill="#{$clean-color}"/%3E%3Cpath d="M12.5 12H15.5V15H12.5V12Z" fill="#{$clean-color}"/%3E%3Cpath d="M18.5 12H21.5V15H18.5V12Z" fill="#{$clean-color}"/%3E%3Cpath d="M18.5 6H21.5V9H18.5V6Z" fill="#{$clean-color}"/%3E%3Cpath d="M18.5 18H21.5V21H18.5V18Z" fill="#{$clean-color}"/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id="clip0_7846_3191"%3E%3Crect width="24" height="24" fill="white" transform="translate(0.5)"/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E');
|
|
66
|
+
background-repeat: no-repeat;
|
|
67
|
+
background-size: 100%;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:color';
|
|
3
|
+
|
|
4
|
+
@use '../functions/tokens';
|
|
5
|
+
@use '../tokens/components';
|
|
6
|
+
|
|
7
|
+
tokens.$default-map: components.$post-icon-button;
|
|
8
|
+
|
|
9
|
+
@mixin icon-button($size: md) {
|
|
10
|
+
$size-map: (
|
|
11
|
+
'sm': 'small',
|
|
12
|
+
'md': 'medium',
|
|
13
|
+
'lg': 'large',
|
|
14
|
+
);
|
|
15
|
+
$actual-size: map.get($size-map, $size);
|
|
16
|
+
padding: 0;
|
|
17
|
+
width: tokens.get('icon-button-#{$actual-size}-outer');
|
|
18
|
+
height: tokens.get('icon-button-#{$actual-size}-outer');
|
|
19
|
+
min-height: 0;
|
|
20
|
+
vertical-align: text-bottom;
|
|
21
|
+
|
|
22
|
+
> post-icon {
|
|
23
|
+
display: block;
|
|
24
|
+
width: tokens.get('icon-button-#{$actual-size}-icon');
|
|
25
|
+
height: tokens.get('icon-button-#{$actual-size}-icon');
|
|
26
|
+
}
|
|
27
|
+
}
|
package/mixins/_icons.scss
CHANGED
|
@@ -8,43 +8,33 @@
|
|
|
8
8
|
@use './../mixins/utilities';
|
|
9
9
|
|
|
10
10
|
@mixin icon($name) {
|
|
11
|
-
|
|
12
|
-
mask-image: url('#{icon-fn.get-svg-url($name)}');
|
|
11
|
+
mask-image: url('#{icon-fn.get-svg-url($name)}');
|
|
13
12
|
background-color: currentColor;
|
|
14
13
|
color: currentColor; // Required in this case with usage of forced-color-adjust: preserve-parent-color
|
|
15
14
|
forced-color-adjust: preserve-parent-color;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
@mixin
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
// set icon to white on hcm
|
|
39
|
-
@include utilities.high-contrast-mode() {
|
|
40
|
-
@if ($final-color == color.$black) {
|
|
41
|
-
filter: invert(100%);
|
|
42
|
-
} @else {
|
|
43
|
-
background-image: url('#{icon-fn.get-colored-svg-url($name, color.$white)}');
|
|
44
|
-
}
|
|
45
|
-
}
|
|
17
|
+
@mixin post-icon(
|
|
18
|
+
$base: 'https://unpkg.com/@swisspost/design-system-icons/public/post-icons',
|
|
19
|
+
$name,
|
|
20
|
+
$color: inherit
|
|
21
|
+
) {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
width: 1em;
|
|
24
|
+
height: 1em;
|
|
25
|
+
vertical-align: -0.15em;
|
|
26
|
+
background-color: currentColor;
|
|
27
|
+
color: $color;
|
|
28
|
+
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
29
|
+
mask-image: url('#{$base}/#{$name}.svg');
|
|
30
|
+
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
31
|
+
mask-position: center center;
|
|
32
|
+
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
33
|
+
mask-repeat: no-repeat;
|
|
34
|
+
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
35
|
+
mask-size: 100%;
|
|
46
36
|
}
|
|
47
37
|
|
|
48
|
-
@mixin
|
|
49
|
-
|
|
38
|
+
@mixin remove-icon() {
|
|
39
|
+
mask-image: none;
|
|
50
40
|
}
|
package/mixins/_index.scss
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
@forward 'button';
|
|
3
3
|
@forward 'chip';
|
|
4
4
|
@forward 'color';
|
|
5
|
-
@forward 'focus';
|
|
6
5
|
@forward 'form-checks';
|
|
7
6
|
@forward 'forms';
|
|
7
|
+
@forward 'icon-button';
|
|
8
8
|
@forward 'icons';
|
|
9
|
+
@forward 'list';
|
|
10
|
+
@forward 'media';
|
|
9
11
|
@forward 'notification';
|
|
10
12
|
@forward 'scroll-shadows';
|
|
11
|
-
@forward 'size';
|
|
12
13
|
@forward 'type';
|
|
13
14
|
@forward 'utilities';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@use './media';
|
|
2
|
+
|
|
3
|
+
@mixin responsive-actions {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
|
|
8
|
+
@include media.min(md) {
|
|
9
|
+
flex-direction: row-reverse;
|
|
10
|
+
|
|
11
|
+
> .btn {
|
|
12
|
+
margin-right: auto;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-primary-actions {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
@content;
|
|
20
|
+
|
|
21
|
+
@include media.min(md) {
|
|
22
|
+
flex-direction: row-reverse;
|
|
23
|
+
margin-left: auto;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|