Looking to see if anyone can suggest a more efficient/better method for handling this? I want to use visability:hidden on all span's that are after radio inputs(attr_damage) greater than a given value based on the value of another attribute(attr_strength). Simplified HTML <input class="strength-value" type="hidden" name="attr_strength" value="0" />
<input class="damage" type="radio" name="attr_damage" value="0" checked /><span></span>
<input class="damage" type="radio" name="attr_damage" value="1" /><span></span>
<input class="damage" type="radio" name="attr_damage" value="2" /><span></span>
<input class="damage" type="radio" name="attr_damage" value="3" /><span></span>
<input class="damage" type="radio" name="attr_damage" value="4" /><span></span>
<input class="damage" type="radio" name="attr_damage" value="5" /><span></span>
<input class="damage" type="radio" name="attr_damage" value="6" /><span></span>
Simplified CSS .sheet-strength[value="0"] ~ .sheet-skull[value="1"] + span::before,
.sheet-strength[value="0"] ~ .sheet-skull[value="2"] + span::before,
.sheet-strength[value="0"] ~ .sheet-skull[value="3"] + span::before,
.sheet-strength[value="0"] ~ .sheet-skull[value="4"] + span::before,
.sheet-strength[value="0"] ~ .sheet-skull[value="5"] + span::before,
.sheet-strength[value="0"] ~ .sheet-skull[value="6"] + span::before,
.sheet-strength[value="1"] ~ .sheet-skull[value="2"] + span::before,
.sheet-strength[value="1"] ~ .sheet-skull[value="3"] + span::before,
.sheet-strength[value="1"] ~ .sheet-skull[value="4"] + span::before,
.sheet-strength[value="1"] ~ .sheet-skull[value="5"] + span::before,
.sheet-strength[value="1"] ~ .sheet-skull[value="6"] + span::before,
.sheet-strength[value="2"] ~ .sheet-skull[value="3"] + span::before,
.sheet-strength[value="2"] ~ .sheet-skull[value="4"] + span::before,
.sheet-strength[value="2"] ~ .sheet-skull[value="5"] + span::before,
.sheet-strength[value="2"] ~ .sheet-skull[value="6"] + span::before,
.sheet-strength[value="3"] ~ .sheet-skull[value="4"] + span::before,
.sheet-strength[value="3"] ~ .sheet-skull[value="5"] + span::before,
.sheet-strength[value="3"] ~ .sheet-skull[value="6"] + span::before,
.sheet-strength[value="4"] ~ .sheet-skull[value="5"] + span::before,
.sheet-strength[value="4"] ~ .sheet-skull[value="6"] + span::before,
.sheet-strength[value="5"] ~ .sheet-skull[value="6"] + span::before {
visibility: hidden;
} The code above basically uses the value of @{strength} and compares it to every value of @{damage} and only the values that are greater than @{strength} get the visability:hidden style. Great, but that's quite a bit of code. I'm doing this for multiple character attributes and even have one radio that goes from 0-48! Using the above CSS, it ends up being over 1000 lines of CSS just to handle the 48 values... So, can anyone see a better option for handling this? Thanks