[Bug 23636] [Shadow]: selectors in style elements in shadowRoots should match in sibling shadowRoots

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23636

--- Comment #1 from Steve Orvell <sorvell@chromium.org> ---
This would also allow us to eliminate the [space] and > combinators to the
right of :host. These combinators next to :host are confusing since one would
think they match elements in the host's scope, but they in fact, match elements
in the shadowRoot. For example, :host means match the host but :host > * means
match children inside the host's *shadowRoot*.

Instead, these combinators should match nothing when to the right of :host. The
^ combinators should be used for these types of selectors since it specifically
jumps into a shadowRoot.

1. match an element in shadowRoot that matches .foo if a host matches .bar:

   * old: :host(.bar:host)  .foo
   * new: :host(.bar:host) ^ .foo

2. match an element that's a .foo child of a shadowRoot if a host matches.bar:

   * old: :host(.bar:host) > .foo
   * new: :host(.bar:host) ^ :top > .foo 

The proposed selectors are non-trivial, but they avoid applying magical new
behavior for the [space] and > combinators.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 25 October 2013 21:42:22 UTC