-
Notifications
You must be signed in to change notification settings - Fork 171
/
Copy path_base_forms-range.scss
96 lines (83 loc) · 2.41 KB
/
_base_forms-range.scss
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
@mixin vf-b-range {
$thumb-shadow: 0 0 $bar-thickness 1px rgba(0, 0, 0, 0.2);
$thumb-size: 1rem;
$thumb-radius: 50%;
$thumb-border: $input-border-thickness solid $colors--theme--border-high-contrast;
$track-height: $bar-thickness;
$track-radius: $bar-thickness;
// stylelint-disable selector-max-type -- base styles can use type selectors
input[type='range'] {
// stylelint-disable property-no-vendor-prefix
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
// stylelint-enable property-no-vendor-prefix
background-color: $color-transparent;
border-radius: $track-radius;
height: $track-height;
margin: ($spv--small - $track-height * 0.5) 0;
padding: 0;
vertical-align: bottom;
width: 100%;
// Chrome
&::-webkit-slider-runnable-track {
border-radius: $track-radius;
height: $track-height;
}
&::-webkit-slider-thumb {
// stylelint-disable property-no-vendor-prefix
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
// stylelint-enable property-no-vendor-prefix
background: $colors--theme--background-default;
border: $thumb-border;
border-radius: $thumb-radius;
box-shadow: $thumb-shadow;
height: $thumb-size;
margin-top: (-$thumb-size + $track-height) * 0.5;
width: $thumb-size;
&:hover {
cursor: pointer;
}
}
// Firefox
&::-moz-range-track {
background: $colors--theme--border-default; // default; //mid-light;
border-radius: $track-radius;
height: $track-height;
}
&::-moz-range-progress {
background-color: $colors--theme--link-default; //-link;
border-radius: $track-radius;
height: $track-height;
}
&::-moz-range-thumb {
background: $colors--theme--background-default; // x-light;
border: $thumb-border;
border-radius: $thumb-radius;
box-shadow: $thumb-shadow;
height: $thumb-size;
width: $thumb-size;
&:hover {
cursor: pointer;
}
}
&::-moz-focus-outer {
border: 0;
}
&:focus {
outline: none;
&::-webkit-slider-thumb {
outline: $bar-thickness solid $colors--theme--focus;
}
&::-moz-range-thumb {
outline: $bar-thickness solid $colors--theme--focus;
}
}
&:disabled {
opacity: 0.5;
}
// stylelint-enable selector-max-type
}
}