|
2 | 2 | --reach-slider: 1;
|
3 | 3 | }
|
4 | 4 |
|
5 |
| -[data-reach-slider-input][data-orientation="horizontal"] { |
6 |
| - width: 350px; |
| 5 | +[data-reach-slider-input] { |
7 | 6 | max-width: 100%;
|
8 |
| - height: 4px; |
9 |
| - padding-top: 30px; |
10 |
| - padding-bottom: 30px; |
| 7 | +} |
| 8 | + |
| 9 | +[data-reach-slider-input][data-orientation="horizontal"] { |
| 10 | + height: 0.5rem; |
11 | 11 | }
|
12 | 12 |
|
13 | 13 | [data-reach-slider-input][data-orientation="vertical"] {
|
14 |
| - width: 4px; |
| 14 | + width: 0.5rem; |
| 15 | + /* the height is somewhat arbitrary but necessary for vertical sliders for |
| 16 | + basic functionality */ |
15 | 17 | height: 250px;
|
16 | 18 | max-height: 100%;
|
17 |
| - max-width: calc(100% - 60%); |
18 |
| - padding-left: 30px; |
19 |
| - padding-right: 30px; |
20 | 19 | }
|
21 | 20 |
|
22 | 21 | [data-reach-slider-input][data-disabled] {
|
23 | 22 | opacity: 0.5;
|
| 23 | + pointer-events: none; |
24 | 24 | }
|
25 | 25 |
|
26 | 26 | [data-reach-slider-track] {
|
27 |
| - border-radius: 2px; |
28 |
| - background: #f2f2f2; |
| 27 | + position: relative; |
| 28 | + border-radius: 0.25rem; |
| 29 | + background: hsl(0, 0%, 95%); |
29 | 30 | }
|
30 | 31 |
|
31 | 32 | [data-reach-slider-track][data-orientation="horizontal"] {
|
|
38 | 39 | height: 100%;
|
39 | 40 | }
|
40 | 41 |
|
| 42 | +/* This pseudo element provides an invisible area that increases the touch |
| 43 | +target size of the track */ |
| 44 | +[data-reach-slider-track]::before { |
| 45 | + content: ""; |
| 46 | + position: absolute; |
| 47 | +} |
| 48 | + |
| 49 | +[data-reach-slider-track][data-orientation="horizontal"]::before { |
| 50 | + width: 100%; |
| 51 | + height: 1.5rem; |
| 52 | + top: calc(-0.5rem - 1px); |
| 53 | + left: 0; |
| 54 | +} |
| 55 | + |
| 56 | +[data-reach-slider-track][data-orientation="vertical"]::before { |
| 57 | + width: 1.5rem; |
| 58 | + height: 100%; |
| 59 | + top: 0; |
| 60 | + left: calc(-0.5rem - 1px); |
| 61 | +} |
| 62 | + |
41 | 63 | [data-reach-slider-handle] {
|
42 |
| - width: 12px; |
43 |
| - height: 12px; |
44 |
| - border: 2px solid #1159a6; |
45 |
| - background: #fff; |
| 64 | + width: 16px; |
| 65 | + height: 16px; |
| 66 | + background: #1159a6; |
46 | 67 | border-radius: 10px;
|
47 | 68 | z-index: 1;
|
48 | 69 | transform-origin: center;
|
|
62 | 83 | transform: translateX(-50%);
|
63 | 84 | }
|
64 | 85 |
|
65 |
| -[data-reach-slider-handle][aria-orientation="vertical"]:focus { |
66 |
| - transform: translateX(-50%); |
67 |
| -} |
68 |
| - |
69 | 86 | [data-reach-slider-range] {
|
70 | 87 | border-radius: inherit;
|
71 | 88 | background: #1159a6;
|
| 89 | + left: 0; |
| 90 | + bottom: 0; |
72 | 91 | }
|
73 | 92 |
|
74 | 93 | [data-reach-slider-range][data-orientation="horizontal"] {
|
|
80 | 99 | }
|
81 | 100 |
|
82 | 101 | [data-reach-slider-marker] {
|
83 |
| - width: 8px; |
84 |
| - height: 8px; |
85 |
| - background: inherit; |
86 |
| - border: 1px solid #fff; |
87 |
| - border-radius: 4px; |
| 102 | + background: hsl(0, 0%, 50%); |
88 | 103 | transform-origin: center;
|
89 | 104 | }
|
90 | 105 |
|
91 | 106 | [data-reach-slider-marker][data-orientation="horizontal"] {
|
92 | 107 | top: 50%;
|
93 | 108 | transform: translate(-50%, -50%);
|
| 109 | + width: 3px; |
| 110 | + height: 0.75rem; |
94 | 111 | }
|
95 | 112 |
|
96 | 113 | [data-reach-slider-marker][data-orientation="vertical"] {
|
97 | 114 | left: 50%;
|
98 | 115 | transform: translate(-50%, -50%);
|
| 116 | + width: 0.75rem; |
| 117 | + height: 3px; |
99 | 118 | }
|
100 | 119 |
|
101 | 120 | [data-reach-slider-marker][data-state="at-value"],
|
102 | 121 | [data-reach-slider-marker][data-state="under-value"] {
|
103 |
| - background: #1159a6; |
| 122 | + /* */ |
104 | 123 | }
|
105 | 124 |
|
106 | 125 | /* TODO: Remove in 1.0 */
|
107 | 126 | [data-reach-slider-track-highlight] {
|
108 | 127 | border-radius: inherit;
|
109 | 128 | background: #1159a6;
|
| 129 | + left: 0; |
| 130 | + bottom: 0; |
110 | 131 | }
|
111 | 132 |
|
112 | 133 | [data-reach-slider-track-highlight][data-orientation="horizontal"] {
|
|
0 commit comments