Re: [css-scoping] Shadow Cascading

On Wed Feb 04 2015 at 12:54:41 AM Rune Lillesveen <rune@opera.com> wrote:

> In [1] you have:
>
> "When comparing two declarations, if one of them is in a shadow tree
> and the other is in a document that contains that shadow tree, then
> for normal rules the declaration from the outer document wins, and for
> important rules the declaration from the shadow tree wins."
>
> What about nested shadow trees? Could "document" be "shadow tree" as well?
>
>
I think so. You can replace "document", "shadow tree", with "parent node
tree", "child node tree" respectively.



> Also,
>
> "When calculating Order of Appearance, the tree of trees, defined by
> the Shadow DOM specification, is used to calculate ordering."
>
> Assuming the first point holds for nested shadow trees as well, order
> of appearance only applies within the same scope, right?
>
>
I think this paragraph is, at least, for the case of 'sibling tress' which
is not hosted by the same host. Suppose element A and element B are in the
same node tree, and A hosts a shadow tree, SA, and B hosts a shadow tree,
SB. This rule can be used for comparing two declarations in SA and in SB.



> If so, using "tree of trees" might mislead to think otherwise.
>
>
> [1] http://dev.w3.org/csswg/css-scoping/#shadow-cascading
>
> --
> Rune Lillesveen
>
>

Received on Wednesday, 4 February 2015 04:51:44 UTC