Skip to content

Commit

Permalink
[css-grid-1] Clarify what we're fixing the row/column sizes for (figu…
Browse files Browse the repository at this point in the history
…ring out available space). Also wordsmith. #3046.
  • Loading branch information
fantasai committed Sep 10, 2018
1 parent fd17aa0 commit b29122f
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions css-grid-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3608,18 +3608,28 @@ Grid Sizing Algorithm</h3>
</div>

<li>
Next, the <a>track sizing algorithm</a> resolves the sizes of the <a>grid rows</a>,
using the <a>grid column</a> sizes calculated in the previous step
and the effective column gap sizes after applying 'justify-content'.
Next, the <a>track sizing algorithm</a> resolves the sizes of the <a>grid rows</a>.

To find the <a>inline-axis</a> <a>available space</a>
for any items whose <a>block-axis</a> size contributions require it,
use the <a>grid column</a> sizes calculated in the previous step.
If the <a>grid container</a>’s <a>inline size</a> is <a>definite</a>,
also apply 'justify-content'
to account for the effective column gap sizes.

<li>
Then, if the <a>min-content contribution</a> of any grid item has changed
based on the row sizes and alignment calculated in step 2,
re-resolve the sizes of the <a>grid columns</a>
with the new <a lt="min-content contribution">min-content</a>
and <a>max-content contributions</a> (once only),
using the <a>grid row</a> sizes calculated in the previous step
along with the effective row gap sizes calculated by applying 'align-content'.
and <a>max-content contributions</a> (once only).

To find the <a>block-axis</a> <a>available space</a>
for any items whose <a>inline-axis</a> size contributions require it,
use the <a>grid row</a> sizes calculated in the previous step.
If the <a>grid container</a>’s <a>block size</a> is <a>definite</a>,
also apply 'align-content'
to account for the effective row gap sizes.

<div class="note">
This repetition is necessary for cases where the <a>inline size</a> of a <a>grid item</a>
Expand All @@ -3634,9 +3644,14 @@ Grid Sizing Algorithm</h3>
based on the column sizes and alignment calculated in step 3,
re-resolve the sizes of the <a>grid rows</a>
with the new <a lt="min-content contribution">min-content</a>
and <a>max-content contributions</a> (once only),
using the <a>grid column</a> sizes calculated in the previous step
along with the effective column gap sizes calculated by applying 'justify-content'.
and <a>max-content contributions</a> (once only).

To find the <a>inline-axis</a> <a>available space</a>
for any items whose <a>block-axis</a> size contributions require it,
use the <a>grid column</a> sizes calculated in the previous step.
If the <a>grid container</a>’s <a>inline size</a> is <a>definite</a>,
also apply 'justify-content'
to account for the effective column gap sizes.

<li>
Finally, the <a>grid container</a> is sized
Expand Down

0 comments on commit b29122f

Please sign in to comment.