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

Re: CSS Variables Draft Proposal

From: David Singer <singer@apple.com>
Date: Thu, 10 Feb 2011 13:55:34 -0800
Cc: "Linss, Peter" <peter.linss@hp.com>, www-style list <www-style@w3.org>
Message-Id: <8E9AF090-0294-4DAF-82B8-2C9148B043A0@apple.com>
To: Tab Atkins Jr. <jackalmage@gmail.com>

On Feb 10, 2011, at 12:44 , Tab Atkins Jr. wrote:

>>> Using a variable that hasn't been declared is a syntax error.  (It's
>>> valid to use a variable that hasn't been declared *yet* - the
>>> declaration may appear later in the stylesheet, or in another sheet
>>> entirely.)
>> Don't use the term "syntax error" here. I read this as "invalid and may be
>> thrown away at parse time", which is clearly not your intent.
>> Better to define referencing an undefined variable as having a 'null'
>> value, or more likely a value of 'invalid' which is a special token
>> meaning that it's there, but will always be invalid. You also need a way
>> to "unset" a variable via script and/or set it to a null/invalid value.
> You definitely understand my intent here.  I'm open to better ways to
> express this.  I like the idea of an always-invalid special value.
> I'll put that in the draft.
> An interesting issue - how does an invalid variable get treated when
> you ask to serialize the property?  I'm going to assume it's
> serialized as itself, since the syntax for variable names is already
> designed to always be invalid.  (Is this true?)

Do you mean to say that using a variable that is not defined, there is an implied value which if found in any construct, in any position where a variable may go, causes the construct to have a syntax error?  (As if there were a special token "wrong!" ).

David Singer
Multimedia and Software Standards, Apple Inc.
Received on Thursday, 10 February 2011 21:56:38 UTC

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