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

CSS: Attribute selector not activating

1605385811
Richard T.
Pro
Marketplace Creator
Sheet Author
Compendium Curator
Having a strange issue with a css selector which I feel ought to fire but doesn't.  Here's the two tester styles, the first one is testing to see if my selector structure is correct.. div.sheet-heatpenalties div input + div {     background: blue; } div.sheet-heatpenalties div input[value~="1"] + div {     background: red; } But its not dress the divs as red, despite the input obviously displaying the correct input to trigger the style.  Here's the html in case there's a problem there.  <div class="heatpenalties"> <div><input readonly name="attr_heatpen-shutdown-auto"><input type="text"  name="attr_temperature-rank"><div>Shutdown</div></div>
1605396280
Richard T.
Pro
Marketplace Creator
Sheet Author
Compendium Curator
Welp, Scott C helped me figure it out. Its because roll20's value reading only works with type="hidden" and I was just using hidden attributes... unless I was trying debug... which also breaks it.