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

Re: [css-variables] Hidden costs.

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 16 Feb 2011 12:52:39 -0800
Message-ID: <AANLkTinKNbhus8J5_AmkUW0kAkdBM7Mo-SzKJhPxJwuE@mail.gmail.com>
To: Andrew Fedoniouk <news@terrainformatica.com>
Cc: www-style@w3.org
On Tue, Feb 15, 2011 at 8:25 PM, Andrew Fedoniouk
<andrew.fedoniouk@live.com> wrote:
> The problem is that no one of Web designers actually asked about exactly CSS
> Variables
> (run-time interpretable entities). Except of authors of this bright idea -
> Daniel Glazman et al.
> of course. But there are a lot of requests for CSS Constants (parse time
> macro variables).
> Just note various existing CSS macro/preprocessors and absence of anything
> even close to CSS variables (they can be modeled in principle by JS means).

Actually, they have.  An example given by an internal developer was a
table with lots of values, where some cells represented data from one
source, other cells represented data from a different source, etc.
Based on XHR data, the cells representing a source should all change
color in a particular way.

Right now the only way to do that is to either (1) loop through the
elements, setting the .style directly, or (2) use the OM to directly
tweak the color declaration in the stylesheet.

Neither is optimal.

Outside of the direct JS case, parse-time effects outside of the base
syntax are weird and harder for authors to predict.  Late-loading of
stylesheets, for example, has difficult-to-predict results if variable
resolution happens solely at parse time.

Received on Wednesday, 16 February 2011 20:53:32 UTC

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