Re: [css-scoping] Cascading Order clarification for Shadow DOM

(I and Tab chatted about this, but let me share my comment also here.)

I no longer recommend to refer to the concept of "the tree of trees", which
is now a *non-normative* concept.
Recently, I have updated the Shadow DOM spec so that normative sections no
longer depend on the concept of "the tree of trees".

Instead, I guess you can use "shadow-including tree order" [1], if you want
a well-defined order between nodes which share the same shadow-including
root [2], across node trees.

[1]: https://dom.spec.whatwg.org/#concept-shadow-including-tree-order.
[2]: https://dom.spec.whatwg.org/#concept-shadow-including-root


On Thu, Apr 14, 2016 at 8:50 AM Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Thu, Mar 3, 2016 at 11:48 PM, Takayoshi Kochi (河内 隆仁)
> <kochi@google.com> wrote:
> > Since last TPAC 2015, we have discussed the clarification of cascading
> order
> > issue on
> > https://github.com/w3c/webcomponents/issues/316
> >
> > The problem of the current spec (CSS Scoping Level1, 3.3.1) is
> > - the ordering is not clear about comparing rules coming from
> > non-inner/outer shadow roots
> > - how declarations in style attribute are compared to other rules was
> > unclear
> >
> > We seem to have agreed upon one proposal, essentially
> >
> > - Rules coming from other shadow trees are compared in tree-of-trees
> order
> >   (one coming earlier in the order wins without !important, coming later
> > wins with !important)
> > - For style attribute, it is treated as if it is scoped to the element
> >
> > The original proposal was from Rune Lillesveen [1], and further
> > clarification
> > proposal from Hayato Ito [2].
> >
> > The corresponding test is posted to
> > http://w3c-test.org/shadow-dom/styles/shadow-cascade-order.html
> >
> > If there is no objection on this list, we'd like this clarifications to
> be
> > applied
> > to CSS Scoping module.
>
> Done, tho I currently have an undefined "tree-of-trees order" term in
> the spec, because I couldn't find a good term to refer to.  Help would
> be appreciated. ^_^
>
> ~TJ
>
>

Received on Thursday, 14 April 2016 05:51:53 UTC