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

> 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