Bug 260461

Summary: Out of flow element with `display: grid` and `height: fit-content` takes up whole viewport when a child is present
Product: WebKit Reporter: Karl Dubost <karlcow>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: akeerthi, bfulgham, cdumez, ntim, sgill26, simon.fraser, webkit-bug-importer, wenson_hsieh, zalan
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari 17   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
testcase
none
rendering in Safari, firefox, chrome
none
reduced testcase none

Description Karl Dubost 2023-08-20 23:14:43 PDT
Created attachment 467359 [details]
testcase

Steps to reproduce:

1. Open the testcase in Safari, Firefox and Chrome

Expected:
A dialog with a button having a reasonable size.

Actual:
On safari, the button is taking the full height of the viewport.
Comment 1 Radar WebKit Bug Importer 2023-08-20 23:14:53 PDT
<rdar://problem/114177004>
Comment 2 Karl Dubost 2023-08-20 23:16:51 PDT
Created attachment 467360 [details]
rendering in Safari, firefox, chrome

This was initially reported on https://github.com/webcompat/web-bugs/issues/125362


Tested on macOS 14.0
---
Safari Technology Preview  176           19617.1.1.2
Firefox Nightly            118.0a1       11823.8.19
Google Chrome Canary       118.0.5960.0  5960.0
Comment 3 Tim Nguyen (:ntim) 2023-08-21 09:39:52 PDT
Created attachment 467370 [details]
reduced testcase