I'm trying to do something like this:
:not(h1) > a,
:not(figure) > a {
background: #859900;
}
But it doesn't work, because figure>a
catches :not(h1)>a
and h1>a
catches :not(figure)>a
. How can I combine those?
Combine the two :not()
selectors, just as a selector for .class-a
AND .class-b
is .class-a.class-b
.
:not(h1):not(figure) > a {
color: red;
}
<h1><a>Test</a></h1>
<p><a>Test</a></p>
<figure>
<a>Test</a>
</figure>
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