Re: [webcomponents] Clarification needed :root CSS pseudo class matches ShadowRoot or not (#338)

As a thought, if we want to simplify new API changes, we can use `:root` in the context of a shadow tree to match the host element instead of `:host`.

Right now `:host` is defined as such:
> The :host pseudo-class, when evaluated in the context of a shadow tree, matches the shadow tree’s host element. In any other context, it matches nothing.
http://www.w3.org/TR/css-scoping-1/#selectordef-host0

It seems odd to have two selectors that share similar concepts, but are mutually exclusive in two different contexts. Granted, `:host` is a little more descriptive given the terminology used in the discussion so far, but its not a stretch to refer to a shadow tree's host node as its "root element". It also may be easier for devs not following these conversations to use a familiar and existing term/mental-model when describing shadow dom.



---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/338#issuecomment-146438131

Received on Thursday, 8 October 2015 06:57:38 UTC