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

Re: [css-variables] computed value of variables with abutting tokens

From: Simon Sapin <simon.sapin@exyr.org>
Date: Tue, 27 Aug 2013 10:37:35 +0100
Message-ID: <521C735F.3020405@exyr.org>
To: www-style@w3.org
Le 27/08/2013 08:52, Cameron McCormack a écrit :
> And a related question: should we preserve the fact that a variable
> value might have two adjacent white space tokens?  For example:
>
>     p {
>       var-a: ;
>       var-b: var(a);
>     }
>
> Do we need to ensure that the computed value of var-b is reported as "
> /**/ "?

This would be necessary to round-trip the exact token stream, but in 
this case I think it is not necessary (as all CSS grammars do and should 
treat 2+ whitespace tokens as identical to one) and not desirable (it 
would add noise.)

I added a note in Syntax to clarify:

http://dev.w3.org/csswg/css-syntax/#serialization

-- 
Simon Sapin
Received on Tuesday, 27 August 2013 09:37:58 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:31 UTC