You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Test passes if there is a filled green square.</p>
<div style="display: inline-grid; background: green; aspect-ratio: 1/1; min-height: 60px; grid-template-rows: repeat(auto-fill, 50px);"></div>
All browsers appear to render a 60x60 green square, as opposed to 100x100. In order to hit the min-height, though, you'd expect to produce 2 50px rows.
In the column direction, however, this works as expected, and 2 50px columns are produced, resulting in a 100x100 square:
<p>Test passes if there is a filled green square.</p>
<div style="display: inline-grid; background: green; aspect-ratio: 1/1; min-height: 60px; grid-template-columns: repeat(auto-fill, 50px);"></div>
Is this expected to only work in the column direction? (Same question applies for masonry)
This just looks like an impl bug. The spec is clear, and we should def be consistent between rows and columns. I suspect someone early on just wrote a buggy test, and everyone followed the test instead of the spec?
It's because, in the 2nd case, when computing the min/max-content inline sizes you transfer size constraints from the block axis thru the aspect ratio. So (roughly speaking) min-height: 60px gets transferred into min-width: 60px. And this results in a width of 100px:
In the first case, though, you first compute the min/max-content inline sizes. And you don't want to perform layout when doing so, so you just transfer min-height: 60px, even if grid layout would end up producing a height of 100px. And this results in a width of 60px:
Activity
tabatkins commentedon Jan 23, 2026
This just looks like an impl bug. The spec is clear, and we should def be consistent between rows and columns. I suspect someone early on just wrote a buggy test, and everyone followed the test instead of the spec?
Loirooriol commentedon Jan 23, 2026
I don't think it's because of a buggy test.
It's because, in the 2nd case, when computing the min/max-content inline sizes you transfer size constraints from the block axis thru the aspect ratio. So (roughly speaking)
min-height: 60pxgets transferred intomin-width: 60px. And this results in a width of 100px:In the first case, though, you first compute the min/max-content inline sizes. And you don't want to perform layout when doing so, so you just transfer
min-height: 60px, even if grid layout would end up producing a height of 100px. And this results in a width of 60px:[Masonry] Update row aspect ratio tests
[Masonry] Update row aspect ratio tests
Bug 2016814 [wpt PR 57787] - [Masonry] Update row aspect ratio tests,…
[Masonry] Update row aspect ratio tests