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: Thu, 30 Aug 2012 08:16:14 -0700
Message-ID: <CAAWBYDDdHNK0G0nr4KfDnqgkgnms_XgXvwQb3vNXmBPm6SiuhQ@mail.gmail.com>
To: Fran├žois REMY <fremycompany_pub@yahoo.fr>
Cc: Chris Eppstein <chris@eppsteins.net>, Brian Kardell <bkardell@gmail.com>, "Jens O. Meiert" <jens@meiert.com>, www-style@w3.org
On Wed, Aug 29, 2012 at 11:54 AM, Fran├žois REMY
<fremycompany_pub@yahoo.fr> wrote:
> |  I highly doubt you want only specified values.  If that's the case,
> |  then the feature is just syntax sugar for declaring a variable and
> |  using it twice.
> No, this is not 'only' a syntax sugar. This is a reference to the specified
> value of a normal property. How is 'currentColor' or 'self.background-color'
> a syntax sugar to defining a variable and using it both on 'color' and, say,
> 'outline-color' ? Defining a custom property trigger inheritance, requires
> additionnal memory storage, needs to be coordinated accross files (what if
> you have another, readonly file that specify the background color on an
> element which you want to have an outline that matches its background color
> ?)

Whoops, got my terms wrong.  "specified" value does indeed include inheritance.

It would be slightly weird, though.  Inheritance gives you the
computed value of your parent's property, but variables could only
give you the specified.  That might not be a big deal, I dunno.

Received on Thursday, 30 August 2012 15:17:09 UTC

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