[Webkit-unassigned] [Bug 251290] New: Flex item containing an image in column layout is sized to intrinsic image width instead of computed image width

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 27 13:47:29 PST 2023


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

            Bug ID: 251290
           Summary: Flex item containing an image in column layout is
                    sized to intrinsic image width instead of computed
                    image width
           Product: WebKit
           Version: Safari 15
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: cole at colepeters.com
                CC: bfulgham at webkit.org, simon.fraser at apple.com,
                    zalan at apple.com

Live reproduction can be viewed here: https://codesandbox.io/s/lucid-margulis-3c7v8e?file=/index.html

Note that the `div` elements (visualized with a blue border) take on the intrinsic widths of their image children, rather than the computed image width (as expected). This currently also fails on Firefox (see https://bugzilla.mozilla.org/show_bug.cgi?id=1344525), but performs correctly on Chrome, where the divs are sized according to their image child's computed width.

Setting `display: contents` on the `div`s does resolve this layout issue, but prevents any styles from being applied to the `div`s themselves, and also breaks scroll snapping behaviour if the flex container is set to allow its contents to overflow with scrolling.

-- 
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/20230127/f5bfa430/attachment-0001.htm>


More information about the webkit-unassigned mailing list