Re: [mediaqueries] "not" is inconsistent

On Tue, 07 Oct 2014 11:35:40 +0200, Simon Pieters <simonp@opera.com> wrote:

> The "not" keyword is inconsistent in whether the result is negated for  
> invalid things.
>
> "If it contains a <general-enclosed> child term, the result is false."
>
> not (123) -> true
>
>
> "A media query that does not match the grammar in the previous section  
> must be replaced by not all during parsing."
>
> not (!) -> false
>
>
> "An unknown <media-type> must be treated as not matching."
>
> not unknown -> true
>
>
> "An unknown <mf-name> or <mf-value>, or disallowed <mf-value>, must make  
> the entire <media-query> be replaced by not all."
>
> not (unknown) -> false
>
>
> Is the above intended?

Looking at MQ3, there is no <general-enclosed> and so:

not (123) -> false

This matches gecko/blink/webkit/presto/IE11

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3240

Since <media-query-list> parsing is not grammar-based, what purpose does  
<general-enclosed> serve?

-- 
Simon Pieters
Opera Software

Received on Tuesday, 7 October 2014 11:27:20 UTC