Re: [shadow-styling] First Draft of Shadow DOM Styling uploaded

On Feb 8, 2014, at 12:09 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

>> I guess this means I'm just seeing <"shadow-tree"> more like an unstylable element that has to be in the selector chain as 'shadow' if you want to reach its descendants. In fact, if it didn't have quotes, it could even just be selected like an element, rather than as something that only a new combinator or pseudo-element can reach through. But I don't see how any of this is worse, syntax-wise. It seems simpler.
> 
> Other people have suggested that as well in the past, but making it an
> element ends up causing its own suite of problems.  It works best as
> something equivalent to a document fragment.

I didn't say you would need to be an element, just that selecting could be similar to selecting an element. You wouldn't be able to style it directly. Maybe that means it's better to use ::shadow instead of /shadow, but that's just a detail of what characters to use; it doesn't have to be a syntactical straight jacket.

Selecting a document fragment is what ::first-line does. For this, we can think of it as being something like '::shadow-document' to get to that "fragment", which then lets you (and requires you to, in order to be useful) also select its children by adding to the selector chain on the right.

Received on Saturday, 8 February 2014 16:48:08 UTC