W3C home > Mailing lists > Public > www-style@w3.org > September 2015

Re: [mediaqueries] Error handling for media-condition

From: Florian Rivoal <florian@rivoal.net>
Date: Thu, 24 Sep 2015 17:17:19 +0900
Cc: Simon Pieters <simonp@opera.com>, "www-style@w3.org" <www-style@w3.org>
Message-Id: <6340D1D1-95B2-4539-8028-CAF669C5C316@rivoal.net>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

> On 24 Sep 2015, at 09:02, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Tue, Sep 22, 2015 at 5:51 AM, Simon Pieters <simonp@opera.com> wrote:
>> https://drafts.csswg.org/mediaqueries-4/#error-handling seems only concerned
>> about media queries, not so much media condition. <img sizes> uses a media
>> condition, not a media query. Please state in the spec:
>> * What should happen when a media condition doesn't match the grammar?
> That's up to the calling site.  Typically you'll just try to match it
> against a grammar, and if it doesn't match the grammar, you'll throw
> it away.  This is what sizes='' does; it parses a comma-separated list
> of tokens, then matches each entry against the <source-size> grammar
> and discards things that don't match.


>> * What should happen when a media condition has an unknown <mf-name> or
>> <mf-value>, or disallowed <mf-value>?
> I've amended that section to say it resolves to "unknown" (and then an
> MQ that resolves to unknown becomes "not all").

In some other part of this thread, we were agreeing that *for disallowed values*, it should be false rather than unknown. You don't think so?

>> * If the result of a media condition is unknown, should it match or not?
> I've rejiggered the text there to be more generic - if "unknown"
> escapes into any boolean context, it automatically becomes false.

Yes, I think this is the right way to do it as well.

 - Florian
Received on Thursday, 24 September 2015 08:17:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:57 UTC