WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
213095
SVG <text> CSS not repositioning with percent translate when parent resizes
https://bugs.webkit.org/show_bug.cgi?id=213095
Summary
SVG <text> CSS not repositioning with percent translate when parent resizes
Josh K
Reported
2020-06-11 15:10:27 PDT
Created
attachment 401683
[details]
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)
Attachments
reproduction file
(490 bytes, text/html)
2020-06-11 15:10 PDT
,
Josh K
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-06-11 18:04:23 PDT
<
rdar://problem/64278612
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug