Bug 289961

Summary: [Grid]Text overflows from 'width: max-content' container
Product: WebKit Reporter: Eliad T <eliadt>
Component: Layout and RenderingAssignee: Sammy Gill <sgill26>
Status: RESOLVED FIXED    
Severity: Normal CC: ahmad.saleem792, bfulgham, karlcow, koivisto, ntim, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Mac (Apple Silicon)   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=86154
https://bugs.webkit.org/show_bug.cgi?id=216144
https://bugs.webkit.org/show_bug.cgi?id=243173
https://bugs.webkit.org/show_bug.cgi?id=264448
https://github.com/web-platform-tests/wpt/pull/53546
Attachments:
Description Flags
An image that shows the issue in Safari and how it should look like in Chrome
none
Test reduction none

Eliad T
Reported 2025-03-18 07:19:51 PDT
Created attachment 474606 [details] An image that shows the issue in Safari and how it should look like in Chrome We have recently encountered an issue where a text node inside a container with the CSS property of 'width: max-content' does not get contained correctly and overflows outside of the bounds of the container element. It works as expected in Chromium-based browsers but does not work properly in Safari. The following codepen demonstrates the issue - open in both Chrome and Safari to see the difference: https://codepen.io/Liron-Monitz/pen/gbOWGKM The following test site also demonstrates the issue - open both in Chrome and Safari to see the difference: https://supportqa-h.wixstudio.com/tb-10888 Thanks in advance!
Attachments
An image that shows the issue in Safari and how it should look like in Chrome (284.92 KB, image/png)
2025-03-18 07:19 PDT, Eliad T
no flags
Test reduction (291 bytes, text/html)
2025-03-21 10:04 PDT, alan
no flags
Karl Dubost
Comment 1 2025-03-21 02:21:41 PDT
These might be duplicates: Bug 86154 Bug 216144 Bug 243173 Bug 264448 on Bug 264448 Ahmad tried to solve an issue which might be related as it was touching to flexbox context too. Maybe it would be worth checking if it fixes this issue.
alan
Comment 2 2025-03-21 10:04:02 PDT
Created attachment 474676 [details] Test reduction This looks like a bug in grid layout where the grid box is supposed to be enclosing but it is taking min-content size.
Radar WebKit Bug Importer
Comment 3 2025-03-25 07:20:14 PDT
Sammy Gill
Comment 4 2025-04-07 11:07:08 PDT
EWS
Comment 5 2025-04-08 08:40:46 PDT
Committed 293420@main (5762dcfd7a2b): <https://commits.webkit.org/293420@main> Reviewed commits have been landed. Closing PR #43617 and removing active labels.
EWS
Comment 6 2025-04-14 12:55:58 PDT
Committed 289651.425@safari-7621-branch (d1a2004e5e1a): <https://commits.webkit.org/289651.425@safari-7621-branch> Reviewed commits have been landed. Closing PR #2990 and removing active labels.
Vitor Roriz
Comment 7 2025-07-02 14:15:36 PDT
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/53546
Note You need to log in before you can comment on or make changes to this bug.