[csswg-drafts] Limitations on host context selection

jolleekin has just created a new issue for https://github.com/w3c/csswg-drafts:

== Limitations on host context selection ==
Let's say I have a custom element named `x-toggle` that can be either on or off. I want to style it based on its state and a color mode (light or dark). The color mode is specified by adding a CSS class (`.ui-light` or `.ui-dark`) to a parent element (usually `html`). Is there any way I can achieve the following style rules? Currently, this is impossible.
``` css
.ui-light x-toggle.on { ... }
.ui-light x-toggle.on:hover { ... }
.ui-light x-toggle.on:active,
.ui-light x-toggle.on:hover:active { ... }
.ui-light x-toggle.off { ... }
...
```


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1164 using your GitHub account

Received on Monday, 3 April 2017 16:03:57 UTC