Debian Codegraph @

node/@patternfly/patternfly/components/ProgressStepper/progress-stepper.scss

raw
1 @use '../../sass-utilities' as *;
2
3 $pf-v6-c-progress-stepper--breakpoint-map: build-breakpoint-map();
4
5 // Default layout is vertical
6 @mixin pf-v6-c-progress-stepper--m-vertical {
7 --#{$progress-stepper}--GridAutoFlow: var(--#{$progress-stepper}--m-vertical--GridAutoFlow);
8 --#{$progress-stepper}--GridTemplateColumns: var(--#{$progress-stepper}--m-vertical--GridTemplateColumns);
9 --#{$progress-stepper}__step-connector--before--InsetBlockStart: var(--#{$progress-stepper}--m-vertical__step-connector--before--InsetBlockStart);
10 --#{$progress-stepper}__step-connector--before--InsetInlineStart: var(--#{$progress-stepper}--m-vertical__step-connector--before--InsetInlineStart);
11 --#{$progress-stepper}__step-connector--before--Width: var(--#{$progress-stepper}--m-vertical__step-connector--before--Width);
12 --#{$progress-stepper}__step-connector--before--Height: var(--#{$progress-stepper}--m-vertical__step-connector--before--Height);
13 --#{$progress-stepper}__step-connector--before--BorderInlineEndWidth: var(--#{$progress-stepper}--m-vertical__step-connector--before--BorderInlineEndWidth);
14 --#{$progress-stepper}__step-connector--before--BorderInlineEndColor: var(--#{$progress-stepper}--m-vertical__step-connector--before--BorderInlineEndColor);
15 --#{$progress-stepper}__step-connector--before--BorderBlockEndWidth: var(--#{$progress-stepper}--m-vertical__step-connector--before--BorderBlockEndWidth);
16 --#{$progress-stepper}__step-connector--before--BorderBlockEndColor: var(--#{$progress-stepper}--m-vertical__step-connector--before--BorderBlockEndColor);
17 --#{$progress-stepper}__step-connector--before--Transform: var(--#{$progress-stepper}--m-vertical__step-connector--before--Transform);
18 --#{$progress-stepper}__step-main--MarginBlockStart: var(--#{$progress-stepper}--m-vertical__step-main--MarginBlockStart);
19 --#{$progress-stepper}__step-main--MarginInlineEnd: var(--#{$progress-stepper}--m-vertical__step-main--MarginInlineEnd);
20 --#{$progress-stepper}__step-main--MarginBlockEnd: var(--#{$progress-stepper}--m-vertical__step-main--MarginBlockEnd);
21 --#{$progress-stepper}__step-main--MarginInlineStart: var(--#{$progress-stepper}--m-vertical__step-main--MarginInlineStart);
22
23 // Compact vertical
24 --#{$progress-stepper}--m-compact--GridTemplateColumns: var(--#{$progress-stepper}--m-vertical--m-compact--GridTemplateColumns);
25 --#{$progress-stepper}--m-compact__step-connector--GridRow: var(--#{$progress-stepper}--m-vertical--m-compact__step-connector--GridRow);
26 --#{$progress-stepper}--m-compact__step-connector--PaddingBlockEnd: var(--#{$progress-stepper}--m-vertical--m-compact__step-connector--PaddingBlockEnd);
27
28 // Center
29 --#{$progress-stepper}--m-center__step-connector--before--Content: none; // border swap
30 --#{$progress-stepper}--m-center__step-main--before--Content: ""; // border swap
31 }
32
33 @mixin pf-v6-c-progress-stepper--m-horizontal {
34 --#{$progress-stepper}--GridAutoFlow: var(--#{$progress-stepper}--m-horizontal--GridAutoFlow);
35 --#{$progress-stepper}--GridTemplateColumns: var(--#{$progress-stepper}--m-horizontal--GridTemplateColumns);
36 --#{$progress-stepper}__step-connector--before--InsetBlockStart: var(--#{$progress-stepper}--m-horizontal__step-connector--before--InsetBlockStart);
37 --#{$progress-stepper}__step-connector--before--InsetInlineStart: var(--#{$progress-stepper}--m-horizontal__step-connector--before--InsetInlineStart);
38 --#{$progress-stepper}__step-connector--before--Width: var(--#{$progress-stepper}--m-horizontal__step-connector--before--Width);
39 --#{$progress-stepper}__step-connector--before--Height: var(--#{$progress-stepper}--m-horizontal__step-connector--before--Height);
40 --#{$progress-stepper}__step-connector--before--BorderInlineEndWidth: var(--#{$progress-stepper}--m-horizontal__step-connector--before--BorderInlineEndWidth);
41 --#{$progress-stepper}__step-connector--before--BorderInlineEndColor: var(--#{$progress-stepper}--m-horizontal__step-connector--before--BorderInlineEndColor);
42 --#{$progress-stepper}__step-connector--before--BorderBlockEndWidth: var(--#{$progress-stepper}--m-horizontal__step-connector--before--BorderBlockEndWidth);
43 --#{$progress-stepper}__step-connector--before--BorderBlockEndColor: var(--#{$progress-stepper}--m-horizontal__step-connector--before--BorderBlockEndColor);
44 --#{$progress-stepper}__step-connector--before--Transform: var(--#{$progress-stepper}--m-horizontal__step-connector--before--Transform);
45 --#{$progress-stepper}__step-main--MarginBlockStart: var(--#{$progress-stepper}--m-horizontal__step-main--MarginBlockStart);
46 --#{$progress-stepper}__step-main--MarginInlineEnd: var(--#{$progress-stepper}--m-horizontal__step-main--MarginInlineEnd);
47 --#{$progress-stepper}__step-main--MarginBlockEnd: var(--#{$progress-stepper}--m-horizontal__step-main--MarginBlockEnd);
48 --#{$progress-stepper}__step-main--MarginInlineStart: var(--#{$progress-stepper}--m-horizontal__step-main--MarginInlineStart);
49
50 // Compact horizontal
51 --#{$progress-stepper}--m-compact--GridTemplateColumns: var(--#{$progress-stepper}--m-horizontal--m-compact--GridTemplateColumns);
52 --#{$progress-stepper}--m-compact__step-connector--GridRow: var(--#{$progress-stepper}--m-horizontal--m-compact__step-connector--GridRow);
53 --#{$progress-stepper}--m-compact__step-connector--PaddingBlockEnd: var(--#{$progress-stepper}--m-horizontal--m-compact__step-connector--PaddingBlockEnd);
54
55 // Center
56 --#{$progress-stepper}--m-center__step-connector--before--Content: ""; // border swap
57 --#{$progress-stepper}--m-center__step-main--before--Content: none; // border swap
58 }
59
60 // Progress stepper is vertically oriented by default
61 @include pf-root($progress-stepper) {
62 // Vertical - these are the default settings
63 --#{$progress-stepper}--m-vertical--GridAutoFlow: row;
64 --#{$progress-stepper}--m-vertical--GridTemplateColumns: auto 1fr;
65 --#{$progress-stepper}--m-vertical__step-connector--before--InsetBlockStart: 0;
66 --#{$progress-stepper}--m-vertical__step-connector--before--InsetInlineStart: calc(var(--#{$progress-stepper}__step-icon--Width) / 2);
67 --#{$progress-stepper}--m-vertical__step-connector--before--Width: auto;
68 --#{$progress-stepper}--m-vertical__step-connector--before--Height: 100%;
69 --#{$progress-stepper}--m-vertical__step-connector--before--BorderInlineEndWidth: var(--pf-t--global--border--width--box--default);
70 --#{$progress-stepper}--m-vertical__step-connector--before--BorderInlineEndColor: var(--pf-t--global--border--color--default);
71 --#{$progress-stepper}--m-vertical__step-connector--before--BorderBlockEndWidth: 0;
72 --#{$progress-stepper}--m-vertical__step-connector--before--BorderBlockEndColor: transparent;
73 --#{$progress-stepper}--m-vertical__step-connector--before--Transform: translateX(-50%);
74 --#{$progress-stepper}--m-vertical__step-main--MarginBlockStart: 0px; // needs px for calc
75 --#{$progress-stepper}--m-vertical__step-main--MarginInlineEnd: 0;
76 --#{$progress-stepper}--m-vertical__step-main--MarginBlockEnd: var(--pf-t--global--spacer--xl);
77 --#{$progress-stepper}--m-vertical__step-main--MarginInlineStart: var(--pf-t--global--spacer--sm);
78
79 // Compact, vertical
80 --#{$progress-stepper}--m-vertical--m-compact--GridTemplateColumns: 1fr;
81 --#{$progress-stepper}--m-vertical--m-compact__step-connector--PaddingBlockEnd: var(--pf-t--global--spacer--sm);
82 --#{$progress-stepper}--m-vertical--m-compact__step-connector--GridRow: auto;
83 --#{$progress-stepper}--m-vertical--m-compact__step-main--MarginBlockStart: 0;
84 --#{$progress-stepper}--m-vertical--m-compact__step-main--MarginInlineEnd: 0;
85 --#{$progress-stepper}--m-vertical--m-compact__step-main--MarginInlineStart: 0;
86
87 // Center, vertical
88 --#{$progress-stepper}--m-vertical--m-center__step-main--MarginInlineEnd: 0;
89 --#{$progress-stepper}--m-vertical--m-center__step-main--MarginInlineStart: 0;
90
91 // Horizontal
92 --#{$progress-stepper}--m-horizontal--GridAutoFlow: column;
93 --#{$progress-stepper}--m-horizontal--GridTemplateColumns: initial;
94 --#{$progress-stepper}--m-horizontal__step-connector--before--InsetBlockStart: calc(var(--#{$progress-stepper}__step-icon--Height) / 2);
95 --#{$progress-stepper}--m-horizontal__step-connector--before--InsetInlineStart: 0;
96 --#{$progress-stepper}--m-horizontal__step-connector--before--Width: 100%;
97 --#{$progress-stepper}--m-horizontal__step-connector--before--Height: auto;
98 --#{$progress-stepper}--m-horizontal__step-connector--before--BorderInlineEndWidth: 0;
99 --#{$progress-stepper}--m-horizontal__step-connector--before--BorderInlineEndColor: unset;
100 --#{$progress-stepper}--m-horizontal__step-connector--before--BorderBlockEndWidth: var(--pf-t--global--border--width--divider--default);
101 --#{$progress-stepper}--m-horizontal__step-connector--before--BorderBlockEndColor: var(--pf-t--global--border--color--default);
102 --#{$progress-stepper}--m-horizontal__step-connector--before--Transform: translateY(-50%);
103 --#{$progress-stepper}--m-horizontal__step-main--MarginBlockStart: var(--pf-t--global--spacer--sm);
104 --#{$progress-stepper}--m-horizontal__step-main--MarginInlineEnd: var(--pf-t--global--spacer--sm);
105 --#{$progress-stepper}--m-horizontal__step-main--MarginBlockEnd: 0;
106 --#{$progress-stepper}--m-horizontal__step-main--MarginInlineStart: 0;
107
108 // Compact, horizontal
109 --#{$progress-stepper}--m-horizontal--m-compact--GridTemplateColumns: repeat(auto-fill, #{pf-size-prem(28px)});
110 --#{$progress-stepper}--m-horizontal--m-compact__step-connector--PaddingBlockEnd: 0;
111 --#{$progress-stepper}--m-horizontal--m-compact__step-connector--GridRow: 2;
112
113 // Compact
114 --#{$progress-stepper}--m-compact--GridAutoFlow: row;
115 --#{$progress-stepper}--m-compact__step-main--MarginBlockStart: 0;
116 --#{$progress-stepper}--m-compact__step-main--MarginBlockEnd: var(--pf-t--global--spacer--sm);
117 --#{$progress-stepper}--m-compact__step-connector--MinWidth: #{pf-size-prem(28px)};
118 --#{$progress-stepper}--m-compact__step-icon--Width: #{pf-size-prem(18px)};
119 --#{$progress-stepper}--m-compact__step-icon--FontSize: var(--pf-t--global--icon--size--font--body--sm);
120 --#{$progress-stepper}--m-compact__step-title--FontSize: var(--pf-t--global--font--size--body--lg);
121 --#{$progress-stepper}--m-compact__step-title--FontWeight: var(--pf-t--global--font--weight--body--bold);
122 --#{$progress-stepper}--m-compact__pficon--MarginBlockStart: 2px;
123 --#{$progress-stepper}--m-compact__fa-exclamation-triangle--MarginBlockStart: -3px;
124
125 // Center
126 --#{$progress-stepper}--m-center__step-connector--before--InsetInlineStart: 50%;
127 --#{$progress-stepper}--m-center--GridTemplateColumns: 1fr;
128 --#{$progress-stepper}--m-center__step-connector--JustifyContent: center;
129 --#{$progress-stepper}--m-center__step-main--MarginInlineEnd: var(--pf-t--global--spacer--xs);
130 --#{$progress-stepper}--m-center__step-main--MarginInlineStart: var(--pf-t--global--spacer--xs);
131 --#{$progress-stepper}--m-center__step-main--TextAlign: center;
132 --#{$progress-stepper}--m-center__step-description--MarginInlineEnd: 0;
133 --#{$progress-stepper}--m-center__step-description--MarginInlineStart: 0;
134
135 // Stepper variables
136 --#{$progress-stepper}--GridTemplateRows: auto 1fr;
137
138 // Step connector variables
139 --#{$progress-stepper}__step-connector--JustifyContent: flex-start;
140
141 // Step icon variables
142 --#{$progress-stepper}__step-icon--ZIndex: var(--pf-t--global--z-index--xs);
143 --#{$progress-stepper}__step-icon--Width: #{pf-size-prem(24px)};
144 --#{$progress-stepper}__step-icon--Height: var(--#{$progress-stepper}__step-icon--Width);
145 --#{$progress-stepper}__step-icon--FontSize: var(--pf-t--global--icon--size--font--body--default);
146 --#{$progress-stepper}__step-icon--Color: var(--pf-t--global--icon--color--regular);
147 --#{$progress-stepper}__step-icon--BackgroundColor: var(--pf-t--global--background--color--primary--default);
148 --#{$progress-stepper}__step-icon--BorderWidth: var(--pf-t--global--border--width--box--default);
149 --#{$progress-stepper}__step-icon--BorderColor: var(--pf-t--global--border--color--default);
150 --#{$progress-stepper}__step--m-current__step-icon--Color: var(--pf-t--global--icon--color--brand--default);
151 --#{$progress-stepper}__step--m-info__step-icon--Color: var(--pf-t--global--icon--color--status--info--default);
152 --#{$progress-stepper}__step--m-success__step-icon--Color: var(--pf-t--global--icon--color--status--success--default);
153 --#{$progress-stepper}__step--m-warning__step-icon--Color: var(--pf-t--global--icon--color--status--warning--default);
154 --#{$progress-stepper}__step--m-danger__step-icon--Color: var(--pf-t--global--icon--color--status--danger--default);
155 --#{$progress-stepper}__step--m-custom__step-icon--Color: var(--pf-t--global--icon--color--status--custom--default);
156
157 // Icon adjustments to fix differences in alignment
158 --#{$progress-stepper}__pficon--MarginBlockStart: 3px;
159 --#{$progress-stepper}__fa-exclamation-triangle--MarginBlockStart: -2px;
160
161 // Step Title variables
162 --#{$progress-stepper}__step-title--Color: var(--pf-t--global--text--color--regular);
163 --#{$progress-stepper}__step-title--TextAlign: start;
164 --#{$progress-stepper}__step-title--FontSize: var(--pf-t--global--font--size--body--lg);
165 --#{$progress-stepper}__step-title--FontWeight: var(--pf-t--global--font--weight--body--default);
166 --#{$progress-stepper}__step--m-current__step-title--FontWeight: var(--pf-t--global--font--weight--body--bold);
167 --#{$progress-stepper}__step--m-current__step-title--Color: var(--pf-t--global--text--color--regular);
168 --#{$progress-stepper}__step--m-pending__step-title--Color: var(--pf-t--global--text--color--subtle);
169 --#{$progress-stepper}__step--m-danger__step-title--Color: var(--pf-t--global--text--color--status--danger--default);
170
171 // Help text variables for the step title
172 --#{$progress-stepper}__step-title--m-help-text--PaddingInlineStart: 0;
173 --#{$progress-stepper}__step-title--m-help-text--PaddingInlineEnd: 0;
174 --#{$progress-stepper}__step-title--m-help-text--TextDecorationLine: var(--pf-t--global--text-decoration--help-text--line--default);
175 --#{$progress-stepper}__step-title--m-help-text--TextDecorationStyle: var(--pf-t--global--text-decoration--help-text--style--default);
176 --#{$progress-stepper}__step-title--m-help-text--TextUnderlineOffset: #{pf-size-prem(4px)};
177 --#{$progress-stepper}__step-title--m-help-text--hover--TextDecorationLine: var(--pf-t--global--text-decoration--help-text--line--hover);
178 --#{$progress-stepper}__step-title--m-help-text--hover--TextDecorationStyle: var(--pf-t--global--text-decoration--help-text--style--hover);
179 --#{$progress-stepper}__step-title--m-help-text--hover--Color: var(--pf-t--global--text--color--brand--hover);
180
181 // Help text variables the step title for failure state
182 --#{$progress-stepper}__step--m-danger__step-title--m-help-text--hover--Color: var(--pf-t--global--text--color--status--danger--hover);
183
184 // Step Description variables
185 --#{$progress-stepper}__step-description--MarginBlockStart: var(--pf-t--global--spacer--xs);
186 --#{$progress-stepper}__step-description--FontSize: var(--pf-t--global--font--size--body--sm);
187 --#{$progress-stepper}__step-description--Color: var(--pf-t--global--text--color--subtle);
188 --#{$progress-stepper}__step-description--TextAlign: start;
189
190 // Vertical by default
191 @include pf-v6-c-progress-stepper--m-vertical;
192
193 // Horizontal at md breakpoint
194 @media screen and (min-width: $pf-v6-global--breakpoint--md) {
195 @include pf-v6-c-progress-stepper--m-horizontal;
196 }
197 }
198
199 .#{$progress-stepper} {
200 position: relative;
201 display: grid;
202 grid-template-rows: var(--#{$progress-stepper}--GridTemplateRows);
203 grid-template-columns: var(--#{$progress-stepper}--GridTemplateColumns);
204 grid-auto-columns: 1fr; // gives even spacing between steps
205 grid-auto-flow: var(--#{$progress-stepper}--GridAutoFlow);
206
207 // Progress stepper Modifiers
208 &.pf-m-center {
209 --#{$progress-stepper}__step-connector--JustifyContent: var(--#{$progress-stepper}--m-center__step-connector--JustifyContent);
210 --#{$progress-stepper}__step-main--MarginInlineEnd: var(--#{$progress-stepper}--m-center__step-main--MarginInlineEnd);
211 --#{$progress-stepper}__step-main--MarginInlineStart: var(--#{$progress-stepper}--m-center__step-main--MarginInlineStart);
212 --#{$progress-stepper}--step-main--TextAlign: var(--#{$progress-stepper}--m-center__step-main--TextAlign, auto);
213 --#{$progress-stepper}__step-title--TextAlign: var(--#{$progress-stepper}--m-center__step-title--TextAlign, auto);
214 --#{$progress-stepper}__step-description--MarginInlineEnd: var(--#{$progress-stepper}--m-center__step-description--MarginInlineEnd);
215 --#{$progress-stepper}__step-description--MarginInlineStart: var(--#{$progress-stepper}--m-center__step-description--MarginInlineStart);
216 --#{$progress-stepper}__step-description--TextAlign: var(--#{$progress-stepper}--m-center__step-description--TextAlign, auto);
217 --#{$progress-stepper}--m-vertical__step-main--MarginInlineEnd: var(--#{$progress-stepper}--m-vertical--m-center__step-main--MarginInlineEnd);
218 --#{$progress-stepper}--m-vertical__step-main--MarginInlineStart: var(--#{$progress-stepper}--m-vertical--m-center__step-main--MarginInlineStart);
219
220 grid-template-columns: var(--#{$progress-stepper}--m-center--GridTemplateColumns);
221
222 .#{$progress-stepper}__step-main {
223 position: relative;
224 }
225
226 .#{$progress-stepper}__step:not(:last-of-type) > .#{$progress-stepper}__step-connector::before {
227 inset-inline-start: var(--#{$progress-stepper}--m-center__step-connector--before--InsetInlineStart);
228 }
229
230 // If not compact variant, swap borders from connector to main
231 &:not(.pf-m-compact) {
232 .#{$progress-stepper}__step:not(:last-of-type) > .#{$progress-stepper}__step-main::before {
233 content: var(--#{$progress-stepper}--m-center__step-main--before--Content);
234 }
235
236 .#{$progress-stepper}__step:not(:last-of-type) > .#{$progress-stepper}__step-connector::before {
237 content: var(--#{$progress-stepper}--m-center__step-connector--before--Content);
238 }
239 }
240 }
241
242 &.pf-m-compact {
243 --#{$progress-stepper}__step-main--MarginBlockStart: var(--#{$progress-stepper}--m-compact__step-main--MarginBlockStart);
244 --#{$progress-stepper}__step-main--MarginBlockEnd: var(--#{$progress-stepper}--m-compact__step-main--MarginBlockEnd);
245 --#{$progress-stepper}__step-icon--Width: var(--#{$progress-stepper}--m-compact__step-icon--Width);
246 --#{$progress-stepper}__step-icon--FontSize: var(--#{$progress-stepper}--m-compact__step-icon--FontSize);
247 --#{$progress-stepper}__step-title--FontSize: var(--#{$progress-stepper}--m-compact__step-title--FontSize);
248 --#{$progress-stepper}__step--m-current__step-title--FontWeight: var(--#{$progress-stepper}--m-compact__step-title--FontWeight);
249 --#{$progress-stepper}__pficon--MarginBlockStart: var(--#{$progress-stepper}--m-compact__pficon--MarginBlockStart);
250 --#{$progress-stepper}__fa-exclamation-triangle--MarginBlockStart: var(--#{$progress-stepper}--m-compact__fa-exclamation-triangle--MarginBlockStart);
251 --#{$progress-stepper}--m-vertical__step-main--MarginBlockStart: var(--#{$progress-stepper}--m-vertical--m-compact__step-main--MarginBlockStart);
252 --#{$progress-stepper}--m-vertical__step-main--MarginInlineEnd: var(--#{$progress-stepper}--m-vertical--m-compact__step-main--MarginInlineEnd);
253 --#{$progress-stepper}--m-vertical__step-main--MarginInlineStart: var(--#{$progress-stepper}--m-vertical--m-compact__step-main--MarginInlineStart);
254
255 display: inline-grid;
256 grid-template-columns: var(--#{$progress-stepper}--m-compact--GridTemplateColumns);
257 grid-auto-flow: var(--#{$progress-stepper}--m-compact--GridAutoFlow);
258
259 .#{$progress-stepper}__step-connector {
260 grid-row: var(--#{$progress-stepper}--m-compact__step-connector--GridRow);
261 min-width: var(--#{$progress-stepper}--m-compact__step-connector--MinWidth);
262 padding-block-end: var(--#{$progress-stepper}--m-compact__step-connector--PaddingBlockEnd);
263 }
264
265 .#{$progress-stepper}__step-main {
266 margin-block-end: var(--#{$progress-stepper}--m-compact__step-main--MarginBlockEnd);
267 }
268
269 .#{$progress-stepper}__step:not(.pf-m-current) .#{$progress-stepper}__step-main {
270 @include pf-v6-u-screen-reader;
271 }
272
273 // For this compact variant only, move the main content for the current step to above the icons
274 .#{$progress-stepper}__step.pf-m-current .#{$progress-stepper}__step-main {
275 grid-row: 1/2;
276 grid-column: 1/-1;
277 }
278
279 .#{$progress-stepper}__step-description {
280 display: none;
281 }
282 }
283 }
284
285 // Step
286 .#{$progress-stepper}__step {
287 display: contents;
288
289 // Step Modifiers
290 &.pf-m-current {
291 --#{$progress-stepper}__step-title--FontWeight: var(--#{$progress-stepper}__step--m-current__step-title--FontWeight);
292 --#{$progress-stepper}__step-title--Color: var(--#{$progress-stepper}__step--m-current__step-title--Color);
293 --#{$progress-stepper}__step-icon--Color: var(--#{$progress-stepper}__step--m-current__step-icon--Color);
294 }
295
296 &.pf-m-pending {
297 --#{$progress-stepper}__step-title--Color: var(--#{$progress-stepper}__step--m-pending__step-title--Color);
298 }
299
300 &.pf-m-success {
301 --#{$progress-stepper}__step-icon--Color: var(--#{$progress-stepper}__step--m-success__step-icon--Color);
302 }
303
304 &.pf-m-danger {
305 --#{$progress-stepper}__step-icon--Color: var(--#{$progress-stepper}__step--m-danger__step-icon--Color);
306 --#{$progress-stepper}__step-title--Color: var(--#{$progress-stepper}__step--m-danger__step-title--Color);
307
308 // Help text variables for failure state
309 --#{$progress-stepper}__step-title--m-help-text--hover--Color: var(--#{$progress-stepper}__step--m-danger__step-title--m-help-text--hover--Color);
310 }
311
312 &.pf-m-warning {
313 --#{$progress-stepper}__step-icon--Color: var(--#{$progress-stepper}__step--m-warning__step-icon--Color);
314 }
315
316 &.pf-m-info {
317 --#{$progress-stepper}__step-icon--Color: var(--#{$progress-stepper}__step--m-info__step-icon--Color);
318 }
319
320 &.pf-m-custom {
321 --#{$progress-stepper}__step-icon--Color: var(--#{$progress-stepper}__step--m-custom__step-icon--Color);
322 }
323
324 &:last-child {
325 --#{$progress-stepper}__step-main--MarginBlockEnd: 0;
326 }
327 }
328
329 // The step icon wrapper provides a container on which to use the before for the line connecting the steps
330 .#{$progress-stepper}__step-connector {
331 position: relative;
332 display: flex;
333 justify-content: var(--#{$progress-stepper}__step-connector--JustifyContent);
334 width: 100%;
335
336 .#{$progress-stepper}__step:not(:last-of-type) > &::before {
337 position: absolute;
338 inset-block-start: var(--#{$progress-stepper}__step-connector--before--InsetBlockStart); // half the height
339 inset-inline-start: var(--#{$progress-stepper}__step-connector--before--InsetInlineStart);
340 width: var(--#{$progress-stepper}__step-connector--before--Width);
341 height: var(--#{$progress-stepper}__step-connector--before--Height);
342 content: "";
343 border-block-end: var(--#{$progress-stepper}__step-connector--before--BorderBlockEndWidth) solid var(--#{$progress-stepper}__step-connector--before--BorderBlockEndColor);
344 border-inline-end: var(--#{$progress-stepper}__step-connector--before--BorderInlineEndWidth) solid var(--#{$progress-stepper}__step-connector--before--BorderInlineEndColor);
345 transform: var(--#{$progress-stepper}__step-connector--before--Transform);
346 }
347 }
348
349 // Step icon
350 .#{$progress-stepper}__step-icon {
351 z-index: var(--#{$progress-stepper}__step-icon--ZIndex);
352 display: flex;
353 align-items: center;
354 justify-content: center;
355 min-width: var(--#{$progress-stepper}__step-icon--Width);
356 height: var(--#{$progress-stepper}__step-icon--Height);
357 font-size: var(--#{$progress-stepper}__step-icon--FontSize);
358 color: var(--#{$progress-stepper}__step-icon--Color);
359 background-color: var(--#{$progress-stepper}__step-icon--BackgroundColor);
360 border: var(--#{$progress-stepper}__step-icon--BorderWidth) solid var(--#{$progress-stepper}__step-icon--BorderColor);
361 border-radius: 50%;
362
363 // Align pficons with the font awesome icons
364 // stylelint-disable
365 .pf-v6-pficon {
366 margin-block-start: var(--#{$progress-stepper}__pficon--MarginBlockStart);
367 }
368
369 // Push the triangle up to fit inside the circle
370 .fa-exclamation-triangle {
371 margin-block-start: var(--#{$progress-stepper}__fa-exclamation-triangle--MarginBlockStart);
372 }
373 // stylelint-enable
374 }
375
376 // Step main
377 .#{$progress-stepper}__step-main {
378 min-width: 0;
379 margin-block-start: var(--#{$progress-stepper}__step-main--MarginBlockStart);
380 margin-block-end: var(--#{$progress-stepper}__step-main--MarginBlockEnd);
381 margin-inline-start: var(--#{$progress-stepper}__step-main--MarginInlineStart);
382 margin-inline-end: var(--#{$progress-stepper}__step-main--MarginInlineEnd);
383 text-align: var(--#{$progress-stepper}--step-main--TextAlign, auto);
384 overflow-wrap: anywhere;
385
386 // Draw a new border for vertical alignment using step main
387 .#{$progress-stepper}__step:not(:last-of-type) > &::before {
388 position: absolute;
389 inset-block-start: calc(100% + var(--#{$progress-stepper}__step-main--MarginBlockStart));
390 inset-inline-start: calc(50% - calc(var(--#{$progress-stepper}__step-connector--before--BorderInlineEndWidth) / 2));
391 width: auto;
392 height: calc(var(--#{$progress-stepper}__step-main--MarginBlockStart) + var(--#{$progress-stepper}__step-main--MarginBlockEnd));
393 border-inline-end: var(--#{$progress-stepper}__step-connector--before--BorderInlineEndWidth) solid var(--#{$progress-stepper}__step-connector--before--BorderInlineEndColor);
394 }
395 }
396
397 // Step title
398 .#{$progress-stepper}__step-title {
399 font-size: var(--#{$progress-stepper}__step-title--FontSize);
400 font-weight: var(--#{$progress-stepper}__step-title--FontWeight);
401 color: var(--#{$progress-stepper}__step-title--Color);
402 text-align: var(--#{$progress-stepper}__step-title--TextAlign);
403 background: none;
404 border: 0;
405
406 &.pf-m-help-text {
407 padding-inline-start: var(--#{$progress-stepper}__step-title--m-help-text--PaddingInlineStart);
408 padding-inline-end: var(--#{$progress-stepper}__step-title--m-help-text--PaddingInlineEnd);
409 text-decoration-line: var(--#{$progress-stepper}__step-title--m-help-text--TextDecorationLine);
410 text-decoration-style: var(--#{$progress-stepper}__step-title--m-help-text--TextDecorationStyle);
411 text-underline-offset: var(--#{$progress-stepper}__step-title--m-help-text--TextUnderlineOffset);
412 cursor: pointer;
413
414 &:is(:hover, :focus) {
415 --#{$progress-stepper}__step-title--m-help-text--TextDecorationLine: var(--#{$progress-stepper}__step-title--m-help-text--hover--TextDecorationLine);
416 --#{$progress-stepper}__step-title--m-help-text--TextDecorationStyle: var(--#{$progress-stepper}__step-title--m-help-text--hover--TextDecorationStyle);
417 --#{$progress-stepper}__step-title--Color: var(--#{$progress-stepper}__step-title--m-help-text--hover--Color);
418 }
419 }
420 }
421
422 // Step description
423 .#{$progress-stepper}__step-description {
424 margin-block-start: var(--#{$progress-stepper}__step-description--MarginBlockStart);
425 font-size: var(--#{$progress-stepper}__step-description--FontSize);
426 color: var(--#{$progress-stepper}__step-description--Color);
427 text-align: var(--#{$progress-stepper}__step-description--TextAlign);
428 }
429
430 // stylelint-disable no-duplicate-selectors
431 .#{$progress-stepper} {
432 @each $breakpoint, $breakpoint-value in $pf-v6-c-progress-stepper--breakpoint-map {
433 $breakpoint-name: "";
434
435 @if $breakpoint != "base" {
436 $breakpoint-name: -on-#{$breakpoint};
437 }
438
439 @include pf-v6-apply-breakpoint($breakpoint) {
440 &.pf-m-horizontal#{$breakpoint-name} {
441 @include pf-v6-c-progress-stepper--m-horizontal;
442 }
443
444 &.pf-m-vertical#{$breakpoint-name} {
445 @include pf-v6-c-progress-stepper--m-vertical;
446 }
447 }
448 }
449
450 }
451 // stylelint-enable