Let the example do the talking
.cyan {
background-color: cyan;
}
.red {
background-color: red;
}
.green {
background-color: green;
}
.blue {
background-color: blue;
}
.yellow {
background-color: yellow;
}
li:not(.yellow), li:not(.green) {
color: white;
}
<ul>
<li class="cyan">red</li>
<li class="red">red</li>
<li class="green">green</li>
<li class="blue">blue</li>
<li class="yellow">yellow</li>
</ul>
I want to keep cyan and yellow as they are. I am aware of other methods, but that's not what I'm looking for.
I wish to apply :not(.yellow or .green)