[csswg-drafts] Context selectors' limitation

jolleekin has just created a new issue for 

== Context selectors' limitation ==
Suppose I have a custom element called `x-toggle`, which has two 
states `on` and `off` reflected by two CSS classes `on` and `off`, 

First I want to style the element based its states. This is simple as 
``` css
:host(.on) { ... }
:host(.off) { ... }

Next, I want to support RTL layout. The attribute `dir=rtl` can be 
specified on `x-foo` itself or one of its ancestors.
1. `dir=rtl` is on `x-foo`
``` css
:host([dir=rtl].on) { ... }
:host([dir=rtl].off) { ... }

2. `dir=rtl` is on an ancestor. Currently, there's no way I can create
 the following selectors within `x-foo`'s style tag. Will this problem
 be solved?
``` css
[dir=rtl] x-toggle.on { ... }
[dir=rtl] x-toggle.off { ... }
- https://drafts.csswg.org/css-scoping/#host-selector

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

Received on Thursday, 9 February 2017 02:53:02 UTC