Is there a way to fix the issue with my input type="range" styling using linear-gradient when the variable is set to 75%? It seems to be behaving incorrectly.
body{
background: green;
}
.wrapper {
width: 20vmin;
}
input {
width: 100%;
--litters-range: 75%;
appearance: none;
outline: none;
height: 1vmin;
border-radius: 0.5vmin;
background: linear-gradient(
to left,
rgba(87, 87, 87, 0.46) calc(100% - var(--litters-range)),
white var(--litters-range)
);
}
input::-webkit-slider-thumb {
cursor: pointer;
appearance: none;
width: 2vmin;
height: 2vmin;
background: white;
border-radius: 50%;
}
// 25% works correctly but 75% not
<div class="wrapper">
<input type="range" />
</div>