I need your help with CSS selectors. Imagine a style HTML tag:
<style type="text/css">
[...selector...] {color:red;}
</style>
I would like to construct a selector with multiple attributes and logical operators. But I didn't found the correct syntax.
My requirement:
The selector should find elements, which have a 'property' attribute and this 'property' attribute equals some URL. The second condition: the elements should have a 'resource' OR 'typeof' attribute (it isn't importent, what are the values).
So I need this logical structure: A = some URL && (B || C), and it must be in one selector.
How to do this?
You will need to repeat the property
attribute selector for each OR condition, combining each one with the second attribute selector like so:
[property="some URL"][resource], [property="some URL"][typeof] { color: red; }
Reference: http://www.w3.org/TR/css3-selectors/#attribute-selectors
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With