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

Re: [Bulk] Re: WebKit now supports CSS Variables

From: Francois Remy <fremycompany_pub@yahoo.fr>
Date: Wed, 25 Jun 2008 10:35:11 +0200
Message-ID: <1FE19538541C4039BB7D309D24D4211C@FremyCompany1>
To: "Andrew Fedoniouk" <news@terrainformatica.com>, "CSS 3 W3C Group" <www-style@w3.org>

> So is the question: why do you need exactly variables? Who and when is 
> supposed to mutate them?

I suppose the following situation :

    @variables { currentColor: #000000; }
    div.myDiv1 { background: var(currentColor); }
    div.myDiv2 { color: var(currentColor); }
    div.myDiv3 {
        border: 3px outset #000000;
        border-color: var(currentColor);

==> setCSSVariableValue('currentColor', "#111111");

Instead of a long and complex way that's find all rules that must be updated 
by iterating stylesheets[i].rules[j]

Am I giving you a sufficient answer ?



BTW, constants can't exist in CSS because we can enable/disable stylesheets 
and that can change the value of a variable.
So, it a variable can change of value, this is not a constant. 
Received on Wednesday, 25 June 2008 08:35:54 UTC

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