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

[css-variables] and [css-colors]

From: François REMY <fremycompany_pub@yahoo.fr>
Date: Sat, 16 Jun 2012 13:31:39 +0200
Message-ID: <9D3841F463314EFB8A495D749A1EDDC9@FREMYD2>
To: "Tab Atkins" <jackalmage@gmail.com>
Cc: "CSS 3 W3C Group" <www-style@w3.org>
I have a small question about the interaction between the <color> type and 
[css-variables]. Are we allowed to use variables inside color notations (I’m 
using the notations of latest [css-variables] Editor’s draft here) ?

{
    $r: 100;     $g: 10;     $b: 1;     $a: 0.1;
    background: rbga($r,$g,$b,$a);
}

I think we should modify the way rbg() and rgba() are defined in CSS Colors 
Module Level 4 to be :

    <color>   +=   “rbg(” <integer> “,” <integer> “,” <integer> “)”
    <color>   +=   “rbga(” <integer> “,” <integer> “,” <integer> “,” 
<alphavalue> “)”

This would make it clear you can use [css-variables] inside them, and you 
could also use calc() which would be very nice if you want my point of view, 
especially in conjunction with [css-variables].

Regards,
François 
Received on Saturday, 16 June 2012 11:32:04 GMT

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