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

Re: [css-variables] the new ED for CSS Variables

From: Marat Tanalin | tanalin.com <mtanalin@yandex.ru>
Date: Sat, 18 Feb 2012 02:39:52 +0400
To: Tab Atkins Jr. <jackalmage@gmail.com>
Cc: Brian Kardell <bkardell@gmail.com>,Daniel Glazman <daniel.glazman@disruptive-innovations.com>,www-style@w3.org
Message-Id: <940101329518392@web115.yandex.ru>
17.02.2012, 21:35, "Tab Atkins Jr." <jackalmage@gmail.com>:
> On Fri, Feb 17, 2012 at 5:33 AM, Brian Kardell <bkardell@gmail.com> wrote:
>> I agree, I've said in the past that I think this is the best idea for
>> "variables" in CSS that I've seen put forward.
>> Minor editorial type comments on the current state of the draft:
>> I mentioned this a few months ago, but I would like to reiterate: I
>> think it is definitely worth going to some measure to ensure an
>> understanding of the actual relationship between data properties in
>> CSS and data properties in HTML as I can easily see confusion here
>> with people doing something like:
>>  <div data-foo="something">
>> and then expecting to be able to say:
>>  div{
>>     property: data(foo);
>>  }
>> Or vice versa.
> Naming is still somewhat up in the air. We may just change the name
> entirely, to var-* or something. If we don't, then I think it would
> be good to add a note saying that it's merely a surface resemblance.

I think var- prefix is MUCH more intuitive, appropriate and preferable for CSS variables than data-. Using data- prefix for CSS-variables would be both confusing for authors and harmful for ability to add possible future features like described by Brian (<div data-foo="something"> => div{property: data(foo);}).

Also, I'm not sure at all that new syntax is really any better than @-syntax proposed initially:

Received on Friday, 17 February 2012 22:40:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:12 UTC