SVG viewbox doesn't affect min/max/pref size
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect, P3)
Tracking
()
People
(Reporter: emilio, Unassigned)
References
Details
Attachments
(2 files)
See attached test-case. This causes one test failure after bug 1732759, but because we were not parsing fit-content
properly.
I haven't quite dug if this is right or wrong, but it's definitely different from Chromium.
Reporter | ||
Updated•3 years ago
|
Comment 1•3 years ago
|
||
Yeah, there are some known compat issues around intrinsic sizing for SVG elements that lack an intrinsic size but have a viewBox.
IIRC we treat the viewBox as providing an intrinsic aspect ratio but not providing any intrinsic dimensions. So we end up treating this SVG image as having an intrinsic width and height of 0.
Comment 2•3 years ago
|
||
simplified the testcase a bit, and added a section with *-available
(which is stretch
from css-sizing-4).
It sort of looks like Chromium is doing "stretchy" behavior for all of the supposedly-content-dependent keywords, which seems wrong. In contrast, we're behaving as if the content were 0-sized, but will happily grow to fill the containing block if given a sizing keyword that prompts that behavior. Or something along those lines...
Reporter | ||
Comment 3•3 years ago
|
||
Changing severity to S3 because it seems a long-standing behavior different and we're not aware of it causing compat issues in the wild.
Description
•