@@ -9,6 +9,9 @@ $md-slider-padding: 8px !default;
9
9
10
10
$md-slider-track-thickness : 2px !default ;
11
11
$md-slider-thumb-size : 20px !default ;
12
+ $md-slider-thumb-border-width : 3px !default ;
13
+ $md-slider-thumb-border-width-active : 2px !default ;
14
+ $md-slider-thumb-border-width-disabled : 4px !default ;
12
15
13
16
$md-slider-thumb-default-scale : 0.7 !default ;
14
17
$md-slider-thumb-focus-scale : 1 !default ;
@@ -45,13 +48,15 @@ md-slider {
45
48
.md-slider-track-fill {
46
49
position : absolute ;
47
50
transform-origin : 0 0 ;
48
- transition : transform $swift-ease-out-duration $swift-ease-out-timing-function ;
51
+ transition : transform $swift-ease-out-duration $swift-ease-out-timing-function ,
52
+ background-color $swift-ease-out-duration $swift-ease-out-timing-function ;
49
53
}
50
54
51
55
.md-slider-track-background {
52
56
position : absolute ;
53
57
transform-origin : 100% 100% ;
54
- transition : transform $swift-ease-out-duration $swift-ease-out-timing-function ;
58
+ transition : transform $swift-ease-out-duration $swift-ease-out-timing-function ,
59
+ background-color $swift-ease-out-duration $swift-ease-out-timing-function ;
55
60
}
56
61
57
62
.md-slider-ticks-container {
@@ -62,6 +67,7 @@ md-slider {
62
67
}
63
68
64
69
.md-slider-ticks {
70
+ box-sizing : border-box ;
65
71
opacity : 0 ;
66
72
transition : opacity $swift-ease-out-duration $swift-ease-out-timing-function ;
67
73
}
@@ -76,11 +82,15 @@ md-slider {
76
82
position : absolute ;
77
83
right : - $md-slider-thumb-size / 2 ;
78
84
bottom : - $md-slider-thumb-size / 2 ;
85
+ box-sizing : border-box ;
79
86
width : $md-slider-thumb-size ;
80
87
height : $md-slider-thumb-size ;
88
+ border : $md-slider-thumb-border-width solid transparent ;
81
89
border-radius : 50% ;
82
90
transform : scale ($md-slider-thumb-default-scale );
83
- transition : transform $swift-ease-out-duration $swift-ease-out-timing-function ;
91
+ transition : transform $swift-ease-out-duration $swift-ease-out-timing-function ,
92
+ background-color $swift-ease-out-duration $swift-ease-out-timing-function ,
93
+ border-color $swift-ease-out-duration $swift-ease-out-timing-function ;
84
94
}
85
95
86
96
.md-slider-thumb-label {
@@ -91,16 +101,17 @@ md-slider {
91
101
width : $md-slider-thumb-label-size ;
92
102
height : $md-slider-thumb-label-size ;
93
103
border-radius : 50% ;
94
- transition : 300ms $swift-ease-in-out-timing-function ;
95
- transition-property : transform , border-radius ;
104
+ transition : transform $swift-ease-out-duration $swift-ease-out-timing-function ,
105
+ border-radius $swift-ease-out-duration $swift-ease-out-timing-function ,
106
+ background-color $swift-ease-out-duration $swift-ease-out-timing-function ;
96
107
}
97
108
98
109
.md-slider-thumb-label-text {
99
110
z-index : 1 ;
100
111
font-size : 12px ;
101
112
font-weight : bold ;
102
113
opacity : 0 ;
103
- transition : opacity 300 ms $swift-ease-in -out-timing-function ;
114
+ transition : opacity $swift-ease-out-duration $swift-ease -out-timing-function ;
104
115
}
105
116
106
117
@@ -123,13 +134,15 @@ md-slider {
123
134
position : absolute ;
124
135
border : 0 solid $md-slider-tick-color ;
125
136
opacity : 0 ;
126
- transition : opacity 300 ms $swift-ease-in -out-timing-function ;
137
+ transition : opacity $swift-ease-out-duration $swift-ease -out-timing-function ;
127
138
}
128
139
129
140
& .md-slider-active ,
130
141
& :hover {
131
- .md-slider-wrapper ::after {
132
- opacity : 1 ;
142
+ & :not (.md-slider-hide-last-tick ) {
143
+ .md-slider-wrapper ::after {
144
+ opacity : 1 ;
145
+ }
133
146
}
134
147
135
148
.md-slider-ticks {
@@ -162,6 +175,7 @@ md-slider {
162
175
// Active slider.
163
176
.md-slider-active {
164
177
.md-slider-thumb {
178
+ border-width : $md-slider-thumb-border-width-active ;
165
179
transform : scale ($md-slider-thumb-focus-scale );
166
180
}
167
181
@@ -182,6 +196,7 @@ md-slider {
182
196
// Disabled slider.
183
197
.md-slider-disabled {
184
198
.md-slider-thumb {
199
+ border-width : $md-slider-thumb-border-width-disabled ;
185
200
transform : scale ($md-slider-thumb-disabled-scale );
186
201
}
187
202
@@ -239,6 +254,7 @@ md-slider {
239
254
// (see https://bugzilla.mozilla.org/show_bug.cgi?id=1314319).
240
255
background : -moz-repeating-linear-gradient (0.0001deg , $md-slider-tick-color ,
241
256
$md-slider-tick-color $md-slider-tick-size , transparent 0 , transparent ) repeat ;
257
+ background-clip : content-box ;
242
258
height : $md-slider-track-thickness ;
243
259
width : 100% ;
244
260
}
@@ -252,7 +268,7 @@ md-slider {
252
268
.md-slider-thumb-label {
253
269
right : - $md-slider-thumb-label-size / 2 ;
254
270
top : - ($md-slider-thumb-label-size + $md-slider-thumb-arrow-gap );
255
- transform : translateY ($md-slider-thumb-label-size / 2 + $md-slider-thumb-arrow-gap ) scale (0.4 )
271
+ transform : translateY ($md-slider-thumb-label-size / 2 + $md-slider-thumb-arrow-gap ) scale (0.01 )
256
272
rotate (45deg );
257
273
}
258
274
@@ -312,6 +328,7 @@ md-slider {
312
328
.md-slider-ticks {
313
329
background : repeating-linear-gradient (to bottom , $md-slider-tick-color ,
314
330
$md-slider-tick-color $md-slider-tick-size , transparent 0 , transparent ) repeat ;
331
+ background-clip : content-box ;
315
332
width : $md-slider-track-thickness ;
316
333
height : 100% ;
317
334
}
@@ -325,8 +342,8 @@ md-slider {
325
342
.md-slider-thumb-label {
326
343
bottom : - $md-slider-thumb-label-size / 2 ;
327
344
left : - ($md-slider-thumb-label-size + $md-slider-thumb-arrow-gap );
328
- transform : translateX ($md-slider-thumb-label-size / 2 + $md-slider-thumb-arrow-gap )
329
- scale ( 0.4 ) rotate (-45deg );
345
+ transform : translateX ($md-slider-thumb-label-size / 2 + $md-slider-thumb-arrow-gap ) scale ( 0.01 )
346
+ rotate (-45deg );
330
347
}
331
348
332
349
.md-slider-thumb-label-text {
0 commit comments