<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>21389</bug_id>
          
          <creation_ts>2013-03-25 18:48:47 +0000</creation_ts>
          <short_desc>[Shadow]: ::distributed should allow the :root pseudo selector</short_desc>
          <delta_ts>2013-04-01 22:52:10 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>14978</blocked>
    
    <blocked>21499</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Steve Orvell">sorvell</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>dominicc</cc>
    
    <cc>hayato</cc>
    
    <cc>jackalmage</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>84937</commentid>
    <comment_count>0</comment_count>
    <who name="Steve Orvell">sorvell</who>
    <bug_when>2013-03-25 18:48:47 +0000</bug_when>
    <thetext>Now that it&apos;s possible to use ::distributed to style the nodes distributed to a given insertion point, the spec needs to clarify how this can be used to make selectors that match starting from distributed nodes themselves.

In general, one wants to be able to style the distributed nodes using complex css selectors:

/* style match .bar with .foo matching ancestors */
content::distributed(.foo .bar) {
  ...
}

However, it&apos;s common to want to create selectors that start at the distributed nodes themselves. The :root selector could be use for this purpose (http://dev.w3.org/csswg/selectors4/#the-root-pseudo).

/* match .bar descendants of distributed children matching .foo */
content::distribute(.foo:root .bar) {
  ...
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84989</commentid>
    <comment_count>1</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2013-03-26 00:55:59 +0000</bug_when>
    <thetext>I think this should be :scope and not :root.

As you can see in the scoping section of the CSS4 Selectors spec [1] &quot;The :root pseudo-class, however, still only matches the actual root of the document.&quot; even when doing a scope-contained selector.

Perhaps we can use :scope [2] for this, with the awkwardness that the ShadowRoot now becomes addressable despite not being style-able, and you have to write content::distributed(:scope &gt; .foo .bar) to mean what you want.

[1] &lt;http://dev.w3.org/csswg/selectors4/#scoping&gt;
[2] &lt;http://dev.w3.org/csswg/selectors4/#the-scope-pseudo&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84991</commentid>
    <comment_count>2</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-03-26 00:58:37 +0000</bug_when>
    <thetext>See this thread for discussion: http://lists.w3.org/Archives/Public/www-style/2013Mar/thread.html#msg581</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84992</commentid>
    <comment_count>3</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2013-03-26 02:13:56 +0000</bug_when>
    <thetext>Sounds good. Thanks for the link.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85242</commentid>
    <comment_count>4</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2013-04-01 06:55:51 +0000</bug_when>
    <thetext>Let me close the bug in favor of scope-relative selectors.
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21486</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>