W3C home > Mailing lists > Public > www-style@w3.org > December 2013

Re: [css-syntax][css-variables] parsing a declaration should allow white space only values

From: Cameron McCormack <cam@mcc.id.au>
Date: Mon, 09 Dec 2013 22:14:14 +1100
Message-ID: <52A5A606.6060509@mcc.id.au>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: Simon Sapin <simon.sapin@exyr.org>, www-style list <www-style@w3.org>
Tab Atkins Jr. wrote:
> Yeah, the steps are:
>
> 1. Consume the next input token.
>
> 2. While the current input token is a<whitespace-token>, consume the
> next input token.
>
> 3. If the current input token is anything other than a<colon-token>,
> this is a parse error. Return nothing.
> Otherwise, consume the next input token.
>
> 4. While the current input token is anything other than an
> <EOF-token>, append it to the declaration’s value and consume the next
> input token.
>
> 5. If the last two non-<whitespace-token>s in the declaration’s value
> are a<delim-token>  with the value "!" followed by an<ident-token>
> with a value that is an ASCII case-insensitive match for "important",
> remove them from the declaration’s value and set the declaration’s
> important flag to true.
>
> 6. Return the declaration.
>
> The relevant parts are steps 4-6, which definitely allow a declaration
> to validly contain just whitespace or nothing at all.

Thanks.  I didn't properly follow the "consume a declaration" 
definition; the current steps are sufficient for white space only 
variable declarations.
Received on Monday, 9 December 2013 11:14:54 UTC

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