Skip to content

Commit

Permalink
[selectors-4] Amend the whitespace prohibitions to take <pseudo-compo…
Browse files Browse the repository at this point in the history
…und-selector> into account. w3c#7085
  • Loading branch information
tabatkins authored and jakearchibald committed Jan 16, 2023
1 parent b9f0b22 commit ba6bf05
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions selectors-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3566,8 +3566,10 @@ Grammar</h2>
<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-selector-unit></dfn> = [ <<compound-selector>>? <<pseudo-compound-selector>>* ]!
<dfn>&lt;complex-selector></dfn> = <<complex-selector-unit>>
[ <<combinator>>? <<complex-selector-unit>> ]*
<dfn>&lt;complex-real-selector></dfn> = <<compound-selector>> [ <<combinator>>? <<compound-selector>> ]*
Expand All @@ -3581,7 +3583,6 @@ Grammar</h2>
<dfn>&lt;simple-selector></dfn> = <<type-selector>> | <<subclass-selector>>
<dfn>&lt;combinator></dfn> = '>' | '+' | '~' | [ '|' '|' ]
<dfn>&lt;type-selector></dfn> = <<wq-name>> | <<ns-prefix>>? '*'
Expand Down Expand Up @@ -3619,19 +3620,22 @@ Grammar</h2>
<li id="white-space">
White space is forbidden:
* Between any of the top-level components of a <<compound-selector>>
<<pseudo-compound-selector>>
(that is, forbidden between the <<type-selector>> and <<subclass-selector>>,
or between the <<subclass-selector>> and <<pseudo-element-selector>>,
or between the <<pseudo-element-selector>> and <<pseudo-class-selector>>,
etc).
* Between <em>any</em> of the components of a <<type-selector>>
or a <<class-selector>>.
* Between the ':'s, or between the ':' and <<ident-token>> or <<function-token>>,
of a <<pseudo-element-selector>> or a <<pseudo-class-selector>>.
* Between <em>any</em> of the components of a <<wq-name>>.
* Between the components of an <<attr-matcher>>.
* Between the <<compound-selector>> or <<pseudo-compound-selector>>s
in a <<complex-selector-unit>>
* Between the components of a <<combinator>>.

Whitespace is <em>required</em>
between two <<compound-selector>>s
between two <<complex-selector-unit>>s
if the <<combinator>> between them is omitted.
(This indicates the descendant combinator is being used.)
<li>
Expand Down

0 comments on commit ba6bf05

Please sign in to comment.