-
Notifications
You must be signed in to change notification settings - Fork 4
/
slider.css
139 lines (118 loc) · 2.98 KB
/
slider.css
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
.item-input--slider {
width: 100%;
display: flex;
flex-direction: column;
padding: .5em;
}
.item-input--slider [type="range"] {
display: block;
width: 100%;
height: 2em;
border-radius: 1px;
margin: 0;
padding: 0;
background: transparent;
-webkit-appearance: none;
-moz-appearance: none;
-ms-appearance: none;
appearance: none;
font: inherit;
outline: 0;
z-index: 1;
cursor: pointer;
}
.item-input--slider:hover {
background: #f5f5f5;
}
.item-input--slider [type="range"]::-moz-focus-outer {
border: 0;
outline: none !important;
}
.item-input--slider [type="range"]::-ms-tooltip {
display: none;
}
/**************************** Tracks ****************************/
.item-input--slider [type="range"]::-webkit-slider-runnable-track {
position: relative;
background: rgba(0, 0, 0, .26);
height: 2px;
}
.item-input--slider [type="range"]::-moz-range-track {
position: relative;
background: rgba(0, 0, 0, .26);
height: 2px;
border: none;
}
.item-input--slider [type="range"]::-ms-track {
position: relative;
background: rgba(0, 0, 0, .26);
height: 2px;
width: 100%;
border: none;
}
.item-input--slider [type="range"]::-moz-range-progress {
background: #3f51b5;
}
.item-input--slider [type="range"]::-ms-fill-lower {
padding: 0;
background: #3f51b5;
}
/**************************** Thumbs ****************************/
.item-input--slider [type="range"]::-webkit-slider-thumb {
width: 1em;
height: 1em;
box-sizing: border-box;
position: absolute;
top: -.5em;
border: none;
border-radius: 50%;
background: #3f51b5;
transition: transform 0.18s cubic-bezier(.4,0,.2,1),
border 0.18s cubic-bezier(.4,0,.2,1),
box-shadow 0.18s cubic-bezier(.4,0,.2,1),
background-color 0.28s cubic-bezier(.4,0,.2,1);
-webkit-appearance: none;
}
.item-input--slider [type="range"]::-moz-range-thumb {
width: 1em;
height: 1em;
box-sizing: border-box;
position: absolute;
top: -.5em;
border: none;
border-radius: 50%;
background: #3f51b5;
-moz-appearance: none;
/*-moz-range-thumb doesn't currently support transitions.*/
}
.item-input--slider [type="range"]::-ms-thumb {
width: 1em;
height: 1em;
box-sizing: border-box;
position: absolute;
top: -.5em;
border: none;
border-radius: 50%;
background: #3f51b5;
}
.item-input--slider [type="range"]:focus:not(:active)::-webkit-slider-thumb {
box-shadow: 0 0 0 .5em rgba(63,81,181,.26);
}
.item-input--slider [type="range"]:focus:not(:active)::-moz-range-thumb {
box-shadow: 0 0 0 .5em rgba(63,81,181,.26);
}
.item-input--slider [type="range"]:focus:not(:active)::-ms-thumb {
box-shadow: 0 0 0 .5em rgba(63,81,181,.26);
}
.item-input--slider [type="range"]:active::-webkit-slider-thumb {
background-image: none;
transform: scale(1.25);
}
.item-input--slider [type="range"]:active::-moz-range-thumb {
background: #3f51b5;
transform: scale(1.25);
}
.item-input--slider [type="range"]:active::-ms-thumb {
background: #3f51b5;
transform: scale(1.25);
}