W3C home > Mailing lists > Public > www-style@w3.org > March 2016

[css-scoping] Cascading Order clarification for Shadow DOM

From: 河内 隆仁 <kochi@google.com>
Date: Fri, 4 Mar 2016 18:48:24 +1100
Message-ID: <CADP2=hpBFoj-9Q=VcZo1Zf0jzX_00+0NsAQMNO3vWbGr4eJ45Q@mail.gmail.com>
To: www-style list <www-style@w3.org>
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.

Thanks,

[1]
https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Shadow-DOM-Cascade-Order.md
[2]
https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Shadow-DOM-Cascade-Order-in-v1.md

-- 
Takayoshi Kochi
Received on Friday, 4 March 2016 07:49:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:01 UTC