<?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>26552</bug_id>
          
          <creation_ts>2014-08-11 11:11:57 +0000</creation_ts>
          <short_desc>[Shadow]: consider supporting :first-child, nth-child() in content select</short_desc>
          <delta_ts>2014-08-13 02:47:18 +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>DUPLICATE</resolution>
          <dup_id>24872</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tomek Wytrębowicz">tomalecpub</reporter>
          <assigned_to name="Hayato Ito">hayato</assigned_to>
          <cc>hayato</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>110058</commentid>
    <comment_count>0</comment_count>
    <who name="Tomek Wytrębowicz">tomalecpub</who>
    <bug_when>2014-08-11 11:11:57 +0000</bug_when>
    <thetext>&quot;3.6 Satisfying Matching Criteria&quot;

Consider following case. Custom Element that extends ordered list(, and creates a pyramid of news)
my-article-list shadow root:

&lt;div class=&quot;lead&quot;&gt;
    &lt;h1&gt;Breaking news:&lt;/h1&gt;
    &lt;content select=&quot;:first-child&quot;&gt;&lt;/content&gt;
&lt;/div&gt;
&lt;div class=&quot;asides&quot;&gt;
    &lt;content select=&quot;:nth-child(2)&quot;&gt;&lt;/content&gt;
    &lt;content select=&quot;:nth-child(3)&quot;&gt;&lt;/content&gt;
&lt;/div&gt;
&lt;div&gt;
    &lt;content&gt;&lt;/content&gt;
&lt;/div&gt;

And input should look like:

&lt;my-article-list&gt;
    &lt;article&gt;Most important article&lt;/article&gt;
    &lt;article&gt;Important article&lt;/article&gt;
    &lt;article&gt;Important article&lt;/article&gt;
    &lt;article&gt;article&lt;/article&gt;
    ...
&lt;/my-article-list&gt;


Without those pseudo-classes my-articles-list needs to modify light DOM, or at least CSS properties of child nodes, which seems very intrusive to me.

Use of &quot;.first&quot;, &quot;.second&quot;, ... classes also does not seem right. As the user of my-article-list should now be aware how long should he count, and as for ordered list nodes order already serves this information.

I know that it was removed via 21924, but unfortunately I have no idea how hard it would be to implement it, and how it could affect performance. I just guess it could be not much worse than `:not()`.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110118</commentid>
    <comment_count>1</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2014-08-13 02:46:37 +0000</bug_when>
    <thetext>Could you re-use bug 24872?
Please feel free to re-open bug 24872.

*** This bug has been marked as a duplicate of bug 24872 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>