Bug 1549620 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Open attached testcase.
The columns are sized with `repeat(auto-fill, 100px)`.
The spec says https://drafts.csswg.org/css-grid/#auto-repeat
> if the grid container has a definite min size in the relevant axis, the number of repetitions is the smallest possible positive integer that fulfills that minimum requirement.

The min size is `210px`, but note `box-sizing: border-box; padding: 5px`. Then,
 - With 1 repetition, the outer size would be `5px + 1*100px + 5px = 110px`, with doesn't fulfill the minimum
 - With 2 repetitions,  the outer size would be `5px + 2*100px + 5px = 210px`, with does fulfill the minimum.

So there should be 2 columns, but there are 3.
The other axis behaves as expected, and there are 2 rows.

Note that in Chromium there are 3 columns and 3 rows, but this is being addressed in http://crrev/c/1546734
Open attached testcase.
The columns are sized with `repeat(auto-fill, 100px)`.
The spec says https://drafts.csswg.org/css-grid/#auto-repeat
> if the grid container has a definite min size in the relevant axis, the number of repetitions is the smallest possible positive integer that fulfills that minimum requirement.

The min size is `210px`, but note `box-sizing: border-box; padding: 5px`. Then,
 - With 1 repetition, the outer size would be `5px + 1*100px + 5px = 110px`, which doesn't fulfill the minimum
 - With 2 repetitions,  the outer size would be `5px + 2*100px + 5px = 210px`, which does fulfill the minimum.

So there should be 2 columns, but there are 3.
The other axis behaves as expected, and there are 2 rows.

Note that in Chromium there are 3 columns and 3 rows, but this is being addressed in http://crrev/c/1546734
Open attached testcase.
The columns are sized with `repeat(auto-fill, 100px)`.
The spec says https://drafts.csswg.org/css-grid/#auto-repeat
> if the grid container has a definite min size in the relevant axis, the number of repetitions is the smallest possible positive integer that fulfills that minimum requirement.

The min size is `210px`, but note `box-sizing: border-box; padding: 5px`. Then,
 - With 1 repetition, the outer size would be `5px + 1*100px + 5px = 110px`, which doesn't fulfill the minimum
 - With 2 repetitions,  the outer size would be `5px + 2*100px + 5px = 210px`, which does fulfill the minimum.

So there should be 2 columns, but there are 3.
The other axis behaves as expected, and there are 2 rows.

Note that in Chromium there are 3 columns and 3 rows, but this is being addressed in http://crrev/c/1588388

Back to Bug 1549620 Comment 0