[webcomponents] [Shadow] Style attributes in Shadow DOM Cascade Order Proposal (#316)

The [Shadow DOM Cascade Order proposal] asks for clarifications on cascading order of style attributes in its [clarification] section. I think it's worth a separate topic, and this issue is for it.

The proposal suggests:
> declarations from style attributes should belong to the same tree in terms of cascading as the element on which it is set.

Let's call this **Option 1**, and I'd like to seek for what are other sensible options.

Historically, a style attribute is defined to have the highest specificity in CSS 2.1 and [Cascading in CSS Style Attributes]. When [**Scope**][css-cascade-scope] is added between **Origin** and **Specificity**, a style attribute was adjusted to have the highest precedence in the **Scope** (see Notes in the spec.)

If we were to do similarly for the [**Shadow Tree**][Cascading in CSS Scoping] cascade criteria, following two options look reasonable to consider:

Precedence | Option 2 | Option 3
---------- | -------- | --------
Higher | Important attriutes | Important attributes
 | Important inner | Important inner
 | Important outer | Important outer
 | Normal attributes | Normal outer
 | Normal outer | Normal attributes
Lower | Normal inner | Normal inner

Thoughts?

[Shadow DOM Cascade Order proposal]: https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Shadow-DOM-Cascade-Order.md
[clarification]: https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Shadow-DOM-Cascade-Order.md#clarification
[css-scoping]: http://dev.w3.org/csswg/css-scoping-1/
[Cascading in CSS Scoping]: http://dev.w3.org/csswg/css-scoping-1/#cascading
[css-cascade-scope]: http://dev.w3.org/csswg/css-cascade-3/#cascade-scope
[Cascading in CSS Style Attributes]: https://drafts.csswg.org/css-style-attr/#interpret


---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/316

Received on Tuesday, 8 September 2015 02:24:11 UTC