Re: [csswg-drafts] [mediaqueries-5] Parsing `<media-query-list>` when the input is `<whitespace-token>` (#9173)

> If I am not mistaken, in @media {}, the input would be the <whitespace-token> between @media and {}.

You're mistaken. For the purpose of grammar parsing, whitespace is always ignored, unless there's prose specifically defining that it is significant in some way. So in `@media {...}`, the `<media-query-list>` production is just an empty list of tokens. The parsing rules then run on it, producing an empty list.

This is implied by <https://drafts.csswg.org/css-values/#component-whitespace>, tho it could perhaps be a little clearer.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9173#issuecomment-1675471845 using your GitHub account


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

Received on Friday, 11 August 2023 22:28:53 UTC