WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 257614
243661
Min-width does not respect implicit width on SVG
https://bugs.webkit.org/show_bug.cgi?id=243661
Summary
Min-width does not respect implicit width on SVG
murrayadcock+webkit
Reported
2022-08-08 02:50:18 PDT
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]
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-08-15 02:51:15 PDT
<
rdar://problem/98661480
>
Ahmad Saleem
Comment 2
2023-07-25 16:56:34 PDT
It get fixed by:
https://github.com/WebKit/WebKit/pull/16084
I have above patches in local WebKit ToT and it seems to fix this test case and make us match Chrome Canary 117. I removed above patches and then compiled local and we fail this test case. Just wanted to add this information, if above PR stick, I will mark this as 'RESOLVED CONFIGURATION CHANGED' else it would be helpful for someone else in future while trying to fix this issue.
Ahmad Saleem
Comment 3
2023-07-26 09:34:59 PDT
Fixed now. *** This bug has been marked as a duplicate of
bug 257614
***
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