Skip to content

Commit f86bc38

Browse files
committed
[css-flexbox-1][editorial] Redraft content-based minimum size paragraph for more straightforwardness.
1 parent 8e5b129 commit f86bc38

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

css-flexbox-1/Overview.bs

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -963,23 +963,23 @@ Automatic Minimum Size of Flex Items</h3>
963963
To provide a more reasonable default <a>minimum size</a> for <a>flex items</a>,
964964
the used value of a <a>main axis</a> <a>automatic minimum size</a>
965965
on a <a>flex item</a> that is not a <a>scroll container</a>
966-
is a <dfn>content-based minimum size</dfn>;
966+
is its [=content-based minimum size=];
967967
for <a>scroll containers</a> the <a>automatic minimum size</a> is zero, as usual.
968968

969-
Note: The [=content-based minimum size=] is a type of [=intrinsic size contribution=],
970-
and thus the provisions in [[css-sizing-3#intrinsic-contribution]] apply.
971-
972-
In general, the <a>content-based minimum size</a> of a <a>flex item</a>
973-
is the smaller of its <a>content size suggestion</a> and its <a>specified size suggestion</a>.
974-
However, if the box [=is a replaced element=]
975-
with an [=preferred aspect ratio|aspect ratio=]
976-
and no <a>specified size suggestion</a>,
977-
its <a>content-based minimum size</a>
978-
is the smaller of its <a>content size suggestion</a> and its <a>transferred size suggestion</a>.
979-
If the box has neither a <a>specified size suggestion</a> nor an [=preferred aspect ratio|aspect ratio=],
980-
its <a>content-based minimum size</a> is the <a>content size suggestion</a>.
969+
The <dfn>content-based minimum size</dfn> of a [=flex item=]
970+
is the smaller of its [=specified size suggestion=] and its [=content size suggestion=]
971+
if its [=specified size suggestion=] exists;
972+
otherwise, the smaller of its [=transferred size suggestion=] and its [=content size suggestion=]
973+
if the element is [=replaced element|replaced=]
974+
and its [=transferred size suggestion=] exists;
975+
otherwise its [=content size suggestion=].
981976
In all cases, the size is clamped by the [=maximum size|maximum=] [=main size=] if it's <a>definite</a>.
982977

978+
<!-- This differs from Grid's definition
979+
(which just consults the first of specified,transferred,content that exists)
980+
because we explicitly want to let flex items shrink to their min-content size.
981+
Grid doesn't have similarly meaningful shrinkability, so it doesn't need to care. -->
982+
983983
The <a>content size suggestion</a>, <a>specified size suggestion</a>, and <a>transferred size suggestion</a>
984984
used in this calculation account for the relevant min/max/preferred size properties
985985
so that the <a>content-based minimum size</a> does not interfere with any author-provided constraints,
@@ -1008,6 +1008,9 @@ Automatic Minimum Size of Flex Items</h3>
10081008
by any <a>definite</a> [=minimum size|minimum=] and [=maximum size|maximum=] [=cross sizes=] converted through the aspect ratio.
10091009
</dl>
10101010

1011+
Note: The [=content-based minimum size=] is a type of [=intrinsic size contribution=],
1012+
and thus the cyclic percentage provisions in [[css-sizing-3#intrinsic-contribution]] apply.
1013+
10111014
For the purpose of calculating an intrinsic size of the box
10121015
(e.g. the box’s <a>min-content size</a>),
10131016
a <a>content-based minimum size</a> causes the box’s size in that axis to become indefinite
@@ -3774,6 +3777,10 @@ Changes since the <a href="https://www.w3.org/TR/2018/CR-css-flexbox-1-20181119/
37743777
is a type of [=intrinsic size contribution=],
37753778
and thus impacted by associated rules in [[css-sizing-3]].
37763779
(<a href="https://github.com/w3c/csswg-drafts/issues/5665#issuecomment-738391191">Issue 5665</a>)
3780+
3781+
<li id="change-2018-content-based-editorial">
3782+
Redrafted the definition of [=content-based minimum size=]
3783+
for easier reading. (Editorial)
37773784
</ul>
37783785

37793786
<h3 id="changes-20171016">

0 commit comments

Comments
 (0)