You might have hears of the newest (well.. to date) CSS pseudo-class,
While you can create style-effect, depending on the focus-state of either of the node’s descendant,
(yes, this also includes descendants of the shadow trees :]),
this is essentially a respond to a much needed (but still not fully here… yet…), from child to parent rule-set.
You can use it on latest Chromium, Chrome beta (v60+) and pretty much every Mozilla-Firefox from version 50+ (Firefox got there before Chrome? whaaaaat?)