- From: Tavmjong Bah <tavmjong@free.fr>
- Date: Wed, 09 Feb 2011 20:40:29 +0100
- To: public-svg-wg@w3.org
Hi, Patrick had an idea at SVG Open on how to fix the problem of having marker color match path color. This is the most often cited "bug" in Inkscape since there is no natural way to have an arrowhead take the color of the path. At the time I thought his idea wouldn't work but now I think it may have some merit. The main change to the spec would be that marker fill and stroke are evaluated at the point of use and not at the point of definition. If I remember correctly, Patrick said that they had checked thousands of SVG documents and not a single one would be broken by the change. With this change, to get a marker filled with the same color as the path you would do something like this: <svg ...> <defs> <marker id="MyMarker" ...> <path style="fill:currentColor" ...> </marker> </defs> <path style="marker-end:url(#MyMarker);color:red;stroke:currentColor..." .../> </svg> Using "color" with "currentColor" is not the perfect solution. "color seems to be mostly for allowing SVG to be styled from HTML and for SVG2, having "currentFill" and "currentStroke" would be a better solution. In any case, the evaluation of marker fill and stroke will need to be moved to the place of definition to the place of use. Can we do it now? Tav
Received on Wednesday, 9 February 2011 19:41:04 UTC