Skip to content

Commit

Permalink
[css-flexbox] Rewrote container cross-sizing to be generic to the for…
Browse files Browse the repository at this point in the history
…matting context, rather than assuming block layout. #5190.
  • Loading branch information
tabatkins committed Jun 11, 2020
1 parent ab0e4fe commit dbc8f6d
Showing 1 changed file with 33 additions and 15 deletions.
48 changes: 33 additions & 15 deletions css-flexbox-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2803,21 +2803,10 @@ Cross-Axis Alignment</h3>
if neither of the item's cross-axis margins are <a value for=margin>auto</a>.

<li id='algo-cross-container'>
<strong>Determine the flex container's used cross size:</strong>

<ul>
<li>
If the cross size property is a <a>definite</a> size,
use that,
clamped by the used min and max <a>cross sizes</a>
of the <a>flex container</a>.

<li>
Otherwise,
use the sum of the flex lines' cross sizes,
clamped by the used min and max <a>cross sizes</a>
of the <a>flex container</a>.
</ul>
<strong>Determine the flex container's used cross size</strong>
using the rules of the [=formatting context=] in which it participates.
If a content-based [=cross size=] is needed,
use the sum of the [=flex lines=]' [=cross sizes=].

<li id='algo-line-align'>
<strong>Align all flex lines</strong> per 'align-content'.
Expand Down Expand Up @@ -3732,6 +3721,35 @@ Changes since the <a href="https://www.w3.org/TR/2018/CR-css-flexbox-1-20181119/
by performing layout <ins>as if it were an [=in-flow=] [=block-level box=]
with the used <a>main size</a> and the <ins>given</ins> available space &hellip;
</blockquote>

<li id="change-2018-cross-sizing">
Rewrote flex-contain cross-sizing step
to depend on the rules of whatever formatting context it's in,
rather than assuming block-layout rules.
(<a href="https://github.com/w3c/csswg-drafts/issues/5190">Issue 5190</a>)

<blockquote>
<strong>Determine the flex container's used cross size</strong>
<ins>using the rules of the [=formatting context=] in which it participates.
If a content-based [=cross size=] is needed,
use the sum of the [=flex lines=]' [=cross sizes=].</ins>

<del>
<ul>
<li>
If the cross size property is a <a>definite</a> size,
use that,
clamped by the used min and max <a>cross sizes</a>
of the <a>flex container</a>.

<li>
Otherwise,
use the sum of the flex lines' cross sizes,
clamped by the used min and max <a>cross sizes</a>
of the <a>flex container</a>.
</ul>
</del>
</blockquote>
</ul>

<h3 id="changes-20171016">
Expand Down

0 comments on commit dbc8f6d

Please sign in to comment.