[Webkit-unassigned] [Bug 213095] New: SVG <text> CSS not repositioning with percent translate when parent resizes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 11 15:10:27 PDT 2020


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

            Bug ID: 213095
           Summary: SVG <text> CSS not repositioning with percent
                    translate when parent resizes
           Product: WebKit
           Version: Safari 13
          Hardware: Macintosh
                OS: macOS 10.15
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: SVG
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: josh at joshkra.me
                CC: zimmermann at kde.org

Created attachment 401683

  --> https://bugs.webkit.org/attachment.cgi?id=401683&action=review

reproduction file

Reproduction steps:

1. Create an SVG element without a viewBox, with a width dependent on the window size (either % of parent, or `vw` units)
2. Create and position a `<text>` element using `x`/`y` attributes, but also give it a %-based x-translate in CSS - `transform: translate(50%, 0);`
3. Do the same with a `<rect>` element
4. Resize the window.

Expected result:
The text and rect should reposition themselves as the window is resized, since the translate is based on the size of <svg>, which is based on the window size.

Current result:
<text> - ignores the transform entirely
<rect> - positions itself properly on initial load. However, when resizing the window, it does not reposition itself until the page is reloaded, the element is removed and re-added to the DOM, or the styling is removed and re-added to the element.

Potentially related ticket:
https://bugs.webkit.org/show_bug.cgi?id=183237

Related Chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1094020
Working in Firefox 77.0.1 (64 bit)

-- 
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/20200611/31af57cc/attachment.htm>


More information about the webkit-unassigned mailing list