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

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

From: Brian Kardell <bkardell@gmail.com>
Date: Thu, 31 May 2012 08:51:30 -0400
Message-ID: <CADC=+jdobkk3KqK0zGPbRfbZefDqrk+gB4ZL5HMVGuR2U=PnSg@mail.gmail.com>
To: "Marat Tanalin | tanalin.com" <mtanalin@yandex.ru>
Cc: François REMY <fremycompany_pub@yahoo.fr>, Sylvain Galineau <sylvaing@microsoft.com>, "www-style@w3.org" <www-style@w3.org>, Divya Manian <manian@adobe.com>
On May 31, 2012 8:29 AM, "Marat Tanalin | tanalin.com" <mtanalin@yandex.ru>
> 31.05.2012, 06:04, "Sylvain Galineau" <sylvaing@microsoft.com>:
> > Not to prove that everyone's preference is someone else's ugly but I
> > stand the x-convention. If we're going to have a prefix why not make it
> > readable. For instance:
> >
> >         :root { define-link-color: blue }
> >         a { color: $link-color }
> >
> > ...is imo a reasonable balance: terse at the point of use and very
explicit at
> > the point of declaration since there should be many of the former for
each of
> > the latter.
> Maybe using `set-` prefix for setting a reusable value would be even more
> Similarly, `get()` function could be used to get the value when ability
to provide a default value is needed.
> So we have set/get operation pair.

Interestingly, this particular aspect of the conversation, I think,
originated in Feb and, due to the connection with data-* attributes in HTML
the draft called it data.  In the discussion, there was confusion about
whether you could actually reference the html data attribute value in this
way.  I suggested the same get/set idea[1] on the 17th (my birthday
actually, incase anyone wants to send me a much belated gift), but it
didn't seem to get uptake...maybe that has changed, but it might be worth
reading the thread.

[1] http://lists.w3.org/Archives/Public/www-style/2012Feb/0842.html
Received on Thursday, 31 May 2012 12:52:04 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:59 UTC