Skip to content

Commit 45ae6d9

Browse files
committed
Fix: Use static position for nav mobile indicators
1 parent b155d12 commit 45ae6d9

File tree

1 file changed

+40
-21
lines changed
  • packages/components/src/styles/components/stepper

1 file changed

+40
-21
lines changed

packages/components/src/styles/components/stepper/nav.scss

+40-21
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ $progress-bar-animation-duration: .25s;
6161
width: 100%;
6262
}
6363

64+
.hds-stepper-nav__step-button {
65+
border-radius: 0 0 var(--token-border-radius-medium) var(--token-border-radius-medium);
66+
}
67+
6468
.hds-stepper-nav__step-content {
6569
position: relative;
6670
display: flex;
@@ -86,7 +90,6 @@ $progress-bar-animation-duration: .25s;
8690
flex-direction: column;
8791
align-items: center;
8892
padding: 16px 8px 12px 8px;
89-
border-radius: 0 0 var(--token-border-radius-medium) var(--token-border-radius-medium);
9093
}
9194

9295
.hds-stepper-nav__step-title {
@@ -117,16 +120,6 @@ $progress-bar-animation-duration: .25s;
117120
// Active
118121

119122
.hds-stepper-nav__step--active {
120-
.hds-stepper-nav__step-button {
121-
@include hds-focus-ring-with-pseudo-element(
122-
$top: -3px,
123-
$right: -1px,
124-
$bottom: -1px,
125-
$left: -1px,
126-
$radius: 0 0 var(--token-border-radius-medium) var(--token-border-radius-medium)
127-
);
128-
}
129-
130123
.hds-stepper-indicator-step__svg-hexagon path,
131124
.hds-stepper-indicator-step__status,
132125
.hds-stepper-nav__step-title {
@@ -154,6 +147,15 @@ $progress-bar-animation-duration: .25s;
154147
text-underline-position: from-font;
155148
}
156149

150+
.hds-stepper-nav__step--active .hds-stepper-nav__step-button {
151+
@include hds-focus-ring-with-pseudo-element(
152+
$top: -3px,
153+
$right: -1px,
154+
$bottom: -1px,
155+
$left: -1px,
156+
$radius: 0 0 var(--token-border-radius-medium) var(--token-border-radius-medium)
157+
);
158+
}
157159
}
158160

159161
// INTERACTIVE
@@ -171,9 +173,7 @@ $progress-bar-animation-duration: .25s;
171173

172174
&:hover,
173175
&.mock-hover {
174-
.hds-stepper-nav__step-text {
175-
background-color: var(--token-color-surface-interactive-hover);
176-
}
176+
background-color: var(--token-color-surface-interactive-hover);
177177

178178
.hds-stepper-nav__step-title {
179179
color: var(--token-color-foreground-action-hover);
@@ -182,9 +182,7 @@ $progress-bar-animation-duration: .25s;
182182

183183
&:active,
184184
&.mock-active {
185-
.hds-stepper-nav__step-text {
186-
background-color: var(--token-color-surface-interactive-active);
187-
}
185+
background-color: var(--token-color-surface-interactive-active);
188186

189187
.hds-stepper-nav__step-title {
190188
color: var(--token-color-foreground-action-active);
@@ -348,17 +346,38 @@ $progress-bar-animation-duration: .25s;
348346
flex-direction: column;
349347
}
350348

351-
.hds-stepper-nav__step:not(:last-of-type) {
352-
margin-bottom: 16px;
349+
.hds-stepper-nav__step-content {
350+
padding: 8px;
351+
border-radius: 0;
353352
}
354353

355354
.hds-stepper-nav__step-progress {
356-
top: -12px;
357-
left: 8px;
355+
position: static;
358356
justify-content: start;
359357
}
360358

361359
.hds-stepper-nav__step-text {
362360
align-items: start;
361+
margin-top: 4px;
362+
padding: 0;
363+
}
364+
365+
.hds-stepper-nav--interactive .hds-stepper-nav__step--interactive .hds-stepper-nav__step-button,
366+
.hds-stepper-nav--interactive .hds-stepper-nav__step--active .hds-stepper-nav__step-button {
367+
@include hds-focus-ring-with-pseudo-element(
368+
$top: -3px,
369+
$right: -1px,
370+
$bottom: -1px,
371+
$left: -1px,
372+
$radius: 0
373+
);
374+
}
375+
376+
.hds-stepper-nav__step--active {
377+
.hds-stepper-indicator-step__svg-hexagon path,
378+
.hds-stepper-indicator-step__status,
379+
.hds-stepper-nav__step-title {
380+
transition: none;
381+
}
363382
}
364383
}

0 commit comments

Comments
 (0)