You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that while a content-based minimum size is often appropriate,
958
+
and helps prevent content from overlapping or spilling outside its container,
959
+
in some cases it is not:
960
+
961
+
<p>
962
+
In particular, if flex sizing is being used for a major content area of a document,
963
+
it is better to set an explicit font-relative minimum width such as <aclass=cssdata-link-type=propdeschref=http://www.w3.org/TR/CSS21/visudet.html#propdef-min-widthtitle=min-width>min-width: 12em</a>.
964
+
A content-based minimum width could result in a large table or large image
965
+
stretching the size of the entire content area into an overflow zone,
966
+
and thereby making lines of text gratuitously long and hard to read.
967
+
968
+
<p>
969
+
Note also, when content-based sizing is used on an item with large amounts of content,
970
+
the layout engine must traverse all of this content before finding its minimum size,
971
+
whereas if the author sets an explicit minimum, this is not necessary.
972
+
(For items with small amounts of content, however,
973
+
this traversal is trivial and therefore not a performance concern.)
their sizes will be proportional to the specified flex factor.
1476
1497
</dl>
1477
1498
1478
-
<divclass=note>
1479
-
Note that, because flex items typically can shrink,
1480
-
it is often recommended that a minimum main size be set
1481
-
(with <aclass=propertydata-link-type=propdeschref=http://www.w3.org/TR/CSS21/visudet.html#propdef-min-widthtitle=min-width>min-width</a> or <aclass=propertydata-link-type=propdeschref=http://www.w3.org/TR/CSS21/visudet.html#propdef-min-heighttitle=min-height>min-height</a>)
1482
-
to prevent them from shrinking too small to fit their contents.
1483
-
This problem is especially common with horizontal navigation or toolbars.
By default, flex items won’t shrink below their minimum content size
1501
+
(the length of the longest word or fixed-size element).
1502
+
To change this, set the <aclass=propertydata-link-type=propdeschref=http://www.w3.org/TR/CSS21/visudet.html#propdef-min-widthtitle=min-width>min-width</a> or <aclass=propertydata-link-type=propdeschref=http://www.w3.org/TR/CSS21/visudet.html#propdef-min-heighttitle=min-height>min-height</a> property.
1503
+
(See <ahref=#min-size-auto>Implied Minimum Size of Flex Items</a>.)
this keyword computes to <spanclass=cssdata-link-type=maybetitle=0>0</span>
3431
3449
(unless otherwise defined by a future specification).
3432
3450
</dl>
3433
-
<ahref=#issue-7f3b7c8c> ↵ </a></div>
3451
+
3452
+
<divclass=note>
3453
+
<p>
3454
+
Note that while a content-based minimum size is often appropriate,
3455
+
and helps prevent content from overlapping or spilling outside its container,
3456
+
in some cases it is not:
3457
+
3458
+
<p>
3459
+
In particular, if flex sizing is being used for a major content area of a document,
3460
+
it is better to set an explicit font-relative minimum width such as <aclass=cssdata-link-type=propdeschref=http://www.w3.org/TR/CSS21/visudet.html#propdef-min-widthtitle=min-width>min-width: 12em</a>.
3461
+
A content-based minimum width could result in a large table or large image
3462
+
stretching the size of the entire content area into an overflow zone,
3463
+
and thereby making lines of text gratuitously long and hard to read.
3464
+
3465
+
<p>
3466
+
Note also, when content-based sizing is used on an item with large amounts of content,
3467
+
the layout engine must traverse all of this content before finding its minimum size,
3468
+
whereas if the author sets an explicit minimum, this is not necessary.
3469
+
(For items with small amounts of content, however,
3470
+
this traversal is trivial and therefore not a performance concern.)
0 commit comments