|
320 | 320 |
|
321 | 321 | &:focus { |
322 | 322 | outline: none; |
| 323 | + |
| 324 | + // Pseudo-elements must be split across multiple rulesets to have an affect. |
| 325 | + // No box-shadow() mixin for focus accessibility. |
| 326 | + &::-webkit-slider-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; } |
| 327 | + &::-moz-range-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; } |
| 328 | + &::-ms-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; } |
323 | 329 | } |
324 | 330 |
|
325 | 331 | &::-moz-focus-outer { |
|
329 | 335 | &::-webkit-slider-thumb { |
330 | 336 | width: $custom-range-thumb-width; |
331 | 337 | height: $custom-range-thumb-height; |
332 | | - margin-top: -($custom-range-thumb-width * .25); // Webkit specific? |
| 338 | + margin-top: (($custom-range-track-height - $custom-range-thumb-height) / 2); // Webkit specific |
333 | 339 | @include gradient-bg($custom-range-thumb-bg); |
334 | 340 | border: $custom-range-thumb-border; |
335 | 341 | @include border-radius($custom-range-thumb-border-radius); |
336 | 342 | @include box-shadow($custom-range-thumb-box-shadow); |
337 | 343 | @include transition($custom-forms-transition); |
338 | 344 | appearance: none; |
339 | 345 |
|
340 | | - &:focus { |
341 | | - outline: none; |
342 | | - box-shadow: $custom-range-thumb-focus-box-shadow; // No mixin for focus accessibility |
343 | | - } |
344 | | - |
345 | 346 | &:active { |
346 | 347 | @include gradient-bg($custom-range-thumb-active-bg); |
347 | 348 | } |
|
368 | 369 | @include transition($custom-forms-transition); |
369 | 370 | appearance: none; |
370 | 371 |
|
371 | | - &:focus { |
372 | | - outline: none; |
373 | | - box-shadow: $custom-range-thumb-focus-box-shadow; // No mixin for focus accessibility |
374 | | - } |
375 | | - |
376 | 372 | &:active { |
377 | 373 | @include gradient-bg($custom-range-thumb-active-bg); |
378 | 374 | } |
|
392 | 388 | &::-ms-thumb { |
393 | 389 | width: $custom-range-thumb-width; |
394 | 390 | height: $custom-range-thumb-height; |
| 391 | + margin-top: 0; // Edge specific |
| 392 | + margin-right: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden. |
| 393 | + margin-left: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden. |
395 | 394 | @include gradient-bg($custom-range-thumb-bg); |
396 | 395 | border: $custom-range-thumb-border; |
397 | 396 | @include border-radius($custom-range-thumb-border-radius); |
398 | 397 | @include box-shadow($custom-range-thumb-box-shadow); |
399 | 398 | @include transition($custom-forms-transition); |
400 | 399 | appearance: none; |
401 | 400 |
|
402 | | - &:focus { |
403 | | - outline: none; |
404 | | - box-shadow: $custom-range-thumb-focus-box-shadow; // No mixin for focus accessibility |
405 | | - } |
406 | | - |
407 | 401 | &:active { |
408 | 402 | @include gradient-bg($custom-range-thumb-active-bg); |
409 | 403 | } |
|
0 commit comments