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

Quick CSS Question

My CSS is very weak. I have a selector that can change font colour based on a (hidden) attribute from the default (not shown, but is white). What I am wondering is how (or if) I can combine these (so h1 and h3 are on the same line) AND if I had multiple values for the attr_nation (lets say Canada and England) that changed the colour to black, how would that go. For instance in Javascript, it might use a ||  Thanks for the input (and education!) input [ type = "hidden" ][ name = "attr_nation" ][ value = "Canada" ] ~ .header h1 { color : black ; } input [ type = "hidden" ][ name = "attr_nation" ][ value = "Canada" ] ~ .header h3 { color : black ; }
1698947972

Edited 1698948070
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You can use the :is()  selector : input[type="hidden"][name="attr_nation"]:is([value="Canada"],[value="England"]) ~ .header :is(h1,h3) { color: black; } Note that your code editor may not syntax highlight this properly as it is fairly new.
Thanks, that is perfect!