@swisspost/design-system-styles 10.6.0 → 10.8.0
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/README.md +28 -23
- package/_svg-icon-map.scss +8 -4
- package/basics.css +1 -1
- package/cargo-compact.css +1 -1
- package/cargo-condensed.css +1 -0
- package/cargo-condensed.scss +12 -0
- package/cargo-default.css +1 -1
- package/cargo-tokens-compact.css +1 -1
- package/cargo-tokens-condensed.css +1 -0
- package/cargo-tokens-condensed.scss +8 -0
- package/cargo-tokens-default.css +1 -1
- package/components/avatar.css +1 -1
- package/components/blockquote.css +1 -1
- package/components/blockquote.scss +4 -1
- package/components/button-group.css +1 -1
- package/components/button.css +1 -1
- package/components/button.scss +5 -0
- package/components/card.css +1 -1
- package/components/checkbox.css +1 -1
- package/components/chip.css +1 -1
- package/components/dialog.css +1 -1
- package/components/dialog.scss +21 -6
- package/components/form-input.css +1 -1
- package/components/form-input.scss +3 -1
- package/components/form-search-input.css +1 -1
- package/components/form-select.css +1 -1
- package/components/form-select.scss +3 -2
- package/components/form-textarea.css +1 -1
- package/components/form-textarea.scss +3 -1
- package/components/header/index.css +1 -1
- package/components/inline-notification.css +1 -1
- package/components/inline-notification.scss +32 -15
- package/components/list-check.css +1 -1
- package/components/list-check.scss +18 -53
- package/components/list-interactive.css +1 -1
- package/components/palette.css +1 -1
- package/components/radio-button.css +1 -1
- package/components/segmented-button.css +1 -1
- package/components/selection-card.css +1 -1
- package/components/selection-card.scss +2 -1
- package/components/skiplinks.css +1 -1
- package/components/switch.css +1 -1
- package/components/tabs/index.css +1 -1
- package/components/tag.css +1 -1
- package/components/tag.scss +2 -1
- package/components/toast.css +1 -1
- package/components/toast.scss +2 -1
- package/elements/anchor.css +1 -1
- package/functions/_env.scss +12 -0
- package/functions/_icons.scss +4 -3
- package/functions/_index.scss +1 -0
- package/helpers/focus-ring.css +1 -1
- package/mixins/_button.scss +12 -1
- package/mixins/_color-scheme.scss +48 -17
- package/mixins/_notification.scss +2 -1
- package/mixins/_utilities.scss +22 -29
- package/package.json +5 -5
- package/placeholders/_button.scss +1 -0
- package/post-compact.css +1 -1
- package/post-condensed.css +1 -0
- package/post-condensed.scss +12 -0
- package/post-default.css +1 -1
- package/post-tokens-compact.css +1 -1
- package/post-tokens-condensed.css +1 -0
- package/post-tokens-condensed.scss +8 -0
- package/post-tokens-default.css +1 -1
- package/tokens/_appearance-condensed.scss +11 -0
- package/tokens/_device-condensed.scss +10 -0
- package/tokens/_schemes.scss +2 -8
- package/utilities/_env-variables.scss +1 -1
package/mixins/_utilities.scss
CHANGED
|
@@ -72,6 +72,26 @@
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
@mixin focus-visible($additional-selector: '') {
|
|
76
|
+
// These selectors are deliberately kept separate and are not grouped in a single :is() selector,
|
|
77
|
+
// because Stencil's CSS minifier corrupts selector lists that repeat an :is() group containing :has().
|
|
78
|
+
// See https://github.com/stenciljs/core/issues/6894.
|
|
79
|
+
@each $focus-selector in ':focus-visible', '.pretend-focus', ':has(:focus-visible)' {
|
|
80
|
+
&#{$focus-selector}#{$additional-selector} {
|
|
81
|
+
@content;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// When a browser doesn't support :has, use focus-within as a fallback.
|
|
86
|
+
// This means that focus state is displayed on focus and not on focus-visible only (except some browsers like Safari).
|
|
87
|
+
// This list contains no nested parentheses, so it is safe to group it in a single :is() selector.
|
|
88
|
+
@supports not selector(:has(:focus-visible)) {
|
|
89
|
+
&:is(:focus-visible, :focus-within, .pretend-focus)#{$additional-selector} {
|
|
90
|
+
@content;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
75
95
|
@mixin focus-style-none {
|
|
76
96
|
outline: none !important;
|
|
77
97
|
}
|
|
@@ -86,8 +106,7 @@
|
|
|
86
106
|
tokens.get('focus-outline-width', helpers.$post-focus) !important;
|
|
87
107
|
}
|
|
88
108
|
|
|
89
|
-
|
|
90
|
-
&:is(:focus-visible, :has(:focus-visible), .pretend-focus)#{$additional-selector} {
|
|
109
|
+
@include focus-visible($additional-selector) {
|
|
91
110
|
outline-style: tokens.get('focus-border-style', helpers.$post-focus) !important;
|
|
92
111
|
// In case rules need to be slightly adjusted
|
|
93
112
|
@content;
|
|
@@ -96,19 +115,6 @@
|
|
|
96
115
|
outline-color: Highlight !important;
|
|
97
116
|
}
|
|
98
117
|
}
|
|
99
|
-
|
|
100
|
-
// When a browser doesn't support :has, use focus-within as a fallback. This means that focus state is displayed on focus and not on focus-visible only (except some browsers like Safari).
|
|
101
|
-
@supports not selector(:has(:focus-visible)) {
|
|
102
|
-
&:is(:focus-visible, :focus-within, .pretend-focus)#{$additional-selector} {
|
|
103
|
-
outline-style: tokens.get('focus-border-style', helpers.$post-focus) !important;
|
|
104
|
-
// In case rules need to be slightly adjusted
|
|
105
|
-
@content;
|
|
106
|
-
|
|
107
|
-
@include high-contrast-mode() {
|
|
108
|
-
outline-color: Highlight !important;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
118
|
}
|
|
113
119
|
|
|
114
120
|
// this mixin should only be used if the default focus ring is not fully visible
|
|
@@ -128,8 +134,7 @@
|
|
|
128
134
|
outline: $outline-color none tokens.get('focus-outline-width', helpers.$post-focus) !important;
|
|
129
135
|
}
|
|
130
136
|
|
|
131
|
-
|
|
132
|
-
&:is(:focus-visible, :has(:focus-visible), .pretend-focus)#{$additional-selector} {
|
|
137
|
+
@include focus-visible($additional-selector) {
|
|
133
138
|
outline-style: tokens.get('focus-border-style', helpers.$post-focus) !important;
|
|
134
139
|
@content;
|
|
135
140
|
|
|
@@ -137,18 +142,6 @@
|
|
|
137
142
|
outline-color: Highlight !important;
|
|
138
143
|
}
|
|
139
144
|
}
|
|
140
|
-
|
|
141
|
-
// When a browser doesn't support :has, use focus-within as a fallback. This means that focus state is displayed on focus and not on focus-visible only (except some browsers like Safari).
|
|
142
|
-
@supports not selector(:has(:focus-visible)) {
|
|
143
|
-
&:is(:focus-visible, :focus-within, .pretend-focus)#{$additional-selector} {
|
|
144
|
-
outline-style: tokens.get('focus-border-style', helpers.$post-focus) !important;
|
|
145
|
-
@content;
|
|
146
|
-
|
|
147
|
-
@include high-contrast-mode() {
|
|
148
|
-
outline-color: Highlight !important;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
145
|
}
|
|
153
146
|
|
|
154
147
|
@mixin focus-hover-style-custom($additional-selector: '') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swisspost/design-system-styles",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.8.0",
|
|
4
4
|
"description": "Design System Styles for the Swiss Post web platform.",
|
|
5
5
|
"author": "Swiss Post <design-system@post.ch>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"linkDirectory": true
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@swisspost/design-system-icons": "10.
|
|
23
|
-
"@swisspost/design-system-tokens": "10.
|
|
22
|
+
"@swisspost/design-system-icons": "10.8.0",
|
|
23
|
+
"@swisspost/design-system-tokens": "10.8.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@swisspost/design-system-prettier-config": "10.
|
|
27
|
-
"@swisspost/design-system-stylelint-config": "10.
|
|
26
|
+
"@swisspost/design-system-prettier-config": "10.8.0",
|
|
27
|
+
"@swisspost/design-system-stylelint-config": "10.8.0",
|
|
28
28
|
"@types/node": "24.0.0",
|
|
29
29
|
"autoprefixer": "10.5.0",
|
|
30
30
|
"copyfiles": "2.4.1",
|