- From: Mats Palmgren via GitHub <sysbot+gh@w3.org>
- Date: Wed, 14 Sep 2016 13:52:37 +0000
- To: public-css-archive@w3.org
Reply to @fantasai:
No, that's not what I want, and I'm pretty sure it's not what
authors wants either. Grid gap percentages should behave slightly
differently from track sizes during intrinsic sizing.
When calculating intrinsic sizes (after track sizing), I want to
do the following:
```
let N = "the number of grid gaps";
let track_size_sum = "sum of track sizes (excluding grid gaps)";
let grid_gap_coord_sum = N *
"computed grid-gap resolved with zero percentage base";
let coord_sum = track_size_sum + grid_gap_coord_sum;
let grid_gap_percent_sum = N * "the grid-gap percentage part";
"intrinsic size" = coord_sum / (1.0 - grid_gap_percent_sum);
```
This is a very simple calculation, and doesn't involve any
changes to the existing track sizing algorithm or any re-layout.
(and we're basically doing all of the above already - it's just
dividing with (1.0 - grid_gap_percent_sum) that is new)
When calculating the number of repeat(auto-fill/fit) tracks (for
intrinsic sizing) we redo the above calculation for each added
repeat-track.
That's it. No other changes are necessary. (In particular:
percentage track sizes continues to be handled as 'auto')
I'm happy to help you with the spec text for this if you want.
--
GitHub Notification of comment by MatsPalmgren
Please view or discuss this issue at
https://github.com/w3c/csswg-drafts/issues/472#issuecomment-247019536
using your GitHub account
Received on Wednesday, 14 September 2016 13:52:50 UTC