Re: Expected behavior for stroke-dasharray="0"

Hi Thomas,

As you mentioned, the SVG 1.1 specs say:

> If the sum of the values is zero, then the stroke is rendered as if a
> value of none were specified.

http://www.w3.org/TR/SVG/painting.html#StrokeDasharrayProperty

Which makes the behavior you mention definitely a bug.  Out of curiosity,
which browser is not currently displaying the stroke in this case?

The SVG 2 draft includes much more detailed implementation instructions for
stroking to deal with additional edge cases; these reinforce the above
expectation, if you follow through the algorithms carefully.
https://svgwg.org/svg2-draft/painting.html#StrokeShape

Amelia BR


On 31 March 2015 at 16:15, Thomas Zimmermann <thomaszimmermann1@gmail.com>
wrote:

> I'm looking for clarification regarding the special case of setting the
> stroke-dasharray property to "0" for SVG shapes like paths or circles.
>
> From the related part of the SVG1.1 spec (
> http://www.w3.org/TR/SVG/painting.html#StrokeDasharrayProperty), it
> seemed to me that the behavior should be the same as if
> stroke-dasharray="none" was specified, i.e. to render a solid line.
>
> However, I recently came across a browser implementation that displayed no
> stroke at all in that case. So maybe you could give me your opinions on
> this to find out if that's intended behavior or a bug that needs to be
> addressed.
>
> Cheers,
> Thomas
>

Received on Thursday, 2 April 2015 00:31:44 UTC