Re: functional notation syntax

Anne van Kesteren wrote:
> Andrei Polushin <> wrote:
>> Was there such a discussion, or a formal decision on this, or not yet?
>> I would prefer to re-allow whitespace between the CSS function name
>> and the opening '(', i.e. to split the FUNCTION token. It might sound
>> too radical, but what was the reason to disallow it in past?
>> Otherwise, and as a consequence, now it's hard to allow an optional
>> whitespace in such a non-functional context.
> We have only discussed this in the context of media queries. I don't 
> think changing this aspect of CSS is planned.

OK, in context of media queries - what were the opinions of that discussion?

The specification should /clearly/ describe how the following is parsed:

   @media screen and(color) { /* ... */ }

Possible alternatives are:

1. It is an error, because "and(" is a FUNCTION token, not allowed in 
grammar of media_query_list. Specification should explain this somehow, 
provide an example, then describe the workaround for writing this correctly 
(i.e. it inserting a space before the opening '(').

2. It is not an error, because each FUNCTION token is locally split into 
IDENT and '(' tokens in context of parsing the media_query_list production. 
Specification should explicitly state this, if it prescribes such behavior.

In either case, there is no need to change the global CSS syntax rules. 
Hopefully that's a matter of local decision, to be made by media-queries 

Andrei Polushin

Received on Sunday, 6 April 2008 22:54:11 UTC