Closed Bug 1547564 Opened 6 years ago Closed 6 years ago

[css-grid-2] Changes to row-gap property not being accounted for when sizing of parent auto rows is calculated

Categories

(Core :: Layout: Grid, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: me, Assigned: MatsPalmgren_bugz)

References

Details

(Keywords: testcase)

Attachments

(1 file)

I am using the latest treeherder build on OSX.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=23100795152d2faa97305e678b57316a9058773a

Using this example: https://codepen.io/rachelandrew/pen/jRJyrR

  1. The parent grid has a gap of 20px, and auto sized tracks.
  2. The subgrid spans two rows and therefore one gap
  3. If I increase the size of the row-gap on the subgrid, the gap increases but the block size of the containing tracks do not, so the items overflow the grid area.

Screenshot attached.

I believe that the size needed for the subgrid items should be calculated before the size of the tracks on the parent, and so the parent grid area should grow to contain the subgrid.

Spec https://drafts.csswg.org/css-grid-2/#subgrid-sizing,

If we reduce the gap (for example if the gap on the parent was 50px and the row-gap on the child 0) the grid-area remains the same size in the block dimension, and so the items are gaining size where the block-end and block-start meet. However this seems that it would be the desired behavior as that allows the subgridded item tracks to line up with gaps on the parent. See example: https://codepen.io/rachelandrew/pen/JVzWNB

Depends on: subgrid
Priority: -- → P3

The testcase works fine in Nightly. I think this was fixed a while ago (by bug 1547560 probably).
I've included WPTs for these cases, and more, in bug 1579993.

Assignee: nobody → mats
Status: NEW → RESOLVED
Closed: 6 years ago
Depends on: 1547560
Flags: in-testsuite+
Keywords: testcase
OS: Unspecified → All
Hardware: Unspecified → All
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: