Skip to content

Commit

Permalink
[css-grid-2] Handle intrinsic size contribution to flexible tracks in…
Browse files Browse the repository at this point in the history
…stead of ignoring their contents completely. #2177
  • Loading branch information
fantasai committed Apr 20, 2018
1 parent 00c78bc commit 25e3f63
Showing 1 changed file with 63 additions and 2 deletions.
65 changes: 63 additions & 2 deletions css-grid-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3789,7 +3789,8 @@ Resolve Intrinsic Track Sizes</h3>

<li id="algo-single-span-items">
<strong>Size tracks to fit non-spanning items:</strong>
For each track with an intrinsic <a>track sizing function</a>,
For each track with an intrinsic <a>track sizing function</a>
and not a <a>flexible sizing function</a>,
consider the items in it with a span of 1:

<dl class="switch">
Expand Down Expand Up @@ -3847,7 +3848,7 @@ Resolve Intrinsic Track Sizes</h3>
increase the <a>growth limit</a> to match the <a>base size</a>.

<li id="algo-spanning-items">
<strong>Increase sizes to accommodate spanning items:</strong>
<strong>Increase sizes to accommodate spanning items crossing content-sized tracks:</strong>
Next, consider the items with a span of 2
that do not span a track with a <a>flexible sizing function</a>,
treating a <a>min track sizing function</a> of ''auto''
Expand Down Expand Up @@ -3939,6 +3940,27 @@ Resolve Intrinsic Track Sizes</h3>

Repeat incrementally for items with greater spans until all items have been considered.

<li id="algo-spanning-flex-items">
<strong>Increase sizes to accommodate spanning items crossing flexible tracks:</strong>
Next, repeat the previous step
instead considering (together, rather than grouped by span size)
all items
that <em>do</em> span a track with a <a>flexible sizing function</a>
while
<ul>
<li>
treating flexible tracks as having
a <a>max track sizing function</a> equal to their <a>min track sizing function</a>
<li>
distributing space <em>only</em> to flexible tracks
(i.e. treating all other tracks as having a <a>fixed sizing function</a>
of their current <a>base size</a>)
<li>
distributing space to such tracks
according to the ratios of their <a>flexible sizing functions</a>
rather than distributing space equally
</ul>

<li id="algo-finite-growth">
If any track still has an infinite <a>growth limit</a>
(because, for example, it had no items placed in it),
Expand Down Expand Up @@ -4305,6 +4327,45 @@ Major Changes</h4>
they must be resolved against the inline dimension, as for blocks.
(<a href="https://github.com/w3c/csswg-drafts/issues/2085">Issue 2085</a>)

<li id="change-2017-span-flexible-tracks">
Adjusted handling of items spanning flexible tracks
to intrinsic track sizes so that
they contribute to the size of flexible tracks that have an intrinsic min
rather than being ignored.
(<a href="https://github.com/w3c/csswg-drafts/issues/2177">Issue 2177</a>)
<blockquote>
<ul>
<li>
<strong>Size tracks to fit non-spanning items:</strong>
For each track with an intrinsic <a>track sizing function</a>
<ins>and not a <a>flexible sizing function</a></ins>,
consider the items in it with a span of 1:
<li>
&hellip;
<li>
<ins><strong>Increase sizes to accommodate spanning items crossing flexible tracks:</strong>
Next, repeat the previous step
instead considering (together, rather than grouped by span size)
all items
that <em>do</em> span a track with a <a>flexible sizing function</a>
while
<ul>
<li>
treating flexible tracks as having
a <a>max track sizing function</a> equal to their <a>min track sizing function</a>
<li>
distributing space <em>only</em> to flexible tracks
(i.e. treating all other tracks as having a <a>fixed sizing function</a>
of their current <a>base size</a>)
<li>
distributing space to such tracks
according to the ratios of their <a>flexible sizing functions</a>
rather than distributing space equally
</ul>
</ins>
</ul>
</blockquote>

<li id="change-2017-repeat-serialization">
Require the used value of a track listing
to be serialized without using ''repeat()'' notation.
Expand Down

0 comments on commit 25e3f63

Please sign in to comment.