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"/>

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 UTC

This archive was generated by hypermail 2.3.1 : Monday, 22 June 2015 03:33:46 UTC