[Webkit-unassigned] [Bug 243661] New: Min-width does not respect implicit width on SVG

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 8 02:50:18 PDT 2022


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

            Bug ID: 243661
           Summary: Min-width does not respect implicit width on SVG
           Product: WebKit
           Version: Safari 15
          Hardware: Mac (Apple Silicon)
                OS: macOS 12
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: murrayadcock+webkit at gmail.com
                CC: bfulgham at webkit.org, simon.fraser at apple.com,
                    zalan at apple.com

If an SVG element has an implicit width set (e.g. <svg width="45px">...</svg>) then this should be considered the minimum width of the element.

Currently, setting max-width: min-content works as expected (the SVG element will be 45px wide).

But setting min-width: min-content makes the SVG a seemingly arbitrary width (302px in the test case). (this is the same for max-content and fit-content, neither of which appear to respect intrinsic sizing either)

No combination of other width settings seems to be able to override this. For example, setting a max-width or width value of 45px still results in a 302px element.

Changing the implicit width on the element doesn't seem to have any effect either (it sticks to 302px wide).

See this reproduction of the issue, which has optional code for testing in a Grid format (grid columns also ignore the actual minimum width and default to 302px wide) and which shows that min-w-idth: auto works as expected:

https://codepen.io/theadhocracy/pen/OJvEmPv

[FYI this has also been tested on iCab to rule out Safari-specific bugs and can be reproduced there, as well as on WebKit browsers on iOS devices]

-- 
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/20220808/ad487246/attachment-0001.htm>


More information about the webkit-unassigned mailing list