feat: tweak slider colors to be more muted (#9076)

feat/remove-ga
David Luzar 4 weeks ago committed by Mark Tolmacs
parent 48a1b590b3
commit b4920f6b20
No known key found for this signature in database

@ -13,24 +13,24 @@
width: 100%; width: 100%;
height: 4px; height: 4px;
-webkit-appearance: none; -webkit-appearance: none;
background: var(--Range-track-background); background: var(--color-slider-track);
border-radius: 2px; border-radius: 2px;
outline: none; outline: none;
} }
.range-input::-webkit-slider-thumb { .range-input::-webkit-slider-thumb {
-webkit-appearance: none; -webkit-appearance: none;
appearance: none; appearance: none;
width: 20px; width: var(--slider-thumb-size);
height: 20px; height: var(--slider-thumb-size);
background: var(--Range-thumb-background); background: var(--color-slider-thumb);
border-radius: 50%; border-radius: 50%;
cursor: pointer; cursor: pointer;
border: none; border: none;
} }
.range-input::-moz-range-thumb { .range-input::-moz-range-thumb {
width: 20px; width: var(--slider-thumb-size);
height: 20px; height: var(--slider-thumb-size);
background: var(--Range-thumb-background); background: var(--color-slider-thumb);
border-radius: 50%; border-radius: 50%;
cursor: pointer; cursor: pointer;
border: none; border: none;
@ -40,13 +40,13 @@
bottom: 0; bottom: 0;
transform: translateX(-50%); transform: translateX(-50%);
font-size: 12px; font-size: 12px;
color: var(--Range-legend-color); color: var(--text-primary-color);
} }
.zero-label { .zero-label {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 4px; left: 4px;
font-size: 12px; font-size: 12px;
color: var(--Range-legend-color); color: var(--text-primary-color);
} }
} }

@ -32,7 +32,7 @@ export const Range = ({
const position = const position =
(value / 100) * (inputWidth - thumbWidth) + thumbWidth / 2; (value / 100) * (inputWidth - thumbWidth) + thumbWidth / 2;
valueElement.style.left = `${position}px`; valueElement.style.left = `${position}px`;
rangeElement.style.background = `linear-gradient(to right, var(--color-primary) 0%, var(--color-primary) ${value}%, var(--button-bg) ${value}%, var(--button-bg) 100%)`; rangeElement.style.background = `linear-gradient(to right, var(--color-slider-track) 0%, var(--color-slider-track) ${value}%, var(--button-bg) ${value}%, var(--button-bg) 100%)`;
} }
}, [value]); }, [value]);
return ( return (

Loading…
Cancel
Save