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

[mediaqueries-4] Remove requirement to have whitespace before and/or/not

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 22 Jul 2015 17:13:24 -0700
Message-ID: <CAAWBYDBd4ZZjbOnNO_OvsmYtj2D9uMNxh3kgkVaRLgLCO0R7CQ@mail.gmail.com>
To: www-style list <www-style@w3.org>
MQ currently requires whitespace around the and/or/not keywords.  This
isn't strictly required for parsing; there's no reason to require a
space *before* the keywords, and technically you could put a comment
*after* the keyword to accomplish the separation as well.  That is:

1. (foo)and (bar) = totes fine
2. (foo) and/**/(bar) = totes fine

The one troublesome issue is:

3. (foo) and(bar) = whoops, that's an and() function, not a keyword
followed by a parens.

Because of case 3, and because case 2 is a confusing edge case, we
required whitespace after the keyword, and for symmetry/simplicity,
required it before as well.

However! Per <https://code.google.com/p/chromium/issues/detail?id=390078>,
Rune once tried to implement this restriction, and broke lots of sites
relying on some MS-produced minifier, which produced code like case 1.
So apparently we can't actually implement this.

Given that information, can we drop the requirement?

~TJ
Received on Thursday, 23 July 2015 00:14:11 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:32 UTC