W3C home > Mailing lists > Public > www-style@w3.org > June 2008

Re: WebKit now supports CSS Variables

From: David Hyatt <hyatt@apple.com>
Date: Fri, 27 Jun 2008 02:24:27 -0500
To: Andrew Fedoniouk <news@terrainformatica.com>
Cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, Håkon Wium Lie <howcome@opera.com>, www-style list <www-style@w3.org>
Message-id: <BC298D2E-BA27-4DD2-8133-5E7D783D9469@apple.com>

On Jun 26, 2008, at 11:12 PM, Andrew Fedoniouk wrote:

> So you have in runtime following:
> 1) global collection (name/value map) of variables and


> 2) background: non-parsed("var(ThemeSomething) green");

Semi-parsed.  You can at least build up a list of parsed terms.

> This means that you should interpret (parse/evaluate) that
> non-parsed() thing each time when you need background attributes.

No.  You do it once and then cache it.

> Am I correct in my understanding how it works?

Pretty much yeah.

> Otherwise you would need to maintain list of all attributes in all  
> rules
> where this variable is participating and while changing that value
> to walk through the list and re-parse that non-parsed thing again.

WebKit just rebuilds all of its front end style information when  
variables change (we do the same thing when style rules in a sheet  
change).  Not the best thing to do performance-wise, so we'll probably  
improve it in the future (possibly by maintaining such a list yes).

Received on Friday, 27 June 2008 07:25:09 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:37 UTC