considering the following 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%">
However, attempting to adjust the % using attr(data-percent) proves unsuccessful.
background: -webkit-linear-gradient(right, #fff 0%, green attr(data-percent), #fff 0%)
Is there a way to utilize the data-percent attribute of the element?
Note: The preference is to use the data-property for updating this value with JS as pseudo-elements cannot be selected with JS.