W3C home > Mailing lists > Public > www-style@w3.org > October 2012

Re: [mediaqueries4][css3-conditional] Whitespace: "and(" vs. "and ("

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 3 Oct 2012 15:30:02 -0700
Message-ID: <CAAWBYDB0VZ5_7bk18Hvk9mb+amm_S2X_e315Dm1692_XgF=uXg@mail.gmail.com>
To: Simon Sapin <simon.sapin@kozea.fr>
Cc: www-style@w3.org
On Wed, Oct 3, 2012 at 3:05 PM, Simon Sapin <simon.sapin@kozea.fr> wrote:
>> The following is an malformed media query because having no space
>> between ‘and’ and the expression is not allowed. (That is reserved
>> for the functional notation syntax.)
>>
>> @media all and(color) { … }
>
>
> but the relevant grammar is "AND S* expression". Should the grammar be
> changed to "AND S+ expression" to capture in normative spec that some
> whitespace is required there?
>
> Whatever we decide here should also apply to css3-conditional’s 'and', 'or',
> and 'not' operators. (ie: can they be functions?)

Whitespace is not actually required there.  The following is valid:

@media all and/*wooo!*/(color) { ... }

This is why, sadly, we need to preserve comments in the tokenizer.

~TJ
Received on Wednesday, 3 October 2012 22:30:49 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:01 GMT