W3C home > Mailing lists > Public > public-css-archive@w3.org > February 2018

Re: [csswg-drafts] [css-grid] Grid track sizing items spanning a flexible track

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Wed, 14 Feb 2018 20:18:35 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-365732303-1518639513-sysbot+gh@w3.org>
OK, Tab and I looked over this issue. As far as we can tell, there are two principles here that we want to follow:

- Flexible tracks absorb spanning items' content, leaving auto tracks tightly-wrapped around their contents insofar as possible. (See https://github.com/w3c/csswg-drafts/issues/2177#issuecomment-357793857)
- Content-sized tracks such as `auto` tracks and flexible tracks with a minimum (e.g. `minmax(min-content, 1fr)` honor their minimum and ensure that no item spanning them causes overflow.

The current algorithm is failing at #2 because of its heuristic for #1. Consider a spanning item of 100px, a 50px-sized grid, and:

- Track sizing of `minmax(auto, 1fr) minmax(max-content, 2fr)`
- Track sizing of `auto minmax(10px, 1fr)`

In the first case, we're completely ignoring the minimums. In the second case, the first track sizes at 0px because it skips the spanning item, and the second track maxes out at 50px, causing the item to overflow the tracks.

We're not sure if there's a good way to fix this while adhering to both principles, since it seems to require resolving flexible tracks and then _cycling back_ to re-resolve intrinsic track sizes. We'd like to hear back from the Microsoft folks who developed the algorithm on what they think about this situation. @atanassov?

-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2177#issuecomment-365732303 using your GitHub account
Received on Wednesday, 14 February 2018 20:18:38 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:24 UTC