@swisspost/design-system-styles 8.2.1 → 8.3.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/components/_index.scss +1 -0
- package/components/dialog.css +1 -0
- package/components/dialog.scss +249 -0
- package/components/stepper.css +1 -1
- package/components/stepper.scss +1 -1
- package/index.css +2 -2
- package/intranet.css +2 -2
- package/package.json +3 -3
- package/post-external.css +2 -2
- package/post-internal.css +2 -2
- package/tokens/temp/channel.scss +1 -1
- package/tokens/temp/components.scss +1 -1
- package/tokens/temp/core.scss +1 -1
- package/tokens/temp/device.scss +1 -1
- package/tokens/temp/index.scss +1 -1
- package/tokens/temp/mode.scss +1 -1
- package/tokens/temp/theme.scss +1 -1
- package/variables/_animation.scss +19 -0
package/components/_index.scss
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dialog{box-shadow:1px 6px 8px rgba(0,0,0,.1),2px 8px 20px 8px rgba(0,0,0,.14);padding:0;min-width:min(389px,90vw);max-width:590px;max-height:90vh;overflow:auto;margin:revert;overscroll-behavior:contain;border:2px solid var(--post-contrast-color)}dialog::backdrop{background-color:rgba(0,0,0,.8);-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){dialog{border-width:2px}dialog::backdrop{background-image:linear-gradient(135deg, CanvasText 4.55%, transparent 4.55%, transparent 50%, CanvasText 50%, CanvasText 54.55%, transparent 54.55%, transparent 100%);background-size:22px 22px;-webkit-backdrop-filter:none;backdrop-filter:none;background-color:rgba(0,0,0,0);forced-color-adjust:none}}dialog[data-size=small]{min-width:296px;max-width:388px}dialog[data-size=large]{min-width:min(600px,90vw);max-width:792px}dialog[data-position=top]{top:2rem;bottom:auto}dialog[data-position=bottom]{top:auto;bottom:2rem}dialog>.dialog-grid{margin:1rem 1rem 0 1rem;display:grid;column-gap:1rem;grid-template-columns:auto 1fr auto;grid-template-areas:"icon header close-button" "icon body close-button" "controls controls controls";background-color:inherit}:where(.dialog-icon,.dialog-header,.dialog-body,.dialog-controls,.dialog-close):empty{display:none}.dialog-grid>post-icon{grid-area:icon;display:block;width:2rem;height:2rem}@media(min-width: 600px){dialog:not([size=small]) .dialog-grid>post-icon{width:3rem;height:3rem}}.dialog-header{grid-area:header;margin-top:0}.dialog-body{grid-area:body;margin-bottom:0}.dialog-body>*:last-child{margin-bottom:0}.dialog-controls{grid-area:controls;position:sticky;bottom:0;padding-block:1rem;display:flex;flex-wrap:wrap;flex-direction:row-reverse;gap:1rem;background-color:inherit}@media(max-width: 399.98px){.dialog-controls button{width:100%}}.dialog-grid>.btn-close{position:sticky;top:0;grid-area:close-button;width:1.5rem;height:1.5rem;min-height:0}dialog:not([data-animation=none]){--_dialog-transition-duration: var(--dialog-transition-duration, 0.5s);transform:scale(0.8);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--_dialog-transition-duration);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}dialog:not([data-animation=none])::backdrop{opacity:0;transition:opacity var(--_dialog-transition-duration),overlay var(--_dialog-transition-duration) allow-discrete,display var(--_dialog-transition-duration) allow-discrete,-webkit-backdrop-filter var(--_dialog-transition-duration);transition:backdrop-filter var(--_dialog-transition-duration),opacity var(--_dialog-transition-duration),overlay var(--_dialog-transition-duration) allow-discrete,display var(--_dialog-transition-duration) allow-discrete;transition:backdrop-filter var(--_dialog-transition-duration),opacity var(--_dialog-transition-duration),overlay var(--_dialog-transition-duration) allow-discrete,display var(--_dialog-transition-duration) allow-discrete,-webkit-backdrop-filter var(--_dialog-transition-duration)}dialog:not([data-animation=none])[open]{transform:scale(1);opacity:1}@starting-style{dialog:not([data-animation=none])[open]{opacity:0;transform:scale(0.8)}}dialog:not([data-animation=none])[open]::backdrop{opacity:1;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}@starting-style{dialog:not([data-animation=none])[open]::backdrop{opacity:0;-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0)}}@media(forced-colors: active){dialog:not([data-animation=none])[open]::backdrop{-webkit-backdrop-filter:none;backdrop-filter:none}}dialog:not([data-animation=none])[data-animation=slide-in]{transform:translateY(calc(var(--_dialog-slide-in-offset)))}dialog:not([data-animation=none])[data-animation=slide-in][data-position=top]{--_dialog-slide-in-offset: -3rem}dialog:not([data-animation=none])[data-animation=slide-in][data-position=bottom]{--_dialog-slide-in-offset: 3rem}dialog:not([data-animation=none])[data-animation=slide-in][open]{transform:translateY(0)}@starting-style{dialog:not([data-animation=none])[data-animation=slide-in][open]{transform:translateY(calc(var(--_dialog-slide-in-offset)))}}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
@use '../mixins/elevation';
|
|
2
|
+
@use '../mixins/utilities';
|
|
3
|
+
@use '../variables/spacing';
|
|
4
|
+
@use '../variables/color';
|
|
5
|
+
@use '../variables/animation';
|
|
6
|
+
|
|
7
|
+
@use './../themes/bootstrap/core' as *;
|
|
8
|
+
|
|
9
|
+
dialog {
|
|
10
|
+
@include elevation.elevation('elevation-5');
|
|
11
|
+
|
|
12
|
+
padding: 0;
|
|
13
|
+
min-width: min(389px, 90vw);
|
|
14
|
+
max-width: 590px;
|
|
15
|
+
max-height: 90vh;
|
|
16
|
+
overflow: auto;
|
|
17
|
+
margin: revert;
|
|
18
|
+
overscroll-behavior: contain;
|
|
19
|
+
border: 2px solid var(--post-contrast-color); // Ensures good contrast when bg is dark against dark backdrop
|
|
20
|
+
|
|
21
|
+
&::backdrop {
|
|
22
|
+
background-color: rgba(0, 0, 0, 0.8);
|
|
23
|
+
-webkit-backdrop-filter: blur(0);
|
|
24
|
+
backdrop-filter: blur(0);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@include utilities.high-contrast-mode {
|
|
28
|
+
// Show the border in HCM
|
|
29
|
+
border-width: 2px;
|
|
30
|
+
|
|
31
|
+
// Mark the backdrop as inactive in HCM
|
|
32
|
+
&::backdrop {
|
|
33
|
+
background-image: linear-gradient(
|
|
34
|
+
135deg,
|
|
35
|
+
CanvasText 4.55%,
|
|
36
|
+
transparent 4.55%,
|
|
37
|
+
transparent 50%,
|
|
38
|
+
CanvasText 50%,
|
|
39
|
+
CanvasText 54.55%,
|
|
40
|
+
transparent 54.55%,
|
|
41
|
+
transparent 100%
|
|
42
|
+
);
|
|
43
|
+
background-size: 22px 22px;
|
|
44
|
+
-webkit-backdrop-filter: none;
|
|
45
|
+
backdrop-filter: none;
|
|
46
|
+
background-color: transparent;
|
|
47
|
+
forced-color-adjust: none;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Sizes
|
|
52
|
+
// [small, medium (default), large]
|
|
53
|
+
&[data-size='small'] {
|
|
54
|
+
min-width: 296px;
|
|
55
|
+
max-width: 388px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&[data-size='large'] {
|
|
59
|
+
min-width: min(600px, 90vw);
|
|
60
|
+
max-width: 792px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Positioning
|
|
64
|
+
// [top, center (default), bottom]
|
|
65
|
+
&[data-position='top'] {
|
|
66
|
+
top: 2rem;
|
|
67
|
+
bottom: auto;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&[data-position='bottom'] {
|
|
71
|
+
top: auto;
|
|
72
|
+
bottom: 2rem;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
dialog > .dialog-grid {
|
|
77
|
+
margin: spacing.$size-regular spacing.$size-regular 0 spacing.$size-regular;
|
|
78
|
+
display: grid;
|
|
79
|
+
column-gap: spacing.$size-regular;
|
|
80
|
+
grid-template-columns: auto 1fr auto;
|
|
81
|
+
grid-template-areas:
|
|
82
|
+
'icon header close-button'
|
|
83
|
+
'icon body close-button'
|
|
84
|
+
'controls controls controls';
|
|
85
|
+
|
|
86
|
+
// Propagate bg color to the controls
|
|
87
|
+
background-color: inherit;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:where(.dialog-icon, .dialog-header, .dialog-body, .dialog-controls, .dialog-close):empty {
|
|
91
|
+
display: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.dialog-grid > post-icon {
|
|
95
|
+
grid-area: icon;
|
|
96
|
+
display: block;
|
|
97
|
+
|
|
98
|
+
width: spacing.$size-big;
|
|
99
|
+
height: spacing.$size-big;
|
|
100
|
+
|
|
101
|
+
// Larger icon for bigger notification dialogs
|
|
102
|
+
dialog:not([size='small']) & {
|
|
103
|
+
@include media-breakpoint-up(rg) {
|
|
104
|
+
width: spacing.$size-small-huge;
|
|
105
|
+
height: spacing.$size-small-huge;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.dialog-header {
|
|
111
|
+
grid-area: header;
|
|
112
|
+
margin-top: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.dialog-body {
|
|
116
|
+
grid-area: body;
|
|
117
|
+
margin-bottom: 0;
|
|
118
|
+
|
|
119
|
+
> *:last-child {
|
|
120
|
+
margin-bottom: 0;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.dialog-controls {
|
|
125
|
+
grid-area: controls;
|
|
126
|
+
position: sticky;
|
|
127
|
+
bottom: 0;
|
|
128
|
+
padding-block: spacing.$size-regular;
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-wrap: wrap;
|
|
131
|
+
flex-direction: row-reverse;
|
|
132
|
+
gap: spacing.$size-regular;
|
|
133
|
+
background-color: inherit;
|
|
134
|
+
|
|
135
|
+
button {
|
|
136
|
+
@include media-breakpoint-down(sm) {
|
|
137
|
+
width: 100%;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.dialog-grid > .btn-close {
|
|
143
|
+
position: sticky;
|
|
144
|
+
top: 0;
|
|
145
|
+
grid-area: close-button;
|
|
146
|
+
width: spacing.$size-large;
|
|
147
|
+
height: spacing.$size-large;
|
|
148
|
+
min-height: 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Animations
|
|
152
|
+
// [slide-in, pop-in, none]
|
|
153
|
+
// Progressively enhanced with currently experimental @starting-style which allows to animate stuff appearing in the top layer
|
|
154
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/@starting-style
|
|
155
|
+
dialog:not([data-animation='none']) {
|
|
156
|
+
--_dialog-transition-duration: var(--dialog-transition-duration, 0.5s);
|
|
157
|
+
|
|
158
|
+
transform: scale(0.8);
|
|
159
|
+
opacity: 0;
|
|
160
|
+
transition-property: transform, opacity, overlay, display;
|
|
161
|
+
transition-behavior: allow-discrete;
|
|
162
|
+
transition-duration: var(--_dialog-transition-duration);
|
|
163
|
+
transition-timing-function: linear(
|
|
164
|
+
0,
|
|
165
|
+
0.007,
|
|
166
|
+
0.029 2.2%,
|
|
167
|
+
0.118 4.7%,
|
|
168
|
+
0.625 14.4%,
|
|
169
|
+
0.826 19%,
|
|
170
|
+
0.902,
|
|
171
|
+
0.962,
|
|
172
|
+
1.008 26.1%,
|
|
173
|
+
1.041 28.7%,
|
|
174
|
+
1.064 32.1%,
|
|
175
|
+
1.07 36%,
|
|
176
|
+
1.061 40.5%,
|
|
177
|
+
1.015 53.4%,
|
|
178
|
+
0.999 61.6%,
|
|
179
|
+
0.995 71.2%,
|
|
180
|
+
1
|
|
181
|
+
);
|
|
182
|
+
|
|
183
|
+
&::backdrop {
|
|
184
|
+
opacity: 0;
|
|
185
|
+
transition:
|
|
186
|
+
opacity var(--_dialog-transition-duration),
|
|
187
|
+
overlay var(--_dialog-transition-duration) allow-discrete,
|
|
188
|
+
display var(--_dialog-transition-duration) allow-discrete,
|
|
189
|
+
-webkit-backdrop-filter var(--_dialog-transition-duration);
|
|
190
|
+
transition:
|
|
191
|
+
backdrop-filter var(--_dialog-transition-duration),
|
|
192
|
+
opacity var(--_dialog-transition-duration),
|
|
193
|
+
overlay var(--_dialog-transition-duration) allow-discrete,
|
|
194
|
+
display var(--_dialog-transition-duration) allow-discrete;
|
|
195
|
+
transition:
|
|
196
|
+
backdrop-filter var(--_dialog-transition-duration),
|
|
197
|
+
opacity var(--_dialog-transition-duration),
|
|
198
|
+
overlay var(--_dialog-transition-duration) allow-discrete,
|
|
199
|
+
display var(--_dialog-transition-duration) allow-discrete,
|
|
200
|
+
-webkit-backdrop-filter var(--_dialog-transition-duration);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
&[open] {
|
|
204
|
+
transform: scale(1);
|
|
205
|
+
opacity: 1;
|
|
206
|
+
|
|
207
|
+
@starting-style {
|
|
208
|
+
opacity: 0;
|
|
209
|
+
transform: scale(0.8);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
&::backdrop {
|
|
213
|
+
opacity: 1;
|
|
214
|
+
-webkit-backdrop-filter: blur(10px);
|
|
215
|
+
backdrop-filter: blur(10px);
|
|
216
|
+
|
|
217
|
+
@starting-style {
|
|
218
|
+
opacity: 0;
|
|
219
|
+
-webkit-backdrop-filter: blur(0);
|
|
220
|
+
backdrop-filter: blur(0);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@media (forced-colors: active) {
|
|
224
|
+
-webkit-backdrop-filter: none;
|
|
225
|
+
backdrop-filter: none;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&[data-animation='slide-in'] {
|
|
231
|
+
&[data-position='top'] {
|
|
232
|
+
--_dialog-slide-in-offset: -3rem;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&[data-position='bottom'] {
|
|
236
|
+
--_dialog-slide-in-offset: 3rem;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
transform: translateY(calc(var(--_dialog-slide-in-offset)));
|
|
240
|
+
|
|
241
|
+
&[open] {
|
|
242
|
+
transform: translateY(0);
|
|
243
|
+
|
|
244
|
+
@starting-style {
|
|
245
|
+
transform: translateY(calc(var(--_dialog-slide-in-offset)));
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
package/components/stepper.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.stepper-container{margin-bottom:1.25rem}@media(min-width: 780px){.stepper-container{margin-bottom:2rem}}@media(min-width: 1280px){.stepper-container{margin-bottom:2.5rem}}.stepper-container>.stepper-bar{display:none}.stepper{counter-reset:step-index;margin:0;padding:0;list-style:none;display:grid;position:relative;overflow:hidden;grid-template-columns:1.25rem;grid-auto-columns:minmax(0, 1fr);padding-inline-end:1.25rem}.stepper-item{grid-row:1;position:relative}.stepper-item:not(:first-child){padding-inline-start:.5rem}.stepper-item:not(:last-child){padding-inline-end:.5rem;grid-column:span 2}.stepper-item::before,.stepper-item::after{content:"";display:block;position:absolute;inset-block-start:1.125rem;height:.25rem;background-color:#999;inset-inline:0}.stepper-item:not(:first-child,:last-child)::before{inset-inline-end:50%}.stepper-item:not(:first-child,:last-child)::after{inset-inline-start:50%}.stepper-item:not(.stepper-item[aria-current=step]~*,:first-child)::before,.stepper-item:not([aria-current=step]:not(:last-child),.stepper-item[aria-current=step]~*)::after{background-color:#fc0;z-index:1}.stepper-link{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;position:relative;z-index:2;overflow:hidden;text-decoration:none;color:var(--post-gray-60);width:-moz-fit-content;width:fit-content;line-height:1.2}.stepper-link:not([title]){-webkit-line-clamp:initial}.stepper-item:not(:first-child,:last-child)>.stepper-link{margin-inline:auto;text-align:center}.stepper-item:last-child>.stepper-link{margin-inline-start:auto;margin-inline-end:-1.25rem;text-align:end}.stepper-item[aria-current=step]>.stepper-link{color:var(--post-gray-80);font-weight:700}.stepper-link::before{counter-increment:step-index;content:counter(step-index);display:flex;align-items:center;justify-content:center;z-index:1;height:2.5rem;width:2.5rem;box-sizing:border-box;margin-block-end:.5rem;color:#000;background-color:#fc0;border:.25rem solid rgb(var(--post-bg-rgb, 255 255 255));border-radius:50%;font-weight:700;text-indent:initial;transition:color 250ms cubic-bezier(0.4, 0, 0.2, 1),background-color 250ms cubic-bezier(0.4, 0, 0.2, 1)}.stepper-item:not(:first-child,:last-child)>.stepper-link::before{margin-inline:auto}.stepper-item:last-child>.stepper-link::before{margin-inline-start:auto}.stepper-item:not([aria-current=step],.stepper-item[aria-current=step]~*)>.stepper-link::before{color:rgba(0,0,0,0)}.stepper-item[aria-current=step]~.stepper-item>.stepper-link::before{color:#fff;background-color:#666}.stepper-link::after{-webkit-mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/svg%3E");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;display:block;position:absolute;top:.5rem;z-index:1;height:1.5rem;width:1.5rem;transition:color 250ms cubic-bezier(0.4, 0, 0.2, 1),background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);color:#000}.stepper-item:first-child>.stepper-link::after{left:.5rem}.stepper-item:not(:first-child,:last-child)>.stepper-link::after{left:calc(50% - 0.75rem)}.stepper-item:last-child>.stepper-link::after{right:.5rem}.stepper-item:not([aria-current=step],.stepper-item[aria-current=step]~*)>.stepper-link::after{content:""}.stepper-link:is(a[href]){outline-style:none !important;outline-offset:2px !important;outline-width:2px !important;outline-color:var(--post-focus-color) !important}.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:solid !important;border-radius:4px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus){outline-style:solid !important;border-radius:4px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus){color:var(--post-gray-60)}.stepper-item[aria-current=step]>.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus){color:var(--post-gray-80)}.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus)::before,.stepper-item[aria-current=step]~.stepper-item>.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus)::before{color:var(--post-contrast-color-inverted);background-color:var(--post-contrast-color)}.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus)::after{color:var(--post-contrast-color-inverted)}@supports not selector(:has(:focus-visible)){.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus){color:var(--post-gray-60)}.stepper-item[aria-current=step]>.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus){color:var(--post-gray-80)}.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus)::before,.stepper-item[aria-current=step]~.stepper-item>.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus)::before{color:var(--post-contrast-color-inverted);background-color:var(--post-contrast-color)}.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus)::after{color:var(--post-contrast-color-inverted)}}.stepper-link:is(a[href]):hover{color:var(--post-gray-60)}.stepper-item[aria-current=step]>.stepper-link:is(a[href]):hover{color:var(--post-gray-80)}.stepper-link:is(a[href]):hover::before,.stepper-item[aria-current=step]~.stepper-item>.stepper-link:is(a[href]):hover::before{color:var(--post-contrast-color-inverted);background-color:var(--post-contrast-color)}.stepper-link:is(a[href]):hover::after{color:var(--post-contrast-color-inverted)}@media(max-width: 599.98px){.stepper-item:first-child,.stepper-item:last-child{padding-inline:0}.stepper-item[aria-current=step]{display:contents}.stepper-item[aria-current=step]>.stepper-link{display:contents}.stepper-item[aria-current=step]::before{grid-row:-1;margin-block-start:1.125rem;position:static}.stepper-item[aria-current=step]:not(:last-child)>.stepper-link::before{grid-row:-1}.stepper-item[aria-current=step]:not(:first-child,:last-child)::after{inset-inline-start:0}.stepper-item:not([aria-current=step]){grid-row:-1;justify-self:stretch}.stepper-item:not([aria-current=step])>.stepper-link{-webkit-line-clamp:initial;line-height:0;text-indent:100%}.stepper-link{white-space:nowrap;width:100%}.stepper-item[aria-current=step]:first-child>.stepper-link::before{order:-1}.stepper-item[aria-current=step]:not(:first-child,:last-child)>.stepper-link::before{margin-inline-start:0;transform:translateX(-50%)}.stepper-item[aria-current=step]:last-child>.stepper-link::before{position:absolute;z-index:2;inset-block-start:0;inset-inline-end:0}}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.stepper-item::before,.stepper-item::after{background-color:CanvasText}.stepper-item:not(.stepper-item[aria-current=step]~.stepper-item,:first-child)::before,.stepper-item:not([aria-current=step]:not(:last-child),.stepper-item[aria-current=step]~*)::after{background-color:Highlight}.stepper-link::before{forced-color-adjust:none}.stepper-item[aria-current=step]>.stepper-link::before{background-color:Canvas;color:CanvasText}.stepper-item[aria-current=step]~.stepper-item>.stepper-link::before,.stepper-item:not([aria-current=step])>.stepper-link::before{color:Canvas;border-color:Canvas;background-color:CanvasText}.stepper-link::after{color:Canvas}.stepper-item[aria-current=step]>.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus)::before{border-color:Highlight}@supports not selector(:has(:focus-visible)){.stepper-item[aria-current=step]>.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus)::before{border-color:Highlight}}.stepper-item[aria-current=step]>.stepper-link:is(a[href]):hover::before{border-color:Highlight}.stepper-item[aria-current=step]~.stepper-item>.stepper-link:is(a[href])::before{color:Canvas}.stepper-item[aria-current=step]~.stepper-item>.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus)::before{background-color:Highlight;color:HighlightText}@supports not selector(:has(:focus-visible)){.stepper-item[aria-current=step]~.stepper-item>.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus)::before{background-color:Highlight;color:HighlightText}}.stepper-item[aria-current=step]~.stepper-item>.stepper-link:is(a[href]):hover::before{background-color:Highlight;color:HighlightText}.stepper-item:not([aria-current=step])>.stepper-link:is(a[href])::before{background-color:LinkText}.stepper-item:not([aria-current=step])>.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus)::before{background-color:Highlight}.stepper-item:not([aria-current=step])>.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus)::after{color:HighlightText}@supports not selector(:has(:focus-visible)){.stepper-item:not([aria-current=step])>.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus)::before{background-color:Highlight}.stepper-item:not([aria-current=step])>.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus)::after{color:HighlightText}}.stepper-item:not([aria-current=step])>.stepper-link:is(a[href]):hover::before{background-color:Highlight}.stepper-item:not([aria-current=step])>.stepper-link:is(a[href]):hover::after{color:HighlightText}}
|
|
1
|
+
.stepper-container{margin-bottom:1.25rem}@media(min-width: 780px){.stepper-container{margin-bottom:2rem}}@media(min-width: 1280px){.stepper-container{margin-bottom:2.5rem}}.stepper-container>.stepper-bar{display:none}.stepper{counter-reset:step-index;margin:0;padding:0;list-style:none;display:grid;position:relative;overflow:hidden;grid-template-columns:1.25rem;grid-auto-columns:minmax(0, 1fr);padding-inline-end:1.25rem}.stepper-item{grid-row:1;position:relative}.stepper-item:not(:first-child){padding-inline-start:.5rem}.stepper-item:not(:last-child){padding-inline-end:.5rem;grid-column:span 2}.stepper-item::before,.stepper-item::after{content:"";display:block;position:absolute;inset-block-start:1.125rem;height:.25rem;background-color:#999;inset-inline:0}.stepper-item:not(:first-child,:last-child)::before{inset-inline-end:50%}.stepper-item:not(:first-child,:last-child)::after{inset-inline-start:50%}.stepper-item:not(.stepper-item[aria-current=step]~*,:first-child)::before,.stepper-item:not([aria-current=step]:not(:last-child),.stepper-item[aria-current=step]~*)::after{background-color:#fc0;z-index:1}.stepper-link{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;counter-increment:step-index;position:relative;z-index:2;overflow:hidden;text-decoration:none;color:var(--post-gray-60);width:-moz-fit-content;width:fit-content;line-height:1.2}.stepper-link:not([title]){-webkit-line-clamp:initial}.stepper-item:not(:first-child,:last-child)>.stepper-link{margin-inline:auto;text-align:center}.stepper-item:last-child>.stepper-link{margin-inline-start:auto;margin-inline-end:-1.25rem;text-align:end}.stepper-item[aria-current=step]>.stepper-link{color:var(--post-gray-80);font-weight:700}.stepper-link::before{content:counter(step-index);display:flex;align-items:center;justify-content:center;z-index:1;height:2.5rem;width:2.5rem;box-sizing:border-box;margin-block-end:.5rem;color:#000;background-color:#fc0;border:.25rem solid rgb(var(--post-bg-rgb, 255 255 255));border-radius:50%;font-weight:700;text-indent:initial;transition:color 250ms cubic-bezier(0.4, 0, 0.2, 1),background-color 250ms cubic-bezier(0.4, 0, 0.2, 1)}.stepper-item:not(:first-child,:last-child)>.stepper-link::before{margin-inline:auto}.stepper-item:last-child>.stepper-link::before{margin-inline-start:auto}.stepper-item:not([aria-current=step],.stepper-item[aria-current=step]~*)>.stepper-link::before{color:rgba(0,0,0,0)}.stepper-item[aria-current=step]~.stepper-item>.stepper-link::before{color:#fff;background-color:#666}.stepper-link::after{-webkit-mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/svg%3E");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;display:block;position:absolute;top:.5rem;z-index:1;height:1.5rem;width:1.5rem;transition:color 250ms cubic-bezier(0.4, 0, 0.2, 1),background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);color:#000}.stepper-item:first-child>.stepper-link::after{left:.5rem}.stepper-item:not(:first-child,:last-child)>.stepper-link::after{left:calc(50% - 0.75rem)}.stepper-item:last-child>.stepper-link::after{right:.5rem}.stepper-item:not([aria-current=step],.stepper-item[aria-current=step]~*)>.stepper-link::after{content:""}.stepper-link:is(a[href]){outline-style:none !important;outline-offset:2px !important;outline-width:2px !important;outline-color:var(--post-focus-color) !important}.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:solid !important;border-radius:4px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus){outline-style:solid !important;border-radius:4px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus){color:var(--post-gray-60)}.stepper-item[aria-current=step]>.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus){color:var(--post-gray-80)}.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus)::before,.stepper-item[aria-current=step]~.stepper-item>.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus)::before{color:var(--post-contrast-color-inverted);background-color:var(--post-contrast-color)}.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus)::after{color:var(--post-contrast-color-inverted)}@supports not selector(:has(:focus-visible)){.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus){color:var(--post-gray-60)}.stepper-item[aria-current=step]>.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus){color:var(--post-gray-80)}.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus)::before,.stepper-item[aria-current=step]~.stepper-item>.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus)::before{color:var(--post-contrast-color-inverted);background-color:var(--post-contrast-color)}.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus)::after{color:var(--post-contrast-color-inverted)}}.stepper-link:is(a[href]):hover{color:var(--post-gray-60)}.stepper-item[aria-current=step]>.stepper-link:is(a[href]):hover{color:var(--post-gray-80)}.stepper-link:is(a[href]):hover::before,.stepper-item[aria-current=step]~.stepper-item>.stepper-link:is(a[href]):hover::before{color:var(--post-contrast-color-inverted);background-color:var(--post-contrast-color)}.stepper-link:is(a[href]):hover::after{color:var(--post-contrast-color-inverted)}@media(max-width: 599.98px){.stepper-item:first-child,.stepper-item:last-child{padding-inline:0}.stepper-item[aria-current=step]{display:contents}.stepper-item[aria-current=step]>.stepper-link{display:contents}.stepper-item[aria-current=step]::before{grid-row:-1;margin-block-start:1.125rem;position:static}.stepper-item[aria-current=step]:not(:last-child)>.stepper-link::before{grid-row:-1}.stepper-item[aria-current=step]:not(:first-child,:last-child)::after{inset-inline-start:0}.stepper-item:not([aria-current=step]){grid-row:-1;justify-self:stretch}.stepper-item:not([aria-current=step])>.stepper-link{-webkit-line-clamp:initial;line-height:0;text-indent:100%}.stepper-link{white-space:nowrap;width:100%}.stepper-item[aria-current=step]:first-child>.stepper-link::before{order:-1}.stepper-item[aria-current=step]:not(:first-child,:last-child)>.stepper-link::before{margin-inline-start:0;transform:translateX(-50%)}.stepper-item[aria-current=step]:last-child>.stepper-link::before{position:absolute;z-index:2;inset-block-start:0;inset-inline-end:0}}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.stepper-item::before,.stepper-item::after{background-color:CanvasText}.stepper-item:not(.stepper-item[aria-current=step]~.stepper-item,:first-child)::before,.stepper-item:not([aria-current=step]:not(:last-child),.stepper-item[aria-current=step]~*)::after{background-color:Highlight}.stepper-link::before{forced-color-adjust:none}.stepper-item[aria-current=step]>.stepper-link::before{background-color:Canvas;color:CanvasText}.stepper-item[aria-current=step]~.stepper-item>.stepper-link::before,.stepper-item:not([aria-current=step])>.stepper-link::before{color:Canvas;border-color:Canvas;background-color:CanvasText}.stepper-link::after{color:Canvas}.stepper-item[aria-current=step]>.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus)::before{border-color:Highlight}@supports not selector(:has(:focus-visible)){.stepper-item[aria-current=step]>.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus)::before{border-color:Highlight}}.stepper-item[aria-current=step]>.stepper-link:is(a[href]):hover::before{border-color:Highlight}.stepper-item[aria-current=step]~.stepper-item>.stepper-link:is(a[href])::before{color:Canvas}.stepper-item[aria-current=step]~.stepper-item>.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus)::before{background-color:Highlight;color:HighlightText}@supports not selector(:has(:focus-visible)){.stepper-item[aria-current=step]~.stepper-item>.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus)::before{background-color:Highlight;color:HighlightText}}.stepper-item[aria-current=step]~.stepper-item>.stepper-link:is(a[href]):hover::before{background-color:Highlight;color:HighlightText}.stepper-item:not([aria-current=step])>.stepper-link:is(a[href])::before{background-color:LinkText}.stepper-item:not([aria-current=step])>.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus)::before{background-color:Highlight}.stepper-item:not([aria-current=step])>.stepper-link:is(a[href]):is(:focus-visible,:has(:focus-visible),.pretend-focus)::after{color:HighlightText}@supports not selector(:has(:focus-visible)){.stepper-item:not([aria-current=step])>.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus)::before{background-color:Highlight}.stepper-item:not([aria-current=step])>.stepper-link:is(a[href]):is(:focus-visible,:focus-within,.pretend-focus)::after{color:HighlightText}}.stepper-item:not([aria-current=step])>.stepper-link:is(a[href]):hover::before{background-color:Highlight}.stepper-item:not([aria-current=step])>.stepper-link:is(a[href]):hover::after{color:HighlightText}}
|
package/components/stepper.scss
CHANGED
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
display: -webkit-box;
|
|
89
89
|
-webkit-box-orient: vertical;
|
|
90
90
|
-webkit-line-clamp: 2;
|
|
91
|
+
counter-increment: step-index;
|
|
91
92
|
position: relative;
|
|
92
93
|
z-index: 2;
|
|
93
94
|
overflow: hidden;
|
|
@@ -121,7 +122,6 @@
|
|
|
121
122
|
|
|
122
123
|
// step indicator
|
|
123
124
|
.stepper-link::before {
|
|
124
|
-
counter-increment: step-index;
|
|
125
125
|
content: counter(step-index);
|
|
126
126
|
display: flex;
|
|
127
127
|
align-items: center;
|