Re: [webcomponents] Define the behavior of '::slotted' (the former name is '::content'). (#331)

Let me confirm:

For Shadow DOM V0, the following pattern is often used:
`::content > div { color: blue; }`

The `color: blue` is applied to `<div>`, not the parenting `<content>`.
(and in the selector matching, `::content` matches `<content>`, of course)

In the proposed `::slotted()` for V1, an author would expect the same as above by:
`::slotted(div) { color: blue; }`

If @hayatoito's comment above is adopted, the `color: blue` is applied to `<div>`
(which is node *B* in the comment), not the parenting `<slot>` (which is node *A*).

Obviously if an author wants to style `<slot>` element itself,
it can write `slot { color: blue; }` and no fancy pseudo class/element should be required,
so the matching logic in the above comment should be correct, but let me confirm.

(I was a bit confused by the name, btw)

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

Received on Monday, 14 December 2015 08:51:03 UTC