[csswg-drafts] [css-selectors-4] Include whitespace in non-optional `<combinator>` (#7027)

cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-selectors-4] Include whitespace in non-optional `<combinator>` ==
Selectors 4 does not include the whitespace in the production rule for `<combinator>`:

> ```
> <complex-selector> = <compound-selector> [ <combinator>? <compound-selector> ]*
> [...]
> <combinator> = '>' | '+' | '~' | [ '|' '|' ]
> ```
> [...]
>Note: The grammar above states that a combinator is optional between two `<compound-selector>`s in a `<complex-selector>`. This is only for grammatical purposes, as the CSS Value Definition Syntax’s lax treatment of whitespace makes it difficult to indicate that a grammar term can be whitespace. "Omitting" a combinator is actually just specifying the descendant combinator.

What is wrong with `<combinator> = ' ' | '>' | '+' | '~' | [ '|' '|' ]`? (whitespace between quotes)

With `svg|*` as input, my current implementation for parsing this grammar result to two `<compound-selector>`. I would like to know if whitespaces are actually required between components for applying the correct fix.

> Unless otherwise specified, white space and/or comments may appear before, after, and/or between components combined using the above combinators and multipliers.

https://drafts.csswg.org/css-values-4/#component-whitespace

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7027 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 9 February 2022 15:39:06 UTC