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

Re: [csswg-drafts] [css-grid] minmax(auto, min-content) under a max-content constraint (#3565)

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Thu, 07 Feb 2019 09:34:56 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-461347253-1549532095-sysbot+gh@w3.org>
@MatsPalmgren 

>  If the result in Firefox isn't what the author wants they should just use `min-content` track sizing (to get the result in Chrome) or `auto` track sizing (to get the result in "Expected").

I think it's reasonable for an author to expect that “shrinkwrap” sizing (like floats) doesn't create more space in the container than its internal layout is later able to use. The point of content-based auto sizing is to just fit the content, and an item sized at max-content shouldn't be larger than its contents. Here we have a grid container sized at max-content (which is intended to size an element to fit its contents at their most stretched-out size), but the result we're getting right now is that the grid container is twice as large as its content.

> Whatever you decide, please make sure it makes sense also when span > 1 and when there's a mix of fixed and `min-content` max-sizing tracks.

Yes. I hadn't yet worked out the edits for correctly clamping the minimum contribution for spanning items in https://github.com/w3c/csswg-drafts/issues/2303 but this issue does make that more complex. I outlined some proposed changes there to handle spanning items, let me know if it seems to work. (Fwiw, edits for that without accepting the change proposed in this issue would just fold min-content under the “infinity” bullet.)

-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3565#issuecomment-461347253 using your GitHub account
Received on Thursday, 7 February 2019 09:34:57 UTC

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