Created attachment 470109 [details] Screenshot of safari alongside chrome In Chrome, Edge, and Firefox(with popover flag checked) the opened popover displays centered vertically – fitting the height of the text content as intended. In Safari the height of the popover fills the viewport vertically. Test page: https://tropical-bustling-utahraptor.glitch.me/ The specific use case that motivates applying grid to the popover is to overflow the child .scroll-pane instead of the parent popover element.
Created attachment 470197 [details] rendering in safari, firefox, chrome Safari Technology Preview 189 19619.1.3.2 Firefox Nightly 125.0a1 12524.3.5 Google Chrome Canary 124.0.6338.0 6338.0
<rdar://problem/124117215>
Created attachment 470225 [details] testcase A minimal testcase
Created attachment 470226 [details] rendering in safari, firefox, chrome Rendering of the minimal test case in the 3 browsers.
The CSS for popover is defined in https://searchfox.org/wubkat/source/Source/WebCore/css/popover.css
Created attachment 470229 [details] Testcase Further reduced test case with the style from popover that recreates the bug. Looks like it is due to the position: fixed and height: min-content on the grid.
That confirms this issue is not specific to popover, nice to know. Apparent workaround is setting "height: auto".