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 19685 - [Shadow]: We need comment about "scope" for shadow reference combinator.
Summary: [Shadow]: We need comment about "scope" for shadow reference combinator.
Status: RESOLVED MOVED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-24 04:12 UTC by Takashi Sakamoto
Modified: 2015-07-06 08:06 UTC (History)
0 users

See Also:


Attachments

Description Takashi Sakamoto 2012-10-24 04:12:04 UTC
The rule applicability algorithm in styles 7 works well to know whether some rule is applicable in the given TREE or not.

However, I think, we need some comments like:

- if RULE contains a select reference combinator and RULE is declared in shadow root style sheets:
  1. Let BOTTOM the shadow DOM subtree, with which these shadow root style sheets are associated

  2. If the shadow host of BOTTOM is in TREE, then RULE is applicable in TREE's children of shadow host whose shadow root has the shadow root style.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The reason why I need the comment is: 

Suppose that there are two divs in document tree. Each div has its own shadow dom subtree and shadow root stylesheets.

<div id="host1">
   <#shadow-root>
   <style>
   content /select/ div.special { color: red; }
   </style>
   <content>
   </#shadow-root>
   <div class="special">Comment 1</div>
</div>
<div id="host2">
   <#shadow-root>
   <content>
   </#shadow-root>
   <div class="special">Comment 2</div>
</div>

So looking at the shadow dom spec, the host1's 

   <style>
   content /select/ div.special { color: red; }
   </style>

is applicable in DOCUMENT tree. So "Comment 2" would be red colored?
Comment 1 Hayato Ito 2015-07-06 08:06:23 UTC
Moved to https://github.com/w3c/webcomponents/issues/248