Re: [mediaqueries] "not" is inconsistent

On Tue, Oct 7, 2014 at 2:35 AM, 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

These two are intended - <general-enclosed> is designed to handle our
expected upgrade paths in the future, but we shouldn't even attempt to
understand things which don't match the grammar at all.

> "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?

This isn't really intended, and is inconsistent with our approach with
<general-enclosed>, but it may be required for back-compat.  I'll
check on this.

~TJ

Received on Tuesday, 7 October 2014 17:26:01 UTC