Re: [svgwg] How does vector-effect=non-scaling-stroke interact with the stroke-dash* properties

The problem is that there are two very different use cases, where you want different scaling behaviors:

- For a simple repeating dash pattern, like `stroke-dasharray: 2 1; stroke-width: 1px`, you want the dasharray pattern to stay consistent with the `stroke-width`.  That way, the dashed pattern stays visually the same, you just fit more or fewer dashes around the shape as it scales up or down, so it looks like the dimensions of the path itself has changed.

- However, for the "draw a path with dashes" effect, where the dasharray is defined to match the path length, then you would want the dash length and offset to scale with the path size.

Since the first case is the *primary* use case, and the second is a bit of a hack that already requires some JS to calculate the path length, my argument is that the dashes should be defined using the same scale as the stroke width.

But either way, it needs to be defined more clearly in the spec.

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/323#issuecomment-385080807 using your GitHub account

Received on Friday, 27 April 2018 20:09:56 UTC