I have some nested elements like this:
-
A little bit late to the party, and it might not match your use case, but this is what I ended up doing:
HTML:
CSS:
.select-inside-this .select-this {
background: blue;
}
.select-inside-this .not-inside-this .select-this {
background: none;
}
The trick is to positively select the negative element and just undo the style.
It'll work for simple use cases, at the very least.
- 热议问题