I'm trying to use :host-context() and adjacent sibling selectors to style an element like this:
<x-foo id="1" active></x-foo>
<x-foo id="2"></x-foo> <!-- use :host-context() to target #2 when adjacent sibling, #1 is [active] -->
<x-foo id="3"></x-foo>
My element definition looks something like:
<dom-module id="x-foo">
<template>
<style>
:host-context(x-foo[active] + x-foo) {
background-color: yellow;
}
</style>
Hello
</template>
<script src="x-foo.js"></script>
</dom-module>
However this doesn't quite work. Why not?