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

Re: WebKit now supports CSS Variables

From: Francois Remy <fremycompany_pub@yahoo.fr>
Date: Tue, 1 Jul 2008 20:46:37 +0200
Message-ID: <6AB5E8F8B4B14E2C9E87E8C4721E153B@FremyCompany1>
To: "Andrey Mikhalev" <amikhal@abisoft.spb.ru>, "Daniel Glazman" <daniel.glazman@disruptive-innovations.com>, "CSS 3 W3C Group" <www-style@w3.org>

> b) avoid to put css users into the hell of global variables, where
>    they will be enforced to implement same functionality as in (a),
>    but in this case: no rules, no mercy, no implementation efficiency...
>    (hopefully not all users, just cssom/js ones. there is no needs
>    for such 'variables' _inside_ css language)

If you don't want to modify the value of a variable, don't do it ;-)
You don't need any specification for that. Normally, the developers will 
never give the same name for two constants.
If you must build CSS that can be used in another sites, you can prefix it. 
Like @variables { phpBB-bgColor: blue; }

It's the same when you make any CSS. Sometimes you've rules that you don't 
want to see overrided, but you can't force it.

But have you considered my private/friend/public variable propagation 
process ? (Defined in a older mail)
So you can define some variables for a specific stylesheet, and you can be 
sure that it can't be modified by another CSS.

Eg :

    @variables private {
        /*
             This declaration will be the most valuable into this 
stylesheet, even if friend/public values are defined anywhere else
             This declaration should have no effect on any other stylesheet.
        */
        bgColor: blue;
    }

Fremy 
Received on Tuesday, 1 July 2008 18:47:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:10 GMT