Re: [mediaqueries] @media not (unsupported-media-feature) v.s. @media not (unsupported + syntax)

On Wed, Apr 22, 2015 at 2:00 PM, Florian Rivoal <florian@rivoal.net> wrote:
> I am not sure how often you'll run into media queries where the difference between
> Simon's table and Kleene's 3-value logic will matter, but sure, Kleene's logic is cleaner.
>
> I particular, it preserves (not( A and B)) == ((not A) or (not B)), which Simon's approach doesn't.
>
> If we're going with 3 way logic though, then it makes sense to use it not only for <general-enclosed>, but also for unknown <mf-name> or <mf-value>.
>
> The problem then is is that going with Kleene's logic break backwards compat, while Simon's logic doesn't. Look at these
> examples:
>
> "not ((min-width: 30000px) and (shoes: none))"
> "not handheld and foo(bar)"
> "not yoyo and (light-level: stroboscope)"
>
> MQ3 behavior: false
> Simon: false
> Kleene: true
>
> The first two might be ok. They use syntax that wasn't valid at level 3 (not without a media type, general enclosed), so the fact that they evaluate differently is probably fine.
>
> The third one is more problematic. Had we used Kleene's logic in the first place, we would have been better off, but we didn't.

Well, the first wasn't valid at all in MQ3. ^_^  And removing the
outermost parens is invalid in MQ3; you need `not all and (min-width:
30000px) and (shoes: none)`.

I've pinged zcorpan to run a query over the website data he has, and
see what kind of "not" MQs are used.  This will give us a better idea
of whether we'll run into these kinds of bad queries or not.

~TJ

Received on Wednesday, 22 April 2015 22:51:00 UTC