Skip to content

Commit 4926cf1

Browse files
author
matthewcsimpson
committed
css revision
1 parent 2313a4e commit 4926cf1

1 file changed

Lines changed: 9 additions & 44 deletions

File tree

Dist/Functional/RangeSliderSimple.js

Lines changed: 9 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -173,67 +173,32 @@ class RangeSliderSimple {
173173

174174
const style = document.createElement('style');
175175
style.id = 'wt-rangeslidersimple-styles';
176+
/* Layout only: no appearance:none or ::-webkit-slider-* / ::-moz-range-* so thumbs/tracks stay browser-default. */
176177
style.textContent = `
177178
[${ATTR_PREFIX}-element="slider"] {
178179
position: relative;
179-
min-height: 32px;
180+
min-height: 2.75rem;
181+
box-sizing: border-box;
180182
}
181183
182184
[${ATTR_PREFIX}-element="input-left"],
183185
[${ATTR_PREFIX}-element="input-right"] {
184186
position: absolute;
185187
left: 0;
186188
width: 100%;
187-
top: 0;
188-
bottom: 0;
189-
margin: auto;
190-
height: 24px;
191-
-webkit-appearance: none;
192-
appearance: none;
193-
background: transparent;
189+
max-width: 100%;
190+
top: 50%;
191+
transform: translateY(-50%);
192+
margin: 0;
193+
padding: 0;
194+
box-sizing: border-box;
194195
pointer-events: auto;
195196
z-index: 2;
196-
outline: none;
197197
}
198198
199199
[${ATTR_PREFIX}-element="input-right"] {
200200
z-index: 1;
201201
}
202-
203-
[${ATTR_PREFIX}-element="input-left"]::-webkit-slider-thumb,
204-
[${ATTR_PREFIX}-element="input-right"]::-webkit-slider-thumb {
205-
-webkit-appearance: none;
206-
width: 18px;
207-
height: 18px;
208-
border-radius: 50%;
209-
background: #222;
210-
cursor: pointer;
211-
pointer-events: auto;
212-
}
213-
214-
[${ATTR_PREFIX}-element="input-left"]::-moz-range-thumb,
215-
[${ATTR_PREFIX}-element="input-right"]::-moz-range-thumb {
216-
width: 18px;
217-
height: 18px;
218-
border-radius: 50%;
219-
background: #222;
220-
cursor: pointer;
221-
border: none;
222-
}
223-
224-
[${ATTR_PREFIX}-element="input-left"]::-webkit-slider-runnable-track,
225-
[${ATTR_PREFIX}-element="input-right"]::-webkit-slider-runnable-track {
226-
height: 6px;
227-
border-radius: 3px;
228-
background: rgba(0, 0, 0, 0.12);
229-
}
230-
231-
[${ATTR_PREFIX}-element="input-left"]::-moz-range-track,
232-
[${ATTR_PREFIX}-element="input-right"]::-moz-range-track {
233-
height: 6px;
234-
border-radius: 3px;
235-
background: rgba(0, 0, 0, 0.12);
236-
}
237202
`;
238203
document.head.appendChild(style);
239204
}

0 commit comments

Comments
 (0)