forked from minddust/bootstrap-progressbar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap-progressbar.less
More file actions
137 lines (113 loc) · 3.52 KB
/
Copy pathbootstrap-progressbar.less
File metadata and controls
137 lines (113 loc) · 3.52 KB
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
/* ========================================================
* bootstrap-progressbar v0.5.0
* ========================================================
* Copyright 2012 minddust.com
*
* bootstrap-progressbar is published under Apache License,
* Version 2.0 (see LICENSE file).
*
* http://www.apache.org/licenses/LICENSE-2.0
* ======================================================== */
// local copy of twitter bootstrap defines
// ---------------------------------------
@baseLineHeight: 20px;
@orange: #f89406;
#gradient {
.horizontal(@startColor: #555, @endColor: #333) {
background-color: @endColor;
background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+
background-image: -webkit-gradient(linear, 0 0, 100% 0, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10
background-image: linear-gradient(to right, @startColor, @endColor); // Standard, IE10
background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@startColor),argb(@endColor))); // IE9 and down
}
}
.transition(@transition) {
-webkit-transition: @transition;
-moz-transition: @transition;
-o-transition: @transition;
transition: @transition;
}
.border-radius(@radius) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
// bootstrap-progressbar global styles
// -----------------------------------
@progressbarVerticalWidth: @baseLineHeight;
@progressbarFontSize: 12px;
.progress {
position: relative;
}
.progress .bar {
position: absolute;
overflow: hidden;
.border-radius(4px)
}
.progress .progressbar-back-text {
position: absolute;
width: 100%;
height: 100%;
font-size: @progressbarFontSize;
text-align: center;
}
.progress .progressbar-front-text {
display: block;
width: 100%;
font-size: @progressbarFontSize;
text-align: center;
}
// bootstrap-progressbar horizontal styles
// ---------------------------------------
.progress.right .bar {
right: 0;
}
.progress.right .progressbar-front-text {
position: absolute;
right: 0;
}
// bootstrap-progressbar vertical styles
// -------------------------------------
.progress.vertical {
width: @progressbarVerticalWidth;
height: 100%;
float: left;
margin-right: @progressbarVerticalWidth;
#gradient > .horizontal(#f5f5f5, #f9f9f9);
}
.progress.vertical.bottom {
position: relative;
}
.progress.vertical.bottom .progressbar-front-text {
position: absolute;
bottom: 0;
}
.progress.vertical .bar {
width: 100%;
height: 0;
#gradient > .horizontal(#149bdf, #0480be);
.transition(height .6s ease);
}
.progress.vertical.bottom .bar {
position: absolute;
bottom: 0;
}
// Danger (red)
.progress-danger.vertical .bar, .progress.vertical .bar-danger {
#gradient > .horizontal(#ee5f5b, #c43c35);
}
// Success (green)
.progress-success.vertical .bar, .progress.vertical .bar-success {
#gradient > .horizontal(#62c462, #57a957);
}
// Info (teal)
.progress-info.vertical .bar, .progress.vertical .bar-info {
#gradient > .horizontal(#5bc0de, #339bb9);
}
// Warning (orange)
.progress-warning.vertical .bar, .progress.vertical .bar-warning {
#gradient > .horizontal(lighten(@orange, 15%), @orange);
}