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

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

From: François REMY <fremycompany_pub@yahoo.fr>
Date: Wed, 29 Aug 2012 20:54:34 +0200
Message-ID: <48CE525AC4934A9092F74F95F365E28F@FREMYD2>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "Chris Eppstein" <chris@eppsteins.net>, "Brian Kardell" <bkardell@gmail.com>, "Jens O. Meiert" <jens@meiert.com>, <www-style@w3.org>
|  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 
?)


|  You want at *least* computed values, so you can, for
|  example, get inherited values.

Well, we can do just like we do with custom properties and say "use 
specified value if any, inherited otherwhise". Nothing wrong with it. 
Received on Wednesday, 29 August 2012 18:54:46 GMT

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