This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
This issue should land on CSS Scoping spec, but I think it's better to discuss here and have some level of common understanding before we go www-style, because complex tree of trees is too much for most members at www-style. If this doesn't look right, please close and I'll go www-style. The Shadow Cascading of CSS Scoping spec[1] defines: * Outer wins if inner/outer * Younger wins if younger/older But Takashi and I are finding a few cases where trees have more complex relationships. We should define how cascading occurs in such cases, which wins, or prohibit. Case 1: Re-distributions By using multiple and nesting together, re-distribution can cause such relationship. Example: http://jsbin.com/wabigi div div SR-OLDER div content SR-NEST-OF-OLDER style ::content * {color:red} content SR-YOUNGER style ::content * {color:green} shadow Case 2: :host and shadow-piercing descendant combinator The combination of :host and shadow-piercing descendant combinator can select descendants of younger/older trees. [1] http://dev.w3.org/csswg/css-scoping/#cascading
My current opinion is: Case 1: The final destination wins for re-distributions. Case 2: Prohibit this combination. I think the use cases for the shadow-piercing descendant combinator is mostly "html >>>" or "* >>>", IIUC.
Takashi found another combination that causes cascading from non-parent/younger/older relationship: Case 3: ::content /deep/
A previous discussion at www-style here: https://lists.w3.org/Archives/Public/www-style/2015Feb/0026.html
This is no longer an issue because multiple shadow roots and piercing combinators were both removed.