@swisspost/design-system-styles 6.4.1 → 6.4.2
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/basics.css +1 -1
- package/components/form-check.scss +22 -3
- package/components/form-validation.scss +9 -2
- package/components/grid.scss +79 -14
- package/components/intranet-header/_language-chooser.scss +2 -1
- package/components/intranet-header/_scaffolding.scss +1 -1
- package/components/tabs/_tab-title.scss +1 -1
- package/index.css +3 -3
- package/intranet.css +3 -3
- package/mixins/_form-checks.scss +0 -46
- package/mixins/_form-validation.scss +5 -0
- package/mixins/_icons.scss +6 -0
- package/package.json +2 -2
- package/themes/bootstrap/_forms.scss +0 -2
- package/variables/_breakpoints.scss +2 -0
- package/variables/_grid.scss +37 -9
- package/variables/components/_form-check.scss +3 -1
- package/variables/components/_form-validation.scss +1 -1
- package/themes/bootstrap/forms/_form-check.scss +0 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@forward './../variables/options';
|
|
2
2
|
|
|
3
3
|
@use '../variables/color';
|
|
4
|
+
@use '../variables/type';
|
|
4
5
|
@use '../variables/spacing';
|
|
5
6
|
@use '../variables/animation';
|
|
6
7
|
@use '../variables/components/form-check';
|
|
@@ -17,6 +18,10 @@
|
|
|
17
18
|
display: inline-flex;
|
|
18
19
|
}
|
|
19
20
|
|
|
21
|
+
&-inline:not(:last-of-type) {
|
|
22
|
+
margin-right: form-check.$form-check-inline-margin-right;
|
|
23
|
+
}
|
|
24
|
+
|
|
20
25
|
&-input,
|
|
21
26
|
&-label {
|
|
22
27
|
color: rgba(var(--post-contrast-color-rgb), 0.8);
|
|
@@ -78,7 +83,7 @@
|
|
|
78
83
|
border-radius: 50%;
|
|
79
84
|
|
|
80
85
|
&:checked::after {
|
|
81
|
-
|
|
86
|
+
border: spacing.$size-micro solid color.$white;
|
|
82
87
|
background-color: currentColor;
|
|
83
88
|
border-radius: inherit;
|
|
84
89
|
}
|
|
@@ -86,14 +91,28 @@
|
|
|
86
91
|
|
|
87
92
|
&[disabled],
|
|
88
93
|
&[disabled] ~ .form-check-label {
|
|
89
|
-
opacity: 1; // Bootstrap reset
|
|
90
94
|
border-color: rgba(var(--post-contrast-color-rgb), 0.4) !important;
|
|
91
95
|
color: rgba(var(--post-contrast-color-rgb), 0.4) !important;
|
|
92
96
|
}
|
|
97
|
+
|
|
98
|
+
.form-check-sm & {
|
|
99
|
+
height: form-check.$form-check-input-size-sm;
|
|
100
|
+
width: form-check.$form-check-input-size-sm;
|
|
101
|
+
|
|
102
|
+
&[type='radio'] {
|
|
103
|
+
&:checked::after {
|
|
104
|
+
border-width: spacing.$size-line;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
93
108
|
}
|
|
94
109
|
|
|
95
110
|
&-label {
|
|
96
111
|
flex: 1;
|
|
112
|
+
|
|
113
|
+
.form-check-sm & {
|
|
114
|
+
font-size: type.$font-size-12;
|
|
115
|
+
}
|
|
97
116
|
}
|
|
98
117
|
}
|
|
99
118
|
|
|
@@ -123,7 +142,7 @@
|
|
|
123
142
|
background-position-x: form-check.$form-switch-width;
|
|
124
143
|
|
|
125
144
|
&::after {
|
|
126
|
-
|
|
145
|
+
@include icons-mx.remove-icon;
|
|
127
146
|
background-color: form-check.$form-switch-color;
|
|
128
147
|
border-color: form-check.$form-switch-checked-border-color;
|
|
129
148
|
transform: translateX(2rem);
|
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
@use './../mixins/color' as color-mx;
|
|
8
8
|
@use './../mixins/utilities' as utilities-mx;
|
|
9
|
+
@use './../mixins/form-validation' as form-validation-mx;
|
|
9
10
|
@use './../variables/color';
|
|
10
11
|
@use './../variables/components/form-validation';
|
|
12
|
+
@use './../variables/components/forms';
|
|
11
13
|
|
|
12
14
|
.invalid-feedback,
|
|
13
15
|
.valid-feedback {
|
|
@@ -81,9 +83,14 @@
|
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
85
|
|
|
86
|
+
.is-invalid ~ .invalid-feedback,
|
|
87
|
+
.is-valid ~ .valid-feedback {
|
|
88
|
+
display: block;
|
|
89
|
+
}
|
|
90
|
+
|
|
84
91
|
.form-control,
|
|
85
92
|
.form-select {
|
|
86
|
-
@include form-validation-state-selector(invalid) {
|
|
93
|
+
@include form-validation-mx.form-validation-state-selector(invalid) {
|
|
87
94
|
border-color: form-validation.$form-feedback-invalid-color;
|
|
88
95
|
|
|
89
96
|
&:focus {
|
|
@@ -94,7 +101,7 @@
|
|
|
94
101
|
}
|
|
95
102
|
|
|
96
103
|
.form-check-input {
|
|
97
|
-
@include form-validation-state-selector(invalid) {
|
|
104
|
+
@include form-validation-mx.form-validation-state-selector(invalid) {
|
|
98
105
|
border-color: form-validation.$form-feedback-invalid-color;
|
|
99
106
|
|
|
100
107
|
&:focus {
|
package/components/grid.scss
CHANGED
|
@@ -11,6 +11,85 @@
|
|
|
11
11
|
@use './../variables/spacing';
|
|
12
12
|
@use './../variables/grid';
|
|
13
13
|
|
|
14
|
+
$container-padding-x-cache: 0;
|
|
15
|
+
$container-fluid-padding-x-cache: 0;
|
|
16
|
+
$gutter-x-cache: 0;
|
|
17
|
+
|
|
18
|
+
.container {
|
|
19
|
+
padding-inline: var(--post-container-padding-x);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.container-fluid {
|
|
23
|
+
padding-inline: var(--post-container-fluid-padding-x);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@each $breakpoint in grid.$grid-breakpoints-list {
|
|
27
|
+
$container-padding-x: map.get(grid.$grid-container-padding, $breakpoint);
|
|
28
|
+
$container-fluid-padding-x: map.get(grid.$grid-container-fluid-padding, $breakpoint);
|
|
29
|
+
$gutter-x: map.get(grid.$grid-gutter-x, $breakpoint);
|
|
30
|
+
|
|
31
|
+
@if ($container-padding-x-cache != $container-padding-x) {
|
|
32
|
+
.container {
|
|
33
|
+
@if $breakpoint == 'xs' {
|
|
34
|
+
--post-container-padding-x: #{$container-padding-x};
|
|
35
|
+
} @else {
|
|
36
|
+
@include media-breakpoint-up($breakpoint) {
|
|
37
|
+
--post-container-padding-x: #{$container-padding-x};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@if ($container-fluid-padding-x-cache != $container-fluid-padding-x) {
|
|
44
|
+
.container-fluid {
|
|
45
|
+
@if $breakpoint == 'xs' {
|
|
46
|
+
--post-container-fluid-padding-x: #{$container-fluid-padding-x};
|
|
47
|
+
} @else {
|
|
48
|
+
@include media-breakpoint-up($breakpoint) {
|
|
49
|
+
--post-container-fluid-padding-x: #{$container-fluid-padding-x};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@if ($gutter-x-cache != $gutter-x) {
|
|
56
|
+
.row {
|
|
57
|
+
@if $breakpoint == 'xs' {
|
|
58
|
+
--bs-gutter-x: #{$gutter-x};
|
|
59
|
+
} @else {
|
|
60
|
+
@include media-breakpoint-up($breakpoint) {
|
|
61
|
+
--bs-gutter-x: #{$gutter-x};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
$container-padding-x-cache: $container-padding-x;
|
|
68
|
+
$container-fluid-padding-x-cache: $container-fluid-padding-x;
|
|
69
|
+
$gutter-x-cache: $gutter-x;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// redefine gutter-utilities, to override the custom gutter-width above
|
|
73
|
+
@each $infix in grid.$grid-breakpoints-list {
|
|
74
|
+
@each $postfix, $gutter in $gutters {
|
|
75
|
+
@if $infix == 'xs' {
|
|
76
|
+
.g-#{$postfix},
|
|
77
|
+
.gx-#{$postfix} {
|
|
78
|
+
--bs-gutter-x: #{$gutter};
|
|
79
|
+
}
|
|
80
|
+
} @else {
|
|
81
|
+
@include media-breakpoint-up($infix) {
|
|
82
|
+
.g-#{$infix}-#{$postfix},
|
|
83
|
+
.gx-#{$infix}-#{$postfix} {
|
|
84
|
+
--bs-gutter-x: #{$gutter};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// legacy code
|
|
92
|
+
|
|
14
93
|
.vertical-gutters {
|
|
15
94
|
margin-bottom: grid.$grid-gutter-width * -1;
|
|
16
95
|
|
|
@@ -41,20 +120,6 @@ $container-cache: 0;
|
|
|
41
120
|
|
|
42
121
|
// Ensure this breakpoint is only overwritten when the padding differs from the last breakpoint
|
|
43
122
|
@if ($container-cache != $container-padding) {
|
|
44
|
-
// Loop over breakpoints and set custom-paddings to .container for each breakpoint
|
|
45
|
-
.container {
|
|
46
|
-
// If xs, don't add media-query
|
|
47
|
-
@if $breakpoint == 'xs' {
|
|
48
|
-
padding-right: $container-padding;
|
|
49
|
-
padding-left: $container-padding;
|
|
50
|
-
} @else {
|
|
51
|
-
@include media-breakpoint-up($breakpoint) {
|
|
52
|
-
padding-right: $container-padding;
|
|
53
|
-
padding-left: $container-padding;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
123
|
.container-reset {
|
|
59
124
|
@if $breakpoint == 'xs' {
|
|
60
125
|
margin-right: -($container-padding);
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
overflow-y: visible;
|
|
11
11
|
|
|
12
12
|
.dropdown-item {
|
|
13
|
-
padding: spacing.$size-small-regular
|
|
13
|
+
padding: spacing.$size-small-regular 0;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.language-menu {
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
border-left: 0;
|
|
24
24
|
border-radius: 0;
|
|
25
25
|
text-align: center;
|
|
26
|
+
overflow: initial;
|
|
26
27
|
|
|
27
28
|
&:last-child {
|
|
28
29
|
border-right: 0;
|