Re: CSS + Shadow DOM = <3 + more

[disclaimer: I'm not a member of the CSS working group, just a mailing list 
participant]

Not sure about about ':host' vs '@host' but I think /select/ is not a great 
use of reference combinators. Reference combinators are specified to be 
linked to an attribute which refer to an element by its name or ID. Wouldn't 
an alternative like

    :host > div.special:in(.some-insertion-point)

or

    .some-insertion-point => div.special

be better than

    .some-insertion-point /select/ div.special

?

In the second case, I would define => a a combinator creating a set of 
elements which are direct layout children of the currently selected element, 
instead of > which select children in the node tree structure.


-----Message d'origine----- 
From: Dimitri Glazkov
Sent: Friday, June 15, 2012 8:31 PM
To: www-style@w3.org
Subject: CSS + Shadow DOM = <3 + more

Dear www-style folk,

I bring you gifts! Or more precisely, more stuff to worry about.

While developing the Shadow DOM spec
(http://www.w3.org/TR/shadow-dom/), we found a couple of places where
we need CSS to be stretched just a tiny bit to fit some additional
requirements. And here they are:

1) Shadow DOM subtrees need to be able to address their host. So I
added a :host pseudo-class. There's a discussion on whether it should
be a @host

2) Similarly, shadow DOM subtrees need to be able to address host's
children, distributed to insertion points. So I added a "select"
reference combinator.

You can see both here:
http://www.w3.org/TR/shadow-dom/#selecting-nodes-distributed-to-insertion-points

I would love to get your feedback and constructive improvement ideas
on both of these.

Additionally, it would be freakishly awesome if there was a
specification for "display:contents" somewhere. This would allow me to
start attempts at reconciling the special rendering status of the
ShadowRoot objects.

:DG< 

Received on Friday, 15 June 2012 19:03:17 UTC