forked from angular-slider/angularjs-slider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rzslider.less
110 lines (95 loc) · 2.03 KB
/
rzslider.less
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
/**
* Angular JS slider directive
*
* (c) Rafal Zajac <[email protected]>
* http://github.com/rzajac/angularjs-slider
*
* Licensed under the MIT license
*/
.rounded(@radius: 2px) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
/* Slider colors */
@handleActiveColor: #fff;
@handleHoverColor: #fff;
@labelTextColor: #55637d;
@handleBgColor: #0db9f0;
@handleInnerColor: #fff;
@limitLabelTextColor: @labelTextColor;
@barFillColor: @handleBgColor;
@barNormalColor: #d8e0f3;
/* Slider size parameters */
@handleSize: 32px;
@handlePointerSize: 8px;
@bubblePadding: 1px 3px;
@barHeight: 4px;
rzslider {
display: inline-block;
position: relative;
height: @barHeight;
width: 100%;
margin: 30px 0 15px 0;
vertical-align: middle;
}
rzslider span {
white-space: nowrap;
position: absolute;
display: inline-block;
}
rzslider span.base {
width: 100%;
height: 100%;
padding: 0;
}
rzslider span.bar {
width: 100%;
height: 100%;
z-index: 0;
background: @barNormalColor;
.rounded(@barHeight/2);
}
rzslider span.bar.selection {
width: 0%;
z-index: 1;
background: @barFillColor;
.rounded(@barHeight/2);
}
rzslider span.pointer {
cursor: pointer;
width: @handleSize;
height: @handleSize;
top: -@handleSize/2 + @barHeight/2;
background-color: @handleBgColor;
z-index: 2;
.rounded(@handleSize/2);
}
rzslider span.pointer:after {
content: '';
width: @handlePointerSize;
height: @handlePointerSize;
position: absolute;
top: @handleSize/2 - @handlePointerSize/2;
left: @handleSize/2 - @handlePointerSize/2;
.rounded(@handlePointerSize/2);
background: @handleInnerColor;
}
rzslider span.pointer:hover:after {
background-color: @handleHoverColor;
}
rzslider span.pointer.active:after {
background-color: @handleActiveColor;
}
rzslider span.bubble {
cursor: default;
top: -@handleSize;
padding: @bubblePadding;
color: @labelTextColor;
}
rzslider span.bubble.selection {
top: @handleSize/2;
}
rzslider span.bubble.limit {
color: @limitLabelTextColor;
}