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

Re: [css-variables] CSS Variables are a NEW kind of variable

From: Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>
Date: Thu, 14 Jun 2012 13:23:41 +0800
Message-ID: <4FD9755D.7090209@csail.mit.edu>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: Chris Eppstein <chris@eppsteins.net>, Divya Manian <manian@adobe.com>, "www-style@w3.org" <www-style@w3.org>
(12/06/14 8:01), Tab Atkins Jr. wrote:
> On Wed, Jun 13, 2012 at 4:17 PM, Chris Eppstein <chris@eppsteins.net> wrote:
>> Here's why I don't like the property syntax: It gives fine structure to an
>> identifier where there needn't be any. the delineation between declaring
>> something is a variable and the name of that variable should be syntax, not
>> a naming convention.
> 
> Are you talking about the "var-foo" pattern for naming variables?  I
> agree this isn't ideal, and would prefer using syntax like "$foo:
> blue;".

I think this is the critical question for Chris and Divya. The point
that "if css-variables don't provide property accessor than it should
not use property-like syntax" is mentioned again and again but whether
the "$foo: bar;" idea is "property-like" or not is itself very subjective.

I know some people claim that we shouldn't do +1/-1 on proposals, but
some of the arguments in this thread after Divya revived it have gone to
something like "your intuition doesn't make sense" or "I disagree with
your perception", which are quite confusing as "property-like" is itself
very underspecified a term.

Assuming "$foo: bar;" is not "property-like" (bear with me, I really
don't have an idea and I of course can't read Chris and Divya's mind),
then it would be nice to identify other actionable items, if exist,
besides "changing var-foo to $foo", such as, say, don't use the property
template when describing "$foo" (I know this is purely editorial, but
editorial changes can reduce confusion). Or in other words, it's hard to
understand what

(12/06/14 4:25), Divya Manian wrote:
> But there has been no satisfactory answer to why variables are still
> being defined as a 'property' instead of having a new definition.
>
> Given a variable can be either a property or a proxy for value (at
> least in some form right now), I think we should make it more obvious
> that it is different from traditional property and not make any
> reference to an existing definition of a property.

means exactly.

Assuming "$foo: bar;" is "property-like" and unacceptable, I would
encourage folks to come up with/identify more proposals that are not
"property-like", ideally ranked by preference so that we have better
chance to converge.

Just as an example

  { inherited var foo = bar; }

, or whatever that doesn't have ';' in middle.

> Note, though, that the difference between "$foo: blue;" and "var-foo:
> blue;" is trivial - it's just one character of prefix versus four.
> Either both are syntactic or both are naming conventions.

Whether this is trivial or not, syntax bike-shedding seems to be the
main topic of this thread.


Cheers,
Kenny
Received on Thursday, 14 June 2012 05:24:22 GMT

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