W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2017

Re: [csswg-drafts] [css-grid] Percentage tracks and indefinite sizes

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Wed, 15 Nov 2017 00:08:43 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-344442739-1510704522-sysbot+gh@w3.org>
To clarify, the spec is currently written in conformance with the above resolution (see https://drafts.csswg.org/css-grid-1/#valdef-grid-template-columns-length-percentage and https://drafts.csswg.org/css-grid-1/#intrinsic-sizes). But overall what's happening doesn't seem to be very clearly described.

Afaict, we could describe what is happening as the following (which is then implemented differently in UAs in order to optimize the number of passes):

1. Size the Grid Container (per axis, for both axes)
  - If it is definite, just get that size.
  - If it is indefinite, run the grid sizing algorithm under min/max-content constraints, treating percentages as auto, in order to find the indefinite size.
2.  Size the Grid
  - Run the grid sizing algorithm under normal constraints: auto behaves as auto, and percentages resolve against the size of the grid container as calculated in step #1.

Does this seem correct, or are there shortcuts under #1 that aren't reflected here?

-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1921#issuecomment-344442739 using your GitHub account
Received on Wednesday, 15 November 2017 00:08:45 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 15 November 2017 00:08:48 UTC