Created attachment 353001 [details] Test page In the attached page, clicking the button toggles the grid element between "display: initial" and "display: none". The first time it's clicked, the grid shows, as expected. The second time, the grid is hidden, but the space it occupied is not reclaimed by the element below it. The third time, the button disappears!
<rdar://problem/45520904>
All browsers (Chrome Canary 119, Firefox Nightly 120 and Safari 17) are matching each other while clicking 'button' thrice and each stage is same and button does not disappear. Marking this as 'RESOLVED CONFIGURATION CHANGED'. If I am unable to reproduce or followed wrong steps, please reopen and share updated test case or steps to reproduce.