I am trying to design a progress bar and I want to try to set the width of the bar depending on some mathematical calculations.
Below is working fine, since I am hardcoding the width to 60%
.pledged(style="width:60%")
I want to do something like this:
.pledged(style="width:((totalVotes - votesRemaining)*100)%")
Is it possible what I am trying to achieve?
Be sure to add #{}
to get access to your variables:
.pledged(style="width:#{totalVotes - votesRemaining)*100}%")