Skip to content

Commit

Permalink
[selectors-4] Exclude pseudo-elements from :has() and :nth-child() w3…
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasai authored and jakearchibald committed Jan 16, 2023
1 parent 4ce1afc commit e93204b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions selectors-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ The Specificity-adjustment Pseudo-class: '':where()''</h3>
The Relational Pseudo-class: '':has()''</h3>

The relational pseudo-class, <dfn id='has-pseudo'>:has()</dfn>,
is a functional pseudo-class taking a <<relative-selector-list>> as an argument.
is a functional pseudo-class taking a <<relative-real-selector-list>> as an argument.
It represents an element if any of the <a>relative selectors</a>
would match at least one element
when [=anchor element|anchored against=] this element.
Expand Down Expand Up @@ -2905,7 +2905,7 @@ Child-indexed Pseudo-classes</h3>
are among <var>An+B</var>th elements
from the list composed of
their <a>inclusive siblings</a> that match the <a>selector list</a> <var>S</var>,
which is a <<complex-selector-list>>.
which is a <<complex-real-selector-list>>.
If <var>S</var> is omitted,
it defaults to ''*|*''.

Expand Down Expand Up @@ -3002,7 +3002,7 @@ Child-indexed Pseudo-classes</h3>
from the list composed of
their <a>inclusive siblings</a> that match the <a>selector list</a> <var>S</var>,
counting backwards from the end.
<var>S</var> is <<complex-selector-list>>.
<var>S</var> is <<complex-real-selector-list>>.
If <var>S</var> is omitted,
it defaults to ''*|*''.

Expand Down Expand Up @@ -3530,17 +3530,25 @@ Grammar</h2>
<dfn>&lt;complex-selector-list></dfn> = <<complex-selector>>#
<dfn>&lt;complex-real-selector-list></dfn> = <<complex-real-selector>>#
<dfn>&lt;compound-selector-list></dfn> = <<compound-selector>>#
<dfn>&lt;simple-selector-list></dfn> = <<simple-selector>>#
<dfn>&lt;relative-selector-list></dfn> = <<relative-selector>>#
<dfn>&lt;relative-real-selector-list></dfn> = <<relative-real-selector>>#
<dfn>&lt;complex-selector></dfn> = [ <<compound-selector>>? <<pseudo-compound-selector>>* ]!
[ <<combinator>>? [ <<compound-selector>>? <<pseudo-compound-selector>>* ]! ]*
<dfn>&lt;complex-real-selector></dfn> = <<compound-selector>> [ <<combinator>>? <<compound-selector>> ]*
<dfn>&lt;relative-selector></dfn> = <<combinator>>? <<complex-selector>>
<dfn>&lt;relative-real-selector></dfn> = <<combinator>>? <<complex-real-selector>>
<dfn>&lt;compound-selector></dfn> = [ <<type-selector>>? <<subclass-selector>>* ]!
<dfn>&lt;pseudo-compound-selector></dfn> = <<pseudo-element-selector>> <<pseudo-class-selector>>*
Expand Down

0 comments on commit e93204b

Please sign in to comment.