aboutsummaryrefslogtreecommitdiff
path: root/lib/progress-bars.less
blob: cc524cc9f02cf35fa9f0d923736f38c3157e2fcd (plain)
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
@-webkit-keyframes progress-bar-stripes {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 40px 0;
  }
}

@-moz-keyframes progress-bar-stripes {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 40px 0;
  }
}

@keyframes progress-bar-stripes {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 40px 0;
  }
}

.progress {
  height: 25px;
  margin-bottom: 18px;
  overflow: hidden;
  .box-shadow(inset 0 1px 1px 0 rgba(0,0,0,.3), 0 1px 0 0 #fff);
  #gradient > .vertical(#fff, #f5f5f5);
  .border-radius(10px);
  border: 1px solid #ddd;
  border-color: rgba(0,0,0,.0);
  &.active {
    .bar {
      -webkit-animation: progress-bar-stripes 2s linear infinite;
      -moz-animation: progress-bar-stripes 2s linear infinite;
      animation: progress-bar-stripes 2s linear infinite;
    }
  }
  &.animated {
    .bar {
      .transition(width .6s ease);
    }
  }
  &.danger,
  &.error {
    .bar {
      #gradient > .vertical(#ee5f5b, #c43c35);
    }
    &.striped {
      .bar {
        .background-size(40px, 40px);
        #gradient > .striped(#ee5f5b);
      }
    }
  }
  &.success {
    .bar {
      #gradient > .vertical(#62c462, #57a957);
    }
    &.striped {
      .bar {
        .background-size(40px, 40px);
        #gradient > .striped(#62c462);
      }
    }
  }
  &.info {
    .bar {
      #gradient > .vertical(#5bc0de, #339bb9);
    }
    &.striped {
      .bar {
        .background-size(40px, 40px);
        #gradient > .striped(#5bc0de);
      }
    }
  }
  &.striped {
    .bar {
      .background-size(40px, 40px);
      #gradient > .striped(#62c462);
    }
  }
  .bar {
    width: 0%;
    height: 100%;
    -webkit-box-sizing: border-box;
       -moz-box-sizing: border-box;
            box-sizing: border-box;
    .gradientBar(#62c462, #57a957);
    @shadow: inset 0 2px 0 rgba(255,255,255,.2), inset -1px -1px 0 rgba(0,0,0,.25),inset 1px 1px 0 rgba(0,0,0,.25);
    .box-shadow(@shadow);
    .border-radius(10px);
  }
}