This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28522 - [Shadow] Cascading for trees of no-inner/outer and no-younger/older relationship
Summary: [Shadow] Cascading for trees of no-inner/outer and no-younger/older relationship
Status: RESOLVED WONTFIX
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 28552
  Show dependency treegraph
 
Reported: 2015-04-21 07:27 UTC by Koji Ishii
Modified: 2015-04-28 04:42 UTC (History)
6 users (show)

See Also:


Attachments

Description Koji Ishii 2015-04-21 07:27:54 UTC
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
Comment 1 Koji Ishii 2015-04-21 07:57:37 UTC
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.
Comment 2 Koji Ishii 2015-04-21 13:32:24 UTC
Takashi found another combination that causes cascading from non-parent/younger/older relationship:

Case 3: ::content /deep/
Comment 3 Koji Ishii 2015-04-24 04:11:22 UTC
A previous discussion at www-style here:
https://lists.w3.org/Archives/Public/www-style/2015Feb/0026.html
Comment 4 Koji Ishii 2015-04-28 04:42:25 UTC
This is no longer an issue because multiple shadow roots and piercing combinators were both removed.