RESOLVED DUPLICATE of bug 286753 287485
Overflowing padding in Flex or Grid layouts is cut-off in WebKit (works in Firefox + Chromium)
https://bugs.webkit.org/show_bug.cgi?id=287485
Summary Overflowing padding in Flex or Grid layouts is cut-off in WebKit (works in Fi...
Paul Rhomberg
Reported 2025-02-11 08:53:59 PST
Created attachment 474204 [details] Safari test (bug) Hey, With an overflowing grid or flex layout, the padding that overflows is being cut off in Webkit. This works fine in both Firefox and Chromium. Here is a minimal project that reproduces this: https://codepen.io/therealpaulplay/pen/ZYEEXpq HTML: <main> <div class="content"> <!-- Scrollable container with horizontal overflow and side padding --> <div class="scroll"> <div class="cards"> <div class="card">Card 1</div> <div class="card">Card 2</div> <div class="card">Card 3</div> <div class="card">Card 4</div> </div> </div> </div> </main> CSS: /* The flex container */ .content { display: flex; align-items: center; height: 80vh; } /* The horizontally scrollable container with side padding */ .scroll { overflow-x: scroll; overflow-y: hidden; width: 100%; height: 100%; max-width: 700px; padding-inline: 50px; background-color: yellow; } /* The grid of “cards” laid out in a single row */ .cards { display: flex; gap: 10px; width: max-content; align-items: center; height: 100%; } /* Simple card styling */ .card { min-width: 300px; height: 100%; background: #ccc; display: flex; align-items: center; justify-content: center; } Video showcasing this in Safari + Firefox are attached.
Attachments
Safari test (bug) (5.09 MB, video/quicktime)
2025-02-11 08:53 PST, Paul Rhomberg
no flags
Firefox (works fine) (6.50 MB, video/quicktime)
2025-02-11 08:54 PST, Paul Rhomberg
no flags
Paul Rhomberg
Comment 1 2025-02-11 08:54:21 PST
Created attachment 474205 [details] Firefox (works fine)
alan baradlay
Comment 2 2025-02-11 15:04:11 PST
I looked into this very recently. I think I have a bugzilla on this. Let me find it.
alan baradlay
Comment 3 2025-02-11 15:08:21 PST
I was thinking about this one 286753 but apparently it's about regular BFC. So while this one is also about padding inline end, it's slightly unrelated.
alan baradlay
Comment 4 2025-02-11 15:08:33 PST
bug 286753 that is
alan baradlay
Comment 5 2025-02-11 18:24:58 PST
(In reply to zalan from comment #3) > I was thinking about this one 286753 but apparently it's about regular BFC. > So while this one is also about padding inline end, it's slightly unrelated. actually it's a dupe. here is a test reduction. The scroller is a block container (and it does not really matter whether the child content is flex, grid or another block box). The patch in bug 286753 fixes the original test case. <style> .scroll { overflow-x: scroll; width: 100px; height: 150px; padding-inline: 150px; background-color: yellow; } .flex_box { display: flex; width: 200px; height: 100%; background: green; } </style> <div class="scroll"><div class=flex_box></div></div>
alan baradlay
Comment 6 2025-02-11 18:25:28 PST
*** This bug has been marked as a duplicate of bug 286753 ***
Note You need to log in before you can comment on or make changes to this bug.