Skip to content

Commit 02f0129

Browse files
committed
[css-grid] Integrate baseline alignment into track sizing algorithm. First pass, issue #1039.
1 parent 5c74bfa commit 02f0129

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

css-grid/Overview.bs

+23-5
Original file line numberDiff line numberDiff line change
@@ -3745,6 +3745,11 @@ Resolve Intrinsic Track Sizes</h3>
37453745
furthermore clamp this <a>growth limit</a> by the ''fit-content()'' argument.
37463746
</dl>
37473747

3748+
<ins><p>In all cases, if any items participate in <a>baseline alignment</a>,
3749+
perform baseline alignment to calculate the extra space it would require,
3750+
and add that to the track’s <a>base size</a> and/or <a>growth limit</a>
3751+
as needed.</p></ins>
3752+
37483753
In all cases, if a track’s <a>growth limit</a> is now less than its <a>base size</a>,
37493754
increase the <a>growth limit</a> to match the <a>base size</a>.
37503755

@@ -3764,19 +3769,22 @@ Resolve Intrinsic Track Sizes</h3>
37643769
First increase the <a>base size</a> of tracks with
37653770
an <a lt="intrinsic sizing function">intrinsic</a> <a>min track sizing function</a>
37663771
by <a href="#extra-space">distributing extra space</a> as needed
3767-
to accommodate the contributions dictated by these items’ <a>min-size contributions</a>.
3772+
to accommodate these items’ <a>min-size contributions</a>
3773+
<ins>and <a>baseline alignment</a></ins>.
37683774
<li>
37693775
<strong>For content-based minimums:</strong>
37703776
Next continue to increase the <a>base size</a> of tracks with
37713777
a <a>min track sizing function</a> of ''min-content'' or ''max-content''
37723778
by <a href="#extra-space">distributing extra space</a> as needed
3773-
to account for these items' <a>min-content contributions</a>.
3779+
to account for these items' <a>min-content contributions</a>
3780+
<ins>and baseline alignment</ins>.
37743781
<li>
37753782
<strong>For max-content minimums:</strong>
37763783
Third continue to increase the <a>base size</a> of tracks with
37773784
a <a>min track sizing function</a> of ''max-content''
37783785
by <a href="#extra-space">distributing extra space</a> as needed
3779-
to account for these items' <a>max-content contributions</a>.
3786+
to account for these items' <a>max-content contributions</a>
3787+
<ins>and baseline alignment</ins>.
37803788
<li>
37813789
If at this point any track’s <a>growth limit</a> is now less than its <a>base size</a>,
37823790
increase its <a>growth limit</a> to match its <a>base size</a>.
@@ -3785,7 +3793,8 @@ Resolve Intrinsic Track Sizes</h3>
37853793
Next increase the <a>growth limit</a> of tracks with
37863794
an <a lt="intrinsic sizing function">intrinsic</a> <a>max track sizing function</a>
37873795
by <a href="#extra-space">distributing extra space</a> as needed
3788-
to account for these items' <a>min-size contributions</a>.
3796+
to account for these items' <a>min-size contributions</a>
3797+
<ins>and baseline alignment</ins>.
37893798
Mark any tracks whose <a>growth limit</a> changed
37903799
from infinite to finite in this step
37913800
as <dfn>infinitely growable</dfn> for the next step.
@@ -3834,7 +3843,8 @@ Resolve Intrinsic Track Sizes</h3>
38343843
Lastly continue to increase the <a>growth limit</a> of tracks with
38353844
a <a>max track sizing function</a> of ''max-content''
38363845
by <a href="#extra-space">distributing extra space</a> as needed
3837-
to account for these items' <a>max-content contributions</a>.
3846+
to account for these items' <a>max-content contributions</a>
3847+
<ins>and baseline alignment</ins>.
38383848
However, limit the growth of any ''fit-content()'' tracks
38393849
by their ''fit-content()'' argument.
38403850
</ol>
@@ -3913,6 +3923,14 @@ Resolve Intrinsic Track Sizes</h3>
39133923
</ol>
39143924
</ol>
39153925

3926+
<ins><p>The extra space required to accommodate
3927+
an item’s participation in <a>baseline alignment</a>
3928+
is distributed by
3929+
calculating the shims required for including their participation
3930+
with already-considered items (those of lesser or equal spanning size)
3931+
and distributing the shims’ space as if it were
3932+
part of the shimmed items’ original size contribution.</p></ins>
3933+
39163934
Note: When this step is complete,
39173935
all intrinsic <a>base sizes</a> and <a>growth limits</a>
39183936
will have been resolved to absolute lengths.

0 commit comments

Comments
 (0)