given this input
.prettyRange {
-webkit-appereance: none;
}
.prettyRange::-webkit-slider-runnable-track {
background: -webkit-linear-gradient(right, #fff 0%, green 50%, #fff 0%);
}
<input class="prettyRange" type="range" name="capability" data-percent="100%">
But if i'm trying to set the % via attr(data-percent) it doesn't work.
background: -webkit-linear-gradient(right, #fff 0%, green attr(data-percent), #fff 0%)
How can I use the data-percent property of the item?
PS: I want to use the data-property because I need to update this value using JS and we cannot select pseudo-elements with JS.