0001-misc-add-circle-steps-option-in-wcs-23533.patch
static/includes/_form-steps.scss | ||
---|---|---|
1 |
@import 'flexbox_mixins'; |
|
2 | ||
3 |
$circle-steps-container-padding: 0 3em !default; |
|
4 |
$circle-steps-container-mobile-padding: 1em 0 !default; |
|
5 |
$circle-steps-margin: 25px 0 !default; |
|
6 |
$circle-steps-padding: 0.5ex !default; |
|
7 |
$circle-steps-marker-margin: 0 auto !default; |
|
8 |
$circle-steps-marker-color: gray !default; |
|
9 |
$circle-steps-marker-background: transparent !default; |
|
10 |
$circle-steps-marker-border: 1px solid gray !default; |
|
11 |
$circle-steps-marker-diameter: 4vw !default; |
|
12 |
$circle-steps-with-lines: true !default; |
|
13 |
$circle-steps-lines-color: $primary-color !default; |
|
14 |
$circle-steps-label-margin: 1em !default; |
|
15 |
$circle-steps-label-transform: uppercase !default; |
|
16 |
$circle-steps-label-color: #868686 !default; |
|
17 |
$circle-steps-current-background: white !default; |
|
18 |
$circle-steps-current-marker-color: white !default; |
|
19 |
$circle-steps-current-marker-background: $primary-color !default; |
|
20 |
$circle-steps-mobile-padding: 0 0.6em 1ex 0 !default; |
|
21 |
$circle-steps-mobile-marker-diameter: 4rem !default; |
|
22 | ||
23 |
/* steps */ |
|
24 | ||
25 |
@if $circle-steps { |
|
26 | ||
27 |
div#steps { |
|
28 |
padding: $circle-steps-container-padding; |
|
29 | ||
30 |
ol li { |
|
31 |
@include flexbox(); |
|
32 |
@include flex-direction(column); |
|
33 |
margin: $circle-steps-margin; |
|
34 |
padding: $circle-steps-padding; |
|
35 |
position: relative; |
|
36 |
border: 0; |
|
37 | ||
38 |
@if $circle-steps-with-lines { |
|
39 |
&.first { |
|
40 |
span.marker::after { |
|
41 |
display: none; |
|
42 |
} |
|
43 |
} |
|
44 |
span.marker::after { |
|
45 |
content: ' '; |
|
46 |
position: absolute; |
|
47 |
height: 50%; |
|
48 |
width: 1px; |
|
49 |
bottom: 100%; |
|
50 |
right: 50%; |
|
51 |
background-color: $circle-steps-marker-color; |
|
52 |
padding: 0; |
|
53 |
} |
|
54 |
} |
|
55 | ||
56 |
span.marker { |
|
57 |
@include justify-content(center); |
|
58 |
@include vendor-prefix(align-items, center); |
|
59 |
display: inline-flex; |
|
60 |
margin: $circle-steps-marker-margin; |
|
61 |
position: relative; |
|
62 |
color: $circle-steps-marker-color; |
|
63 |
background: $circle-steps-marker-background; |
|
64 |
border: $circle-steps-marker-border; |
|
65 |
border-radius: 50%; |
|
66 |
font-size: calc(12px + 1.2vw); |
|
67 |
font-weight: bold; |
|
68 |
text-align: center; |
|
69 |
vertical-align: middle; |
|
70 |
width: $circle-steps-marker-diameter; |
|
71 |
height: $circle-steps-marker-diameter; |
|
72 |
// flexbug 2 on IE11 (https://github.com/philipwalton/flexbugs#flexbug-2) |
|
73 |
max-width: 100%; |
|
74 |
max-height: 100%; |
|
75 |
box-sizing: border-box; |
|
76 |
// hide the colored circle |
|
77 |
&::before { |
|
78 |
display: none; |
|
79 |
} |
|
80 |
} |
|
81 | ||
82 |
span.label { |
|
83 |
margin: $circle-steps-label-margin; |
|
84 |
color: $circle-steps-label-color; |
|
85 |
text-align: center; |
|
86 |
vertical-align: middle; |
|
87 |
text-transform: $circle-steps-label-transform; |
|
88 |
} |
|
89 | ||
90 |
&.current { |
|
91 |
background: $circle-steps-current-background; |
|
92 |
font-weight: bold; |
|
93 | ||
94 |
span.label { |
|
95 |
color: $title-color; |
|
96 |
} |
|
97 | ||
98 |
span.marker { |
|
99 |
color: $circle-steps-current-marker-color; |
|
100 |
border-color: $circle-steps-current-marker-background; |
|
101 |
background: $circle-steps-current-marker-background; |
|
102 |
} |
|
103 |
} |
|
104 |
} |
|
105 |
} |
|
106 |
@media screen and (max-width: $mobile-limit) { |
|
107 |
div#gauche div#steps { |
|
108 | ||
109 |
@include order(1); |
|
110 |
padding: $circle-steps-container-mobile-padding; |
|
111 | ||
112 |
ol { |
|
113 |
@include flexbox(); |
|
114 |
@include flex-direction(row); |
|
115 |
@include justify-content(center); |
|
116 |
@include vendor-prefix(flex-flow, nowrap); |
|
117 |
@include vendor-prefix(align-items, center); |
|
118 |
// flexbug 2 on IE11 (https://github.com/philipwalton/flexbugs#flexbug-2) |
|
119 |
max-width: 100%; |
|
120 |
max-height: 100%; |
|
121 |
box-sizing: border-box; |
|
122 | ||
123 |
li { |
|
124 |
padding: $circle-steps-mobile-padding; |
|
125 | ||
126 |
span.marker { |
|
127 |
border-radius: 50%; |
|
128 |
padding: 2px 9px; |
|
129 |
width: $circle-steps-mobile-marker-diameter; // reset size without vw |
|
130 |
height: $circle-steps-mobile-marker-diameter; |
|
131 | ||
132 |
@if $circle-steps-with-lines { |
|
133 |
&::after { |
|
134 |
content: ' '; |
|
135 |
position: absolute; |
|
136 |
height: 1px; |
|
137 |
width: 10px; |
|
138 |
bottom: 50%; |
|
139 |
padding: 0; |
|
140 |
left: -10px; |
|
141 |
} |
|
142 |
} |
|
143 |
} |
|
144 |
// hide steps label on little screens |
|
145 |
span.label { |
|
146 |
display: none; |
|
147 |
} |
|
148 |
} |
|
149 |
} |
|
150 |
} |
|
151 |
} |
|
152 |
} @else { |
|
153 |
div#steps ol { |
|
154 |
margin: 0; |
|
155 |
padding: 0; |
|
156 |
text-align: left; |
|
157 |
list-style: none; |
|
158 |
color: #868686; |
|
159 | ||
160 |
& li { |
|
161 |
border: 0; |
|
162 |
border-bottom: 1px solid #CCC; |
|
163 |
margin-bottom: 2ex; |
|
164 |
border-radius: $border-radius; |
|
165 |
padding: 1ex; |
|
166 |
letter-spacing: 1px; |
|
167 |
} |
|
168 |
& li.current { |
|
169 |
border: 0; |
|
170 |
background: $title-background; |
|
171 |
color: $title-color; |
|
172 |
& span.label { |
|
173 |
font-weight: bold; |
|
174 |
} |
|
175 |
} |
|
176 |
& li span.marker { |
|
177 |
display: block; |
|
178 |
font-size: 250%; |
|
179 |
} |
|
180 |
} |
|
181 |
} |
static/includes/_wcs.scss | ||
---|---|---|
1 | 1 |
@import 'grid'; |
2 |
@import 'form-steps'; |
|
2 | 3 | |
3 | 4 |
$responsive-steps: horizontal !default; |
5 |
$circle-steps: false !default; |
|
4 | 6 | |
5 | 7 |
/* hide a bunch of elements */ |
6 | 8 |
div#droite, |
... | ... | |
106 | 108 |
margin: 1em; |
107 | 109 |
} |
108 | 110 | |
109 |
/* steps */ |
|
110 | ||
111 |
div#steps ol { |
|
112 |
text-align: left; |
|
113 |
margin: 0; |
|
114 |
padding: 0; |
|
115 |
list-style: none; |
|
116 |
color: #868686; |
|
117 | ||
118 |
& li { |
|
119 |
border: 0; |
|
120 |
border-bottom: 1px solid #ccc; |
|
121 |
margin-bottom: 2ex; |
|
122 |
border-radius: $border-radius; |
|
123 |
padding: 1ex; |
|
124 |
letter-spacing: 1px; |
|
125 |
} |
|
126 |
& li.current { |
|
127 |
border: 0; |
|
128 |
background: $title-background; |
|
129 |
color: $title-color; |
|
130 |
& span.label { |
|
131 |
font-weight: bold; |
|
132 |
} |
|
133 |
} |
|
134 |
& li span.marker { |
|
135 |
font-size: 250%; |
|
136 |
display: block; |
|
137 |
} |
|
138 |
} |
|
139 | ||
140 | 111 |
@if ($responsive-steps == horizontal) { |
141 |
@media screen and (max-width: $mobile-limit) { |
|
142 |
div#gauche { |
|
143 |
float: none; |
|
144 |
width: 100%; |
|
145 |
} |
|
146 |
div#side { |
|
147 |
display: flex; |
|
148 |
flex-direction: column; |
|
149 |
& > div { flex: 1 0 auto; } |
|
150 |
} |
|
151 |
div#tracking-code { |
|
152 |
font-size: 80%; |
|
153 |
order: 1; |
|
154 |
h3 { display: inline-block; } |
|
155 |
.text-tracking-code-short-text { display: none; } |
|
156 |
} |
|
157 |
div#steps { |
|
158 |
position: static; |
|
159 |
margin: 0; |
|
160 |
color: #aaa; |
|
161 |
white-space: nowrap; |
|
162 |
overflow: hidden; |
|
163 |
width: 100%; |
|
164 |
& ol { |
|
165 |
list-style: none; |
|
166 |
padding: 0 0; |
|
112 |
@media screen and (max-width: $mobile-limit) { |
|
113 |
div#gauche { |
|
114 |
float: none; |
|
115 |
width: 100%; |
|
116 |
} |
|
117 |
div#side { |
|
118 |
display: flex; |
|
119 |
flex-direction: column; |
|
120 |
& > div { flex: 1 0 auto; } |
|
121 |
} |
|
122 |
div#tracking-code { |
|
123 |
font-size: 80%; |
|
124 |
order: 1; |
|
125 |
h3 { display: inline-block; } |
|
126 |
.text-tracking-code-short-text { display: none; } |
|
127 |
} |
|
128 |
div#steps { |
|
129 |
position: static; |
|
167 | 130 |
margin: 0; |
168 |
text-align: left; |
|
169 |
& li { |
|
170 |
border: none; |
|
171 |
display: inline-block; |
|
172 |
margin: 0; |
|
173 |
padding: 0 1em 1ex 0; |
|
131 |
color: #aaa; |
|
132 |
white-space: nowrap; |
|
133 |
overflow: hidden; |
|
134 |
width: 100%; |
|
135 |
& ol { |
|
174 | 136 |
list-style: none; |
175 |
border-radius: 0; |
|
176 |
& span.marker { |
|
177 |
float: none; |
|
178 |
display: inline; |
|
179 |
font-size: 26px; |
|
180 |
position: static; |
|
181 |
padding: 2px 9px; |
|
182 |
font-weight: bold; |
|
183 |
color: white; |
|
184 |
text-align: center; |
|
185 |
background: #ddd; |
|
186 |
border-radius: $border-radius; |
|
187 |
border: 1px solid #ddd; |
|
137 |
padding: 0 0; |
|
138 |
margin: 0; |
|
139 |
text-align: left; |
|
140 |
& li { |
|
141 |
border: none; |
|
142 |
display: inline-block; |
|
143 |
margin: 0; |
|
144 |
padding: 0 1em 1ex 0; |
|
145 |
list-style: none; |
|
146 |
border-radius: 0; |
|
147 |
& span.marker { |
|
148 |
float: none; |
|
149 |
display: inline; |
|
150 |
font-size: 26px; |
|
151 |
position: static; |
|
152 |
padding: 2px 9px; |
|
153 |
font-weight: bold; |
|
154 |
color: white; |
|
155 |
text-align: center; |
|
156 |
background: #ddd; |
|
157 |
border-radius: $border-radius; |
|
158 |
border: 1px solid #ddd; |
|
159 |
} |
|
188 | 160 |
} |
189 |
} |
|
190 |
& li.current { |
|
191 |
background: inherit; |
|
192 |
color: inherit; |
|
193 |
& span.label { |
|
194 |
font-weight: normal; |
|
161 |
& li.current { |
|
162 |
background: inherit; |
|
163 |
color: inherit; |
|
164 |
& span.label { |
|
165 |
font-weight: normal; |
|
166 |
} |
|
167 |
& span.marker { |
|
168 |
background: $title-background; |
|
169 |
color: $title-color; |
|
170 |
border-radius: $border-radius; |
|
171 |
} |
|
195 | 172 |
} |
196 |
& span.marker { |
|
197 |
background: $title-background; |
|
198 |
color: $title-color; |
|
199 |
border-radius: $border-radius; |
|
173 |
& li.step-before .label { |
|
174 |
display: none; |
|
200 | 175 |
} |
201 | 176 |
} |
202 |
& li.step-before .label { |
|
203 |
display: none; |
|
204 |
} |
|
205 | 177 |
} |
206 | 178 |
} |
207 |
} |
|
208 | 179 |
} /* @endif ($responsive-steps == horizontal) */ |
209 | 180 | |
210 | 181 |
@media screen and (max-width: $mobile-limit) { |
211 |
- |