W3C home > Mailing lists > Public > public-css-archive@w3.org > April 2017

[csswg-drafts] Limitations on host context selection

From: Man Hoang via GitHub <sysbot+gh@w3.org>
Date: Mon, 03 Apr 2017 16:03:50 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-218982502-1491235428-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:10 UTC