Skip to content

Commit a896a3a

Browse files
committed
[selectors-4] Affirmately state where whitespace is forbidden, rather than saying it's forbidden everywhere and then listing exceptions. More correctness; easier to read.
1 parent 945b6e0 commit a896a3a

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

selectors-4/Overview.bs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3452,15 +3452,17 @@ Grammar</h2>
34523452
In interpreting the above grammar,
34533453
the following rules apply:
34543454

3455-
* White space is forbidden between tokens except:
3456-
* Around commas (denoted with the <a data-link-type="grammar">#</a> multiplier)
3457-
* Around or in place of a <<combinator>>
3458-
* Between the parentheses and argument of
3459-
a functional <<pseudo-class-selector>> or <<pseudo-element-selector>>.
3460-
* Between any of the tokens of an <<attribute-selector>>.
3461-
* When parsing the argument of any functional notation,
3462-
whitespace is interpreted as normal for that production
3463-
(unless otherwise specified, allowed between any pair of tokens).
3455+
* White space is forbidden:
3456+
* Between any of the top-level components of a <<compound-selector>>
3457+
(that is, forbidden between the <<type-selector>> and <<subclass-selector>>,
3458+
or between the <<subclass-selector>> and <<pseudo-element-selector>>,
3459+
etc).
3460+
* Between <em>any</em> of the components of a <<type-selector>>
3461+
or a <<class-selector>>.
3462+
* Between the ':'s, or between the ':' and <<ident-token>> or <<function-token>>,
3463+
of a <<pseudo-element-selector>> or a <<pseudo-class-selector>>.
3464+
* Between <em>any</em> of the components of a <<wq-name>>.
3465+
* Between the components of an <<attr-matcher>>.
34643466
* The four <a href="https://www.w3.org/TR/CSS2/selectors.html#pseudo-element-selectors">Level 2</a> <a>pseudo-elements</a>
34653467
(''::before'', ''::after'', ''::first-line'', and ''::first-letter'')
34663468
may, for legacy reasons,

0 commit comments

Comments
 (0)