W3C home > Mailing lists > Public > www-style@w3.org > February 2011

RE: CSS Variables

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Tue, 8 Feb 2011 19:35:35 +0000
To: "L. David Baron" <dbaron@dbaron.org>
CC: "Linss, Peter" <peter.linss@hp.com>, Tab Atkins Jr. <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Message-ID: <D51C9E849DDD0D4EA38C2E539856928411E6DF13@TK5EX14MBXC213.redmond.corp.microsoft.com>
But both "px" and "200" are valid token streams, aren't they?

Yes, parser would have to re-tokenize the combination but it is not unheard of...

-----Original Message-----
From: L. David Baron [mailto:dbaron@dbaron.org] 
Sent: Tuesday, February 08, 2011 11:23 AM
To: Alex Mogilevsky
Cc: Linss, Peter; Tab Atkins Jr.; www-style list
Subject: Re: CSS Variables

On Tuesday 2011-02-08 18:35 +0000, Alex Mogilevsky wrote:
> You can do the second one with $ too:
> @var $a px;
> @var $b 200;		p { width: $b$a; }	

If variables represent a token stream, you can't, since "200px" is a single token.


L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Tuesday, 8 February 2011 19:36:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:56 UTC