W3C home > Mailing lists > Public > public-fx@w3.org > January to March 2012

Re: CSS would like to change the definition of currentColor; is this okay with SVG?

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 27 Jan 2012 11:25:49 +1100
Message-ID: <4F21EF0D.3080904@mcc.id.au>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: public-fx@w3.org
Tab Atkins Jr.:
> For context, start with this thread:
> <http://lists.w3.org/Archives/Public/www-style/2012Jan/0521.html>
>
> Currently, the currentColor keyword computes to the value of the
> 'color' property, and then inherits as that color.  CSS would like to
> change this so that it computes/inherits as itself, shifting the
> actual resolution into a color to used-value time.
>
> This will have no effect on non-inherited properties (unless you
> explicitly use 'inherit', which is rare).  It would make it easier to
> specify inherited properties that want to match the current text
> color, such as text-emphasis-color (which sets the color of emphasis
> marks, used in CJK typography).

Huh.  I guess I never thought through how currentColor works exactly, as 
I assumed that the following document would show a blue rectangle:

<svg xmlns="http://www.w3.org/2000/svg">
   <g fill="currentColor" color="red">
     <rect width="100" height="100" color="blue"/>
   </g>
</svg>

but it shows as red.

> Is this okay for SVG?

I suspect it is.  I think it makes more sense this way.  I'll put it on 
the agenda for next week's call.
Received on Friday, 27 January 2012 00:26:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 January 2012 00:26:30 GMT