..
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102 | /*
* wizard
*/
$height-wizard: 6px !default;
$size-current-pin: 16px !default;
.wizard-container {
position: relative;
padding-top: 1.5em;
padding-left: 2px; // "optical" alignment, difficult to align text and circle ^^
}
.wizard-container--noTextDisplayed {
padding-top: 0;
}
.wizard {
height: $height-wizard;
display: flex;
}
.wizard-marker {
display: flex;
width: $size-current-pin;
height: $size-current-pin;
border-radius: 50%;
position: relative;
top: -#{$height-wizard - 1};
background-image: radial-gradient(circle, $pm-primary 0, $pm-primary #{$height-wizard/2}, transparent #{$height-wizard/2});
}
.wizard-item {
background: var(--bordercolor-input, $pm-global-border);
&:not(:last-child) {
@extend .flex-item-fluid;
}
// positionned first element always with a aria-current/is-complete
&:first-child {
background: none;
background-image: linear-gradient(to left, var(--bordercolor-input, $pm-global-border) 0, var(--bordercolor-input, $pm-global-border) calc(100% - #{$height-wizard/2}), transparent calc(100% - #{$height-wizard/2}) );
}
&:last-child {
background: none;
background-image: linear-gradient(to right, var(--bordercolor-input, $pm-global-border) 0, var(--bordercolor-input, $pm-global-border) 50%, transparent 50%);
&.is-complete::after {
content: none;
}
}
&[aria-current="step"],
&.is-complete {
&::before {
content: '';
position: relative;
display: block;
border-radius: 50%;
z-index: 1;
top: -#{$height-wizard - 1};
left: -1px;
width: $size-current-pin;
height: $size-current-pin;
}
.wizard-marker {
display: none;
}
}
&[aria-current="step"]::before {
background-image: radial-gradient(circle, $white 0, $white #{$height-wizard/2}, $pm-primary #{$height-wizard/2});
}
&.is-complete::before {
background: $pm-primary url("#{$path-images}sprite-for-css-only.svg#css-on") 50% 50% no-repeat;
background-size: #{$size-current-pin - $height-wizard};
}
&.is-complete::after {
content: '';
position: relative;
display: block;
width: 100%;
height: $height-wizard;
top: -$size-current-pin;
background-color: $pm-primary;
}
&[aria-current="step"] .wizard-item-inner {
position: absolute;
top: 0;
left: 0;
font-size: 2rem;
font-weight: bold;
}
&:not([aria-current]) .wizard-item-inner {
@extend .invisible;
}
}
.wizard-container--noTextDisplayed .wizard-item[aria-current="step"] .wizard-item-inner {
@extend .invisible;
}
|
|