Skip to content

Commit da22c54

Browse files
committed
Use the term 'inclusive siblings' to make it :nth-child/etc less ambiguous.
1 parent 00282f8 commit da22c54

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

selectors/Overview.bs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2568,7 +2568,7 @@ Tree-Structural pseudo-classes</h2>
25682568
Child-indexed Pseudo-classes</h3>
25692569

25702570
The pseudo-classes defined in this section select elements
2571-
based on their index in their list of siblings.
2571+
based on their index amongst their <a>inclusive siblings</a>.
25722572

25732573
Note: Selectors 3 described these selectors as selecting elements based on their index in the child list of their parents.
25742574
(This description survives in the name of this very section, and the names of several of the pseudo-classes.)
@@ -2582,7 +2582,7 @@ Child-indexed Pseudo-classes</h3>
25822582
The <dfn id='nth-child-pseudo' lt=":nth-child()">:nth-child(<var>An+B</var> [of <var>S</var>]? )</dfn>
25832583
pseudo-class notation represents the <var>An+B</var>th element
25842584
which matches the <a>selector list</a> <var>S</var>
2585-
among its siblings.
2585+
among its <a>inclusive siblings</a>.
25862586

25872587
The CSS Syntax Module [[!CSS3SYN]] defines the <a href="http://dev.w3.org/csswg/css-syntax/#anb"><var>An+B</var> notation</a>.
25882588
If <var>S</var> is omitted,
@@ -2658,7 +2658,7 @@ Child-indexed Pseudo-classes</h3>
26582658
The <dfn id='nth-last-child-pseudo' lt=":nth-last-child()">:nth-last-child(<var>An+B</var> [of <var>S</var>]? )</dfn>
26592659
pseudo-class notation represents the <var>An+B</var>th element
26602660
which matches the <a>selector list</a> <var>S</var>
2661-
among its siblings,
2661+
among its <a>inclusive siblings</a>,
26622662
counting backwards from the end.
26632663

26642664
The CSS Syntax Module [[!CSS3SYN]] defines the <a href="http://dev.w3.org/csswg/css-syntax/#anb"><var>An+B</var> notation</a>.
@@ -2680,7 +2680,7 @@ Child-indexed Pseudo-classes</h3>
26802680
'':first-child'' pseudo-class</h4>
26812681

26822682
The <dfn id='first-child-pseudo'>:first-child</dfn> pseudo-class
2683-
represents an element that precedes all of its siblings (if any).
2683+
represents an element that if first among its <a>inclusive siblings</a>.
26842684
Same as '':nth-child(1)''.
26852685

26862686
<div class="example">
@@ -2722,7 +2722,7 @@ Child-indexed Pseudo-classes</h3>
27222722
'':last-child'' pseudo-class</h4>
27232723

27242724
The <dfn id='last-child-pseudo'>:last-child</dfn> pseudo-class
2725-
represents an element that follows all of its siblings (if any).
2725+
represents an element that is last among its <a>inclusive siblings</a>.
27262726
Same as '':nth-last-child(1)''.
27272727

27282728
<div class="example">
@@ -2755,7 +2755,7 @@ Typed Child-indexed Pseudo-classes</h3>
27552755
The <dfn id='nth-of-type-pseudo' lt=":nth-of-type()">:nth-of-type(<var>An+B</var>)</dfn> pseudo-class notation
27562756
represents the <var>An+B</var>th element
27572757
with the same <a section href="#type-nmsp">namespace</a> and <a section href="#type-selectors">type</a>
2758-
among its siblings.
2758+
among its <a>inclusive siblings</a>.
27592759

27602760
The CSS Syntax Module [[!CSS3SYN]] defines the <a href="http://dev.w3.org/csswg/css-syntax/#anb"><var>An+B</var> notation</a>.
27612761

@@ -2781,7 +2781,7 @@ Typed Child-indexed Pseudo-classes</h3>
27812781
The <dfn id='nth-last-of-type' lt=":nth-last-of-type()">:nth-last-of-type(<var>An+B</var>)</dfn> pseudo-class notation
27822782
represents the <var>An+B</var>th element
27832783
with the same <a section href="#type-nmsp">namespace</a> and <a section href="#type-selectors">type</a>
2784-
among its siblings,
2784+
among its <a>inclusive siblings</a>,
27852785
counting backwards from the end.
27862786

27872787
The CSS Syntax Module [[!CSS3SYN]] defines the <a href="http://dev.w3.org/csswg/css-syntax/#anb"><var>An+B</var> notation</a>.
@@ -2804,9 +2804,9 @@ Typed Child-indexed Pseudo-classes</h3>
28042804
'':first-of-type'' pseudo-class</h4>
28052805

28062806
The <dfn id='first-of-type-pseudo'>:first-of-type</dfn> pseudo-class
2807-
represents an element that is the first sibling
2807+
represents an element that is the first
28082808
with a particular <a section href="#type-nmsp">namespace</a> and <a section href="#type-selectors">type</a>
2809-
among its siblings.
2809+
among its <a>inclusive siblings</a>.
28102810
Same as '':nth-of-type(1)''.
28112811

28122812
<div class="example">
@@ -2840,9 +2840,9 @@ Typed Child-indexed Pseudo-classes</h3>
28402840
'':last-of-type'' pseudo-class</h4>
28412841

28422842
The <dfn id='last-of-type-pseudo'>:last-of-type</dfn> pseudo-class
2843-
represents an element that is the first sibling
2843+
represents an element that is the first
28442844
with a particular <a section href="#type-nmsp">namespace</a> and <a section href="#type-selectors">type</a>
2845-
among its siblings,
2845+
among its <a>inclusive siblings</a>,
28462846
counting backwards from the end.
28472847
Same as '':nth-last-of-type(1)''.
28482848

0 commit comments

Comments
 (0)