RESOLVED FIXED 180283
[css-grid] Automatic minimum size is not clamped if min track sizing function is auto
https://bugs.webkit.org/show_bug.cgi?id=180283
Summary [css-grid] Automatic minimum size is not clamped if min track sizing function...
Javier Fernandez
Reported 2017-12-01 14:36:19 PST
Created attachment 328159 [details] Test case to reproduce the bug The spec is quite clear regarding this (https://drafts.csswg.org/css-grid/#min-size-auto): "However, if the grid item spans only grid tracks that have a fixed max track sizing function, its specified size and content size in that dimension (and the input to the transferred size in the other dimension) are further clamped to less than or equal to the stretch fit the grid area’s size (so as to prevent the automatic minimum size from forcing overflow of its fixed-size grid area)." It says that if the max track sizing function is fixed, it should clamp the automatic minimum size. In the attached example we have a grid container with: grid-template-columns: minmax(auto, 0px); So the automatic minimum size of the item needs to be clamped to 0px. And the final size of the track should be 0px. This is basically what this test wrongly checks: http://w3c-test.org/css/css-grid/grid-items/grid-minimum-size-grid-items-017.html Firefox does this right.
Attachments
Test case to reproduce the bug (168 bytes, text/html)
2017-12-01 14:36 PST, Javier Fernandez
no flags
Expected (4.11 KB, image/png)
2017-12-01 14:36 PST, Javier Fernandez
no flags
Patch (17.76 KB, patch)
2017-12-11 21:50 PST, Manuel Rego Casasnovas
no flags
Javier Fernandez
Comment 1 2017-12-01 14:36:44 PST
Created attachment 328160 [details] Expected
Manuel Rego Casasnovas
Comment 2 2017-12-11 21:50:01 PST
WebKit Commit Bot
Comment 3 2017-12-11 23:11:08 PST
Comment on attachment 329088 [details] Patch Clearing flags on attachment: 329088 Committed r225776: <https://trac.webkit.org/changeset/225776>
WebKit Commit Bot
Comment 4 2017-12-11 23:11:10 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 5 2017-12-11 23:12:37 PST
Note You need to log in before you can comment on or make changes to this bug.