[Bug 22980] [Shadow]: shadowRoot styles should not match the host element

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

Dominic Cooney <dominicc@chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dominicc@chromium.org

--- Comment #7 from Dominic Cooney <dominicc@chromium.org> ---
(In reply to comment #6)
> (In reply to comment #5)
> > Does this address the selector semantics concern?
> > 
> > 1. the host element is in the set of elements that selectors in shadowRoot
> > styles can match.
> > 2. any selector that does not contain :host cannot match the host element.
> 
> No, saying "X is in the set of elements, but it's impossible to select
> unless you tack this pseudo-class on" is identical to "using this
> pseudo-class adds X to the set of elements".  Selectors, pseudo-classes
> included, are just filters.  

Can't you add a layer of sugar? Host is in the set by default. In the (possibly
unwriteable) primitives there's :except-host which removes host from the set.

In the sugared layer, every rule is desugared to add :except-host. Unless the
rule contains :host. Then it the desugaring just removes :host (because it is
not primitive syntax, because it violates those things you were worried about)
and hence host remains in the set.

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

Received on Wednesday, 21 August 2013 00:46:51 UTC