Bug 245402

Summary: fieldset with legend as flex item of form height inconsistency
Product: WebKit Reporter: chrstntdd
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=220793

Description chrstntdd 2022-09-19 16:38:02 PDT
From the readme in the repro case for the bug:

"There appears to be a rendering inconsistency in Safari on both desktop and iOS. I also encountered this issue in safari 15 as well on all platforms. At a high level there is some additional space that is being preserved on the <fieldset> element. Strangely, this behavior can be "corrected" on the fly by triggering a repaint on the whole viewport such as resizing the browser window on desktop or an orientation change on iOS."


Repo: https://github.com/chrstntdd/fieldset-flex-bug
Comment 1 Ahmad Saleem 2022-09-21 15:43:08 PDT
Can you try to use:

fieldset {
min-inline-size: min-content !important;
}

and confirm whether it works?
Comment 2 chrstntdd 2022-09-21 18:42:35 PDT
(In reply to Ahmad Saleem from comment #1)
> Can you try to use:
> 
> fieldset {
> min-inline-size: min-content !important;
> }
> 
> and confirm whether it works?

I have added that declaration on the main branch of the repo and the bug is still present.

https://github.com/chrstntdd/fieldset-flex-bug/commit/cd794541472ccf9932bc4952b5ea406f6f56546e
Comment 3 Ahmad Saleem 2022-09-23 06:00:07 PDT
It might be duplicate of bug 220793 and this is not just limited to "flex" but "grid" layout as well.
Comment 4 Radar WebKit Bug Importer 2022-09-26 16:38:17 PDT
<rdar://problem/100433635>
Comment 5 Ahmad Saleem 2022-12-14 14:45:12 PST
@Reporter - Can you try now with Safari Technology Preview 160, it does have fixes for Legend respecting other than display types like flex etc.?