Open sammygill opened 1 year ago
CC @fantasai
The relevant spec section is https://www.w3.org/TR/css-grid-2/#subgrid-area-inheritance
Analyzing the testcase:
This, afaict, yields the rendering in WebKit. CC @tabatkins for sanity check.
(I noticed that in https://www.w3.org/TR/css-grid-2/#subgrid-area-inheritance we didn't specify that only the subgridded axes inherits names, but that doesn't affect the results here anyway.)
I think the important idea to keep in mind is that subgridding an axis creates a physical-axis correspondance, not a logical one. (A logical one wouldn't make any sense, if you think about it.) Like if a subgrid subgrids its horizontal tracks, then its horizontal tracks match up to the parent grid's horizontal tracks, and horizontal parent grid line names get adopted as names for the coinciding horizontal subgrid lines.
Yes, my read agrees with fantasai. The line names are definitely physical, and thus will swap logical axises if the writing mode axis changes (and indeed, nothing else even remotely makes sense; the only other behavior we could theoretically do is block line inheritance entirely when the writing mode rotates).
And with that established, each element forces itself to auto-flow into a fresh column, so they should occupy four column, and have the sizes that WebKit gives them.
This stemmed from a discussion about a particular subtest in a subgrid WPT: https://github.com/web-platform-tests/wpt/issues/41831
https://github.com/web-platform-tests/wpt/blob/master/css/css-grid/subgrid/orthogonal-writing-mode-005.html
TLDR: WebKit disagrees with Blink and Gecko regarding the following example:
It sounds like Blink is performing some sort of mapping of the outer grid's implicit line names to the subgrid where they overlap (which I think I agree with), but there is potentially a discrepancy with orthogonal subgrids.
Could we get some sort of clarification about how the mapping should occur in this scenario? My understanding is that the named lines should keep their physical positions and an orthogonal subgrid should be able to reference them but in the opposite axis. In this particular example since the grid area completely overlaps the subgrid it should be able to reference all of the implicit lines and potentially giving the WebKit output.