Hi,
I'm new here and trying to do something that I'm not sure is possible with scss. I'm attempting to write a mixin that will allow me to style the different value states of the <progress> element.
Ideally, the mixin would work like this:
@mixin progress-value($value..., $color...) {
progress[value="#{$value}"] {
color: #{$color}; // For IE 10 progress bar
&::-webkit-progress-value { background-color: #{$color}; }
&::-moz-progress-bar { background-color: #{$color}; }
}
}
// Several different values passed as a sass list.
@include progress-value("0.25, #de2b23", "0.5, #FF8330", "0.75, #8A9F4A", "1, #14BB64");
So, I'd like the mixin to allow you to style different values of the progress bar, as it is incremented. I'm not sure how to go about taking that list of variables and applying them to the mixin arguments, though. Should I try to split each string and parse it, or is there some obvious solution here I'm missing that would work better? Thanks for all the help!