| 1 |
// |
| 2 |
// Steps |
| 3 |
// -------------------------------------------------- |
| 4 |
|
| 5 |
|
| 6 |
// Container |
| 7 |
|
| 8 |
.steps { |
| 9 |
display: flex; |
| 10 |
padding-top: $step-number-size * .5; |
| 11 |
} |
| 12 |
|
| 13 |
|
| 14 |
// Individual step |
| 15 |
|
| 16 |
.step { |
| 17 |
flex-basis: 0; |
| 18 |
flex-grow: 1; |
| 19 |
text: { |
| 20 |
align: center; |
| 21 |
decoration: none; |
| 22 |
} |
| 23 |
} |
| 24 |
|
| 25 |
.step-progress { |
| 26 |
position: relative; |
| 27 |
width: 100%; |
| 28 |
height: $step-progress-height; |
| 29 |
} |
| 30 |
|
| 31 |
.step-progress-start, |
| 32 |
.step-progress-end { |
| 33 |
position: absolute; |
| 34 |
top: 50%; |
| 35 |
width: 50%; |
| 36 |
height: .125rem; |
| 37 |
margin-top: -.0625rem; |
| 38 |
overflow: hidden; |
| 39 |
&::before { |
| 40 |
display: block; |
| 41 |
width: 62rem; |
| 42 |
height: 100%; |
| 43 |
background-image: escape-svg(url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' stroke='#{$step-progress-bg}' stroke-width='4' stroke-dasharray='2%2c 18' stroke-dashoffset='8' stroke-linecap='butt'/%3e%3c/svg%3e")); |
| 44 |
content: ''; |
| 45 |
} |
| 46 |
} |
| 47 |
.step-progress-start { left: 0; } |
| 48 |
.step-progress-end { left: 50%; } |
| 49 |
.step:first-child .step-progress .step-progress-start { display: none; } |
| 50 |
.step:last-child .step-progress .step-progress-end { display: none; } |
| 51 |
|
| 52 |
.step-number { |
| 53 |
position: absolute; |
| 54 |
display: block; |
| 55 |
top: 50%; |
| 56 |
left: 50%; |
| 57 |
width: $step-number-size; |
| 58 |
height: $step-number-size; |
| 59 |
margin: { |
| 60 |
top: -($step-number-size * .5); |
| 61 |
left: -($step-number-size * .5); |
| 62 |
} |
| 63 |
transition: $step-number-transition; |
| 64 |
border-radius: $step-number-border-radius; |
| 65 |
background: $step-number-bg; |
| 66 |
color: $step-number-color; |
| 67 |
font: { |
| 68 |
size: $step-number-font-size; |
| 69 |
weight: $step-number-font-weight; |
| 70 |
} |
| 71 |
box-shadow: $step-number-box-shadow; |
| 72 |
line-height: $step-number-size; |
| 73 |
} |
| 74 |
|
| 75 |
.step-label { |
| 76 |
padding-top: ($step-number-size * .5) + .5rem; |
| 77 |
color: $step-label-color; |
| 78 |
font-size: $step-label-font-size; |
| 79 |
} |
| 80 |
|
| 81 |
|
| 82 |
// Active step |
| 83 |
|
| 84 |
.step.active { |
| 85 |
.step-progress { |
| 86 |
.step-progress-start, |
| 87 |
.step-progress-end { |
| 88 |
height: $step-progress-height; |
| 89 |
background-color: $step-active-progress-bg; |
| 90 |
&::before { display: none; } |
| 91 |
} |
| 92 |
} |
| 93 |
.step-number { |
| 94 |
background-color: $step-active-number-bg; |
| 95 |
color: $step-active-number-color; |
| 96 |
box-shadow: $step-active-box-shadow; |
| 97 |
} |
| 98 |
} |
| 99 |
|
| 100 |
|
| 101 |
// Vertical steps |
| 102 |
|
| 103 |
.steps.steps-vertical { |
| 104 |
flex-direction: column; |
| 105 |
|
| 106 |
.step { |
| 107 |
display: flex; |
| 108 |
|
| 109 |
// Active step |
| 110 |
&.active { |
| 111 |
.step-progress { |
| 112 |
.step-progress-end { |
| 113 |
width: .25rem; |
| 114 |
height: 100%; |
| 115 |
} |
| 116 |
} |
| 117 |
} |
| 118 |
&:last-child .step-label { |
| 119 |
margin-bottom: initial; |
| 120 |
} |
| 121 |
} |
| 122 |
|
| 123 |
.step-progress { |
| 124 |
flex-shrink: 0; |
| 125 |
width: $step-number-size; |
| 126 |
height: auto; |
| 127 |
} |
| 128 |
|
| 129 |
.step-progress-start { display: none; } |
| 130 |
.step-progress-end { |
| 131 |
position: absolute; |
| 132 |
top: 0; |
| 133 |
left: 50%; |
| 134 |
width: .125rem; |
| 135 |
height: 100%; |
| 136 |
transform: translateX(-50%); |
| 137 |
&::before { |
| 138 |
width: 100%; |
| 139 |
height: 100%; |
| 140 |
background-image: escape-svg(url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' stroke='#{$step-progress-bg}' stroke-width='4' stroke-dasharray='2%2c 12' stroke-dashoffset='8' stroke-linecap='butt'/%3e%3c/svg%3e")); |
| 141 |
background-size: 25px; |
| 142 |
} |
| 143 |
} |
| 144 |
|
| 145 |
.step-number { |
| 146 |
position: relative; |
| 147 |
top: initial; |
| 148 |
left: initial; |
| 149 |
margin: { |
| 150 |
top: -.125rem; |
| 151 |
left: initial; |
| 152 |
} |
| 153 |
} |
| 154 |
|
| 155 |
.step-label { |
| 156 |
margin: { |
| 157 |
top: -.125rem; |
| 158 |
bottom: $spacer * 2.5; |
| 159 |
left: $spacer * 2.5; |
| 160 |
} |
| 161 |
padding-top: initial; |
| 162 |
font-size: $font-size-base; |
| 163 |
text-align: left; |
| 164 |
|
| 165 |
@include media-breakpoint-down(md) { |
| 166 |
margin-bottom: $spacer * 1.5; |
| 167 |
margin-left: $spacer * 1.5; |
| 168 |
} |
| 169 |
} |
| 170 |
|
| 171 |
// Light version |
| 172 |
&.steps-light { |
| 173 |
.step:not(.active) { |
| 174 |
.step-progress-end::before { |
| 175 |
background-image: escape-svg(url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' stroke='#{$step-light-progress-bg}' stroke-width='4' stroke-dasharray='2%2c 12' stroke-dashoffset='8' stroke-linecap='butt'/%3e%3c/svg%3e")); |
| 176 |
} |
| 177 |
.step-number { |
| 178 |
&.bg-primary { |
| 179 |
@include box-shadow($box-shadow-hover); |
| 180 |
} |
| 181 |
} |
| 182 |
} |
| 183 |
} |
| 184 |
} |
| 185 |
|
| 186 |
|
| 187 |
// Light version |
| 188 |
|
| 189 |
.steps-light { |
| 190 |
.step:not(.active) { |
| 191 |
.step-progress-start::before, |
| 192 |
.step-progress-end::before { |
| 193 |
background-image: escape-svg(url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' stroke='#{$step-light-progress-bg}' stroke-width='4' stroke-dasharray='2%2c 18' stroke-dashoffset='8' stroke-linecap='butt'/%3e%3c/svg%3e")); |
| 194 |
} |
| 195 |
.step-number { |
| 196 |
background-color: $step-light-number-bg; |
| 197 |
color: $step-light-number-color; |
| 198 |
box-shadow: none; |
| 199 |
} |
| 200 |
} |
| 201 |
.step.active .step-number { box-shadow: none; } |
| 202 |
.step-label { color: $step-light-label-color; } |
| 203 |
} |
| 204 |
|
| 205 |
|
| 206 |
// Links |
| 207 |
|
| 208 |
a.step { |
| 209 |
&:hover .step-number:not(.active) { |
| 210 |
background-color: $step-active-number-bg; |
| 211 |
color: $step-active-number-color; |
| 212 |
box-shadow: $step-active-box-shadow; |
| 213 |
} |
| 214 |
&.active { pointer-events: none; } |
| 215 |
} |
| 216 |
|