Bug 245402 - fieldset with legend as flex item of form height inconsistency
Summary: fieldset with legend as flex item of form height inconsistency
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 15
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-09-19 16:38 PDT by chrstntdd
Modified: 2022-12-14 14:45 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.?