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

Re: [css-variables] Different syntax for variable definition and use

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 29 Aug 2012 10:07:33 -0700
Message-ID: <CAAWBYDCa_ypeVH94XVShE1Nx1DSrKUHjwkXq9Le8Qe2y9uDq6w@mail.gmail.com>
To: "Jens O. Meiert" <jens@meiert.com>
Cc: www-style@w3.org
On Tue, Aug 28, 2012 at 1:49 PM, Jens O. Meiert <jens@meiert.com> wrote:
>> 2. Defining Custom Properties: the ‘var-*’ family of properties
>>
>> 3. Using Variables - the ‘var()’ notation
>
> What is the benefit in declaring and using variables—the same
> variables—in such different ways? Are we not contracting a serious
> “development usability” problem?

I don't believe so.  The two are very close (difference between a -
and a ()), so it's pretty easy to connect things.

While I wouldn't particularly mind bringing them together by having
"var(foo): blue;", this would require changing the Core Grammar
(something we try to avoid unless necessary).  Additionally, I've
heard mixed reports about this.  Several people have said that having
the same syntax on the left would look like you're using a variable as
a property name. This is far from a universal confusion, but it's
shown up in feedback often enough for me to keep it in mind.

> Why does the variable name need to be part of the declaration?

I don't understand what you mean by this.

> And what are, pardon me Tab, the other “‘variable-like’ things” we
> would need the “$” syntax for if there is, so the community, such
> immense immediate need for variables in CSS now, right at this moment?

This sentence no English. ^_^  I'm thinking of $ for macro-style
expansion, or something along those lines.

~TJ
Received on Wednesday, 29 August 2012 17:08:20 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:59 GMT