- From: Florian Rivoal <florian@rivoal.net>
- Date: Thu, 26 Mar 2015 17:51:55 +0100
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: Simon Sapin <simon.sapin@exyr.org>, www-style list <www-style@w3.org>
> On 26 Mar 2015, at 17:12, Tab Atkins Jr. <jackalmage@gmail.com> wrote: > > On Thu, Mar 26, 2015 at 8:54 AM, Simon Sapin <simon.sapin@exyr.org> wrote: >> MQ4 adds a <general-enclosed> term to its grammar that accepts almost >> anything and evaluates to false. This is to support future extensions. >> >> This means that a query like `not (unsupported + syntax)` evaluates to true. >> >> However, something like `not (unsupported-media-feature)` with the normal >> <media-feature> syntax evaluates to false: >> >>> An unknown <mf-name> or <mf-value>, or disallowed <mf-value>, must >>> make the entire <media-query> be replaced by not all. >> >> >> >> This is inconsistent. Should one of these two cases be changed to match the >> other? > > I seem to recall us discussing this back when we added > <general-enclosed>. I don't remember the conclusion, but I think my > argument was that the "just negate the whole danged thing" behavior > was *identical* to "just negate the one unrecognized thing" (because > you could only use AND to combine) *except for* the case that the > whole thing was negated. I'd need to go look up the old thread on it. Well, not only can you negate the whole thing, you can now use full boolean algebra, so even if this used to make sense, it no longer does. The situation for MQ and for @supports (which introduced general-enclosed initially) is different. If the syntax is not recognised, then clearly it is not supported, so '@support (unsupported + syntax)' should be false and '@support not (unsupported + syntax)' should be true. The same isn't true of media queries: just because the syntax isn't recognized doesn't mean the environment doesn't match. So I'd agree that it would be reasonable to do the same as for unknown <mf-name> or <mf-value>, or disallowed <mf-value>, and throw out the entire <media-query>. - Florian
Received on Thursday, 26 March 2015 16:52:19 UTC