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

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

From: Florian Rivoal <florian@rivoal.net>
Date: Mon, 27 Jul 2015 00:54:42 +0200
Cc: www-style list <www-style@w3.org>
Message-Id: <8B86B67A-BAC8-47F1-89FD-8FACBEE56DFA@rivoal.net>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

> On 23 Jul 2015, at 02:13, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
> 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?

Breaking lots of sites is bad, I'm in favor of allowing space before.

 - Florian
Received on Sunday, 26 July 2015 22:55:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:18 UTC