[Webkit-unassigned] [Bug 208475] New: vector-effect: non-scaling-stroke has no effect on a path with zero length

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 2 14:42:34 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=208475

            Bug ID: 208475
           Summary: vector-effect: non-scaling-stroke has no effect on a
                    path with zero length
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Macintosh
                OS: macOS 10.14
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: SVG
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: richard.a.harris at gmail.com
                CC: zimmermann at kde.org

The CSS property `vector-effect: non-scaling stroke` maintains an SVG element's stroke width regardless of any transforms that have been applied to it, including transforms resulting from a viewBox.

When applied to a `<path>` element with a path length of zero, it has no effect.

To reproduce, create an HTML page with the following code and open it in Safari:

```html
<svg preserveAspectRatio="none" viewBox="0 0 100 100">
  <path stroke="red" d="M25 50 A0 0 0 0 1 25 50"></path>
  <path stroke="blue" d="M75 50 A0 0 0 0 1 75.0001 50"></path>
</svg>

<style>
  svg {
    width: 100%;
    height: 500px;
    border: 1px solid black;
  }

  path {
    stroke-width: 20px;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
  }
</style>
```

Expected result: the red dot and the blue dot are identically-sized. This is what happens in Chrome and Firefox.

Actual result: the red dot is larger, and stretched to the same degree as the SVG itself.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200302/45d86399/attachment.htm>


More information about the webkit-unassigned mailing list