Blame view

src/styles/components/steps.less 9.22 KB
45b672ca   梁灏   add Steps UI
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
  @steps-prefix-cls: ~"@{css-prefix}steps";
  @steps-wait-icon-color: #ccc;
  @steps-wait-title-color: #999;
  @steps-wait-description-color: @steps-wait-title-color;
  @steps-wait-tail-color: @border-color-split;
  @steps-title-color: #666;
  
  .@{steps-prefix-cls} {
      font-size: 0;
      width: 100%;
      line-height: 1.5;
  
      &-item{
          display: inline-block;
          position: relative;
          vertical-align: top;
  
          &.@{steps-prefix-cls}-status-wait{
              .@{steps-prefix-cls}-head-inner {
                  background-color: #fff;
                  > .@{steps-prefix-cls}-icon, span {
                      color: @steps-wait-icon-color;
                  }
              }
              .@{steps-prefix-cls}-title {
                  color: @steps-wait-title-color;
              }
              .@{steps-prefix-cls}-content {
                  color: @steps-wait-description-color;
              }
              .@{steps-prefix-cls}-tail > i {
                  background-color: @steps-wait-tail-color;
              }
          }
          &.@{steps-prefix-cls}-status-process {
              .@{steps-prefix-cls}-head-inner {
                  border-color: @primary-color;
                  background-color: @primary-color;
                  > .@{steps-prefix-cls}-icon, span {
                      color: #fff;
                  }
              }
              .@{steps-prefix-cls}-title {
                  color: @steps-title-color;
              }
              .@{steps-prefix-cls}-content {
                  color: @steps-title-color;
              }
              .@{steps-prefix-cls}-tail > i {
                  background-color: @border-color-split;
              }
          }
          &.@{steps-prefix-cls}-status-finish {
              .@{steps-prefix-cls}-head-inner {
                  background-color: #fff;
                  border-color: @primary-color;
                  > .@{steps-prefix-cls}-icon, span {
                      color: @primary-color;
                  }
              }
              .@{steps-prefix-cls}-tail > i:after {
                  width: 100%;
                  background: @primary-color;
                  .transition(all @transition-time @ease-in-out);
                  opacity: 1;
              }
              .@{steps-prefix-cls}-title {
                  color: @steps-wait-title-color;
              }
              .@{steps-prefix-cls}-content {
                  color: @steps-wait-description-color;
              }
          }
  
          &.@{steps-prefix-cls}-status-error {
              .@{steps-prefix-cls}-head-inner {
                  background-color: #fff;
                  border-color: @error-color;
                  > .@{steps-prefix-cls}-icon {
                      color: @error-color;
                  }
              }
              .@{steps-prefix-cls}-title {
                  color: @error-color;
              }
              .@{steps-prefix-cls}-content {
                  color: @error-color;
              }
              .@{steps-prefix-cls}-tail > i {
                  background-color: @border-color-split;
              }
          }
  
          &.@{steps-prefix-cls}-next-error {
              .@{steps-prefix-cls}-tail > i,
              .@{steps-prefix-cls}-tail > i:after {
                  background-color: @error-color;
              }
          }
  
          &.@{steps-prefix-cls}-custom {
              .@{steps-prefix-cls}-head-inner {
                  background: none;
                  border: 0;
                  width: auto;
                  height: auto;
                  > .@{steps-prefix-cls}-icon {
                      font-size: 20px;
                      top: 2px;
                      width: 20px;
                      height: 20px;
                  }
              }
              &.@{steps-prefix-cls}-status-process {
                  .@{steps-prefix-cls}-head-inner > .@{steps-prefix-cls}-icon {
                      color: @primary-color;
                  }
              }
          }
      }
      &-item:last-child &-tail{
          display: none;
      }
  
      .@{steps-prefix-cls}-head,
      .@{steps-prefix-cls}-main {
          position: relative;
          display: inline-block;
          vertical-align: top;
      }
      .@{steps-prefix-cls}-head {
          background: #fff;
      }
  
      .@{steps-prefix-cls}-head-inner {
          display: block;
          width: 26px;
          height: 26px;
          line-height: 24px;
          margin-right: 8px;
          text-align: center;
          border: 1px solid @steps-wait-icon-color;
          border-radius: 50%;
          font-size: 14px;
          .transition(background-color @transition-time @ease-in-out);
  
          > .@{steps-prefix-cls}-icon {
              line-height: 1;
              position: relative;
  
              &.ivu-icon {
                  font-size: 24px;
                  &-ios-checkmark-empty,
                  &-ios-close-empty {
                      font-weight: bold;
                  }
              }
          }
      }
      .@{steps-prefix-cls}-main {
          margin-top: 2.5px;
          display: inline;
      }
      .@{steps-prefix-cls}-custom .@{steps-prefix-cls}-title{
          margin-top: 2.5px;
      }
  
      .@{steps-prefix-cls}-title {
          display: inline-block;
          margin-bottom: 4px;
          padding-right: 10px;
          font-size: 14px;
          font-weight: bold;
          color: #666;
          background: #fff;
  
          > a:first-child:last-child {
              color: #666;
          }
      }
      .@{steps-prefix-cls}-item-last {
          .@{steps-prefix-cls}-title {
              padding-right: 0;
              width: 100%;
          }
      }
      .@{steps-prefix-cls}-content {
          font-size: 12px;
          color: #999;
      }
      .@{steps-prefix-cls}-tail {
          width: 100%;
          padding: 0 10px;
          position: absolute;
          left: 0;
          top: 13px;
          > i {
              display: inline-block;
              width: 100%;
              height: 1px;
              vertical-align: top;
              background: @border-color-split;
              border-radius: 1px;
              position: relative;
              &:after {
                  content: '';
                  width: 0;
                  height: 100%;
                  background: @border-color-split;
                  opacity: 0;
                  position: absolute;
                  top: 0;
              }
          }
      }
  
      &.@{steps-prefix-cls}-small {
          .@{steps-prefix-cls}-head-inner {
              width: 18px;
              height: 18px;
              line-height: 16px;
              margin-right: 10px;
              text-align: center;
              border-radius: 50%;
              font-size: 12px;
  
              > .@{steps-prefix-cls}-icon.ivu-icon {
                  font-size: 16px;
                  top: 0;
              }
          }
          .@{steps-prefix-cls}-main {
              margin-top: 0;
          }
          .@{steps-prefix-cls}-title {
              margin-bottom: 4px;
              margin-top: 0;
              color: #666;
              font-size: 12px;
              font-weight: bold;
          }
          .@{steps-prefix-cls}-content {
              font-size: 12px;
              color: #999;
              padding-left: 30px;
          }
          .@{steps-prefix-cls}-tail {
              top: 8px;
              padding: 0 8px;
              > i {
                  height: 1px;
                  width: 100%;
                  border-radius: 1px;
              }
          }
      }
  
      &.@{steps-prefix-cls}-small .@{steps-prefix-cls}-item.@{steps-prefix-cls}-custom .@{steps-prefix-cls}-head-inner,
      .@{steps-prefix-cls}-item.@{steps-prefix-cls}-custom .@{steps-prefix-cls}-head-inner {
          width: inherit;
          height: inherit;
          line-height: inherit;
          border-radius: 0;
          border: 0;
          background: none;
      }
  }
  
  .@{steps-prefix-cls}-vertical {
      .@{steps-prefix-cls}-item {
          display: block;
      }
  
      .@{steps-prefix-cls}-tail {
          position: absolute;
          left: 13px;
          top: 0;
          height: 100%;
          width: 1px;
          padding: 30px 0 4px 0;
          > i {
              height: 100%;
              width: 1px;
              &:after {
                  height: 0;
                  width: 100%;
              }
          }
      }
  
      .@{steps-prefix-cls}-status-finish {
          .@{steps-prefix-cls}-tail > i:after {
              height: 100%;
          }
      }
  
      .@{steps-prefix-cls}-head {
          float: left;
          &-inner {
              margin-right: 16px;
          }
      }
  
      .@{steps-prefix-cls}-main {
          min-height: 47px;
          overflow: hidden;
          display: block;
          .@{steps-prefix-cls}-title {
              line-height: 26px;
          }
          .@{steps-prefix-cls}-content {
              padding-bottom: 12px;
              padding-left: 0;
          }
      }
  
      .@{steps-prefix-cls}-custom .@{steps-prefix-cls}-icon {
          left: 4px;
      }
      &.@{steps-prefix-cls}-small .@{steps-prefix-cls}-custom .@{steps-prefix-cls}-icon {
          left: 0;
      }
  }
  
  .@{steps-prefix-cls}-vertical.@{steps-prefix-cls}-small {
      .@{steps-prefix-cls}-tail {
          position: absolute;
          left: 9px;
          top: 0;
          padding: 22px 0 4px 0;
          > i {
              height: 100%;
          }
      }
  
      .@{steps-prefix-cls}-title {
          line-height: 18px;
      }
  }
  
  .@{steps-prefix-cls}-horizontal {
      &.@{steps-prefix-cls}-hidden {
          visibility: hidden;
      }
      .@{steps-prefix-cls}-content {
          //max-width: 100px;
          padding-left: 35px;
      }
      .@{steps-prefix-cls}-item:not(:first-child) .@{steps-prefix-cls}-head {
          padding-left: 10px;
          margin-left: -10px;
      }
  }