Skip to content

Commit 3f3622b

Browse files
committed
refactor: stepper will squish together on smaller display sizes
- removed everything unused - simplify structure
1 parent e760d60 commit 3f3622b

File tree

2 files changed

+34
-44
lines changed

2 files changed

+34
-44
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
11
<aside aria-labelledby="stepper">
2-
<div class="row justify-content-center">
3-
<p class="stepper-text mb-1 small text-bold" id="stepper">
4-
{{ 'navigation.step' | translate }} {{ currentStep + 1 }}/{{ steps.length }}
5-
</p>
6-
</div>
7-
<div class="row justify-content-center g-0 mb-4">
8-
@for (step of steps; track step; let i = $index) {
9-
<div class="col-auto">
10-
<div class="row g-0 align-items-center">
11-
<div class="col-auto p-0">
12-
<div [ngClass]="{'circle-active': step===currentStep}" class="circle"></div>
13-
</div>
14-
<div class="col-auto p-0">
15-
@if (i !== steps.length - 1) {
16-
<div class="line"></div>
17-
}
18-
</div>
19-
</div>
20-
</div>
21-
}
2+
<div class="container">
3+
<div class="d-flex justify-content-center">
4+
<p class="mb-1 small text-bold">
5+
{{ 'navigation.step' | translate }} {{ currentStep + 1 }}/{{ steps.length }}
6+
</p>
7+
</div>
8+
<div class="d-flex mb-4 align-items-center">
9+
@for (step of steps; track step; let i = $index) {
10+
<div class="circle" [ngClass]="{'circle-active': step===currentStep}"></div>
11+
@if (i !== steps.length - 1) {
12+
<div class="line"></div>
13+
}
14+
}
15+
</div>
2216
</div>
2317
</aside>
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,27 @@
11
@import "src/default";
22
@import 'bootstrap/scss/mixins';
33

4-
.stepper-text {
5-
width: max-content;
6-
}
4+
.container {
5+
max-width: 300px;
76

8-
.circle {
9-
width: 20px;
10-
height: 20px;
11-
border-radius: 20px;
12-
border: 3px solid $dark-gray;
13-
background-color: $medium-gray;
14-
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25), 0 2px 5px 0 rgba(0, 0, 0, 0.18);
15-
}
7+
.circle {
8+
width: 20px;
9+
height: 20px;
10+
border-radius: 20px;
11+
border: 3px solid $dark-gray;
12+
background-color: $medium-gray;
13+
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25), 0 2px 5px 0 rgba(0, 0, 0, 0.18);
14+
}
1615

17-
.circle-active {
18-
border-color: $dark-gray;
19-
background-color: $secondary;
20-
}
16+
.circle-active {
17+
border-color: $dark-gray;
18+
background-color: $secondary;
19+
}
2120

22-
.line {
23-
border: none;
24-
border-top-width: 0;
25-
border-bottom-width: 0;
26-
background-color: $stepperLine;
27-
width: $spacer*4;
28-
height: 2px;
29-
margin: auto 0;
30-
padding: 0;
21+
.line {
22+
width: 100%;
23+
height: 2px;
24+
background: $stepperLine;
25+
flex: 1;
26+
}
3127
}

0 commit comments

Comments
 (0)