Re: ::distributed and relative selectors (Was Re: [shadowdom]: Using :root to specify the insertion point in ::distributed)

On Sat, Apr 20, 2013 at 2:55 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Fri, Apr 19, 2013 at 12:12 AM, fantasai
> <fantasai.lists@inkedblade.net> wrote:
> > I don't see how using :root solves the problem any more than disallowing
> > :scope. If there's no reason for :scope to be part of this syntax, let's
> > just say it matches nothing.
>
> We can't just say that, though, because when you absolutize "> div",
> you end up with ":scope > div".  That :scope has to match *something*.
>  It's just that the "something" can't be a real element.


I find it odd that

::distributed(:scope)

matches less stuff than

::distributed(:scope > div)

despite the fact that the latter is more detailed.

Wouldn't it be better to say that :root matches, not the Shadow Root, but
its children? The rest can be done with sugar introducing :root (although I
prefer a diet low in sugar, I appreciate the hardship some people find
typing five characters like :-r-o-o-t.)

Dominic

Received on Monday, 22 April 2013 01:21:26 UTC