Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Not able to hide item in repeating section with CSS

I have a repeating section as follows:                 <fieldset class="repeating_readout">                     <div class="readoutrow">                         <details>                             <summary>                                 <div class="perkname">                                     <input type="hidden" name="attr_perkname" value=""/>                                     <input type="hidden" name="attr_perkcost" class="showcost" value="0"/>                                     <span name="attr_perkname"></span>                                      <input type="hidden" name="attr_perkcost" class="showcost" value="0"/>                                     <span class="costspan">(                                     <span name="attr_perkcost"></span> CANS):</span>                                 </div>                             </summary>                             <input type="hidden" name="attr_perktext" value=""/>                             <span name="attr_perktext" class="white-text"></span>                             <input type="hidden" name="attr_random" class="randomflag" value="none"/>                             <button type="action" name="act_randomspeed" class="perkdie randomspeed">F</button>                         </details>                     </div>                 </fieldset> with the following CSS: .randomflag:not[value="speed"] ~ .randomspeed{     display:none; } When the value of the input "random" changes, it should toggle the display for the button, but it doesn't work. What am I doing wrong?
1659712717
GiGs
Pro
Sheet Author
API Scripter
You have to use a slightly different syntax when using not. It's actually :not() - the parentheses are part of the selector. Try this: .randomflag:not([value="speed"]) ~ .randomspeed{     display:none; }
Thank you! I actually knew this, but I was having a brain fart and didn't notice I had forgotten the parentheses.