W3C home > Mailing lists > Public > www-svg@w3.org > August 2005

Re: SVG12: solid-color:currentColor

From: Chris Lilley <chris@w3.org>
Date: Sun, 21 Aug 2005 16:52:35 +0200
Message-ID: <99876830.20050821165235@w3.org>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: www-svg@w3.org

On Sunday, April 24, 2005, 7:27:41 PM, Bjoern wrote:

BH> Dear Scalable Vector Graphics Working Group,

BH>   In http://www.w3.org/TR/2005/WD-SVGMobile12-20050413/painting.html the
BH> solid-color property is defined to take a currentColor keyword. This can
BH> not resolve to a propert color value as the color property does not
BH> apply to solidColor elements.

'Applies to' should be distinguished from 'has a value on'.

All properties have a value, either specified, inherited, or initial, on
all elements. 'Applies to' on the other hand means that the value of
that property directly affects the rendering of that element.

The SVG WG is unable to use the color property directly in SVG, since
CSS1 and CSS2 define it as 'the color of text'. Most of the content in
SVG is not text, and furthermore the CSS definition does not distinguish
between the fill color and the stroke color.

currentColor, as you note, is a way indirectly to use the value of the
color property (perhaps inherited from some enclosing context where it
applies, such as in a CDF document with XHTML and inline SVG). This can
be used to construct, for example, SVG diagrams whose stroke color
changes in accordance with styling changes in the surrounding XHTML
text.

BH>  Please change the draft such that the
BH> color property applies to solidColor elements.

Hopefully this email explains why that is neither possible nor
desirable. The section "Specifying paint" already states that
currentColor is a valid value for a paint.

A solidColor element is not itself rendered, and even if it was, the
currentColor property would be the one that applied.

However, in checking the spec following your email, we notice that the
definition of the color property gives the impression that color
directly applies. This contradicts both the introductory text on the
color property, and also contradicts CSS2. The definition has been
altered as follows:

old text:

 The 'color' property

 The 'color' property is used to provide a potential
 indirect value (currentColor) for the 'fill', 'stroke',
 'stop-color' properties.

'color'
    Value:      <color> | inherit
    Initial:    depends on user agent
    Applies to:         elements to which properties 'fill',
                        'stroke', 'stop-color' apply
    Inherited:          yes
    Percentages:        N/A
    Media:      visual
    Animatable:         yes

new text:

 The 'color' property

 The 'color' property, defined in CSS2 as the color of text, does not
 directly apply to SVG elements. The value of the color property may
 however be used to provide an indirect value for those properties which
 allow the currentColor keyword: the 'fill', 'stroke', 'solid-color' and
 'stop-color' properties.

'color'
    Value:      <color> | inherit
    Initial:    depends on user agent
    Applies to:         None. Indirectly affects other properties
                        via currentColor
    Inherited:          yes
    Percentages:        N/A
    Media:      visual
    Animatable:         yes
    

Thanks for (indirectly) bringing this to our attention.




-- 
 Chris Lilley                    mailto:chris@w3.org
 Chair, W3C SVG Working Group
 W3C Graphics Activity Lead
Received on Sunday, 21 August 2005 14:52:46 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:31 GMT