Bug 311249

Summary: fieldset + display: grid is broken
Product: WebKit Reporter: Alex <alexander>
Component: Layout and RenderingAssignee: alan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, karlcow, koivisto, sgill26, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 26   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Screen recording
none
rendering in safari, firefox, chrome
none
[fast-cq]Patch none

Alex
Reported 2026-04-01 01:04:13 PDT
When display: grid is applied to a fieldset, extra unnecessary space is added to the fieldset below all of its content: https://codepen.io/waterplea/pen/RNGyrVL Works properly everywhere, as usual, except webkit. A reflow will snap the sense into it, I added fieldset:hover { block-size: fit-content } and if you hover it – the size is corrected, but if this style is applied initially it has no effect.
Attachments
Screen recording (1.62 MB, video/quicktime)
2026-04-01 01:12 PDT, Alex
no flags
rendering in safari, firefox, chrome (312.58 KB, image/png)
2026-04-02 05:37 PDT, Karl Dubost
no flags
[fast-cq]Patch (9.40 KB, patch)
2026-04-11 12:18 PDT, alan
no flags
Alex
Comment 1 2026-04-01 01:12:13 PDT
Created attachment 478872 [details] Screen recording Attached screen recording just in case, since a friend of mine said it does not reproduce for him (however it DOES reproduce for him in the actual app where we discovered this issue).
Karl Dubost
Comment 2 2026-04-02 05:37:21 PDT
Created attachment 478902 [details] rendering in safari, firefox, chrome
Radar WebKit Bug Importer
Comment 3 2026-04-08 01:05:11 PDT
alan
Comment 4 2026-04-11 12:18:35 PDT
Created attachment 479018 [details] [fast-cq]Patch
EWS
Comment 5 2026-04-13 05:19:19 PDT
Committed 311078@main (e60be43b44bb): <https://commits.webkit.org/311078@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 479018 [details].
Note You need to log in before you can comment on or make changes to this bug.