Skip to content

Commit

Permalink
[css-flexbox-1] Make non-replaced elements consult the transferred si…
Browse files Browse the repository at this point in the history
…ze for their automatic minimum. #6069 #6794 (#11690)
  • Loading branch information
tabatkins authored Mar 10, 2025
1 parent d9a632a commit 9beaea1
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions css-flexbox-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -963,14 +963,27 @@ Automatic Minimum Size of Flex Items</h3>
for <a>scroll containers</a> the <a>automatic minimum size</a> is zero, as usual.

The <dfn>content-based minimum size</dfn> of a [=flex item=]
is the smaller of its [=specified size suggestion=] and its [=content size suggestion=]
if its [=specified size suggestion=] exists;
otherwise, the smaller of its [=transferred size suggestion=] and its [=content size suggestion=]
if the element is [=replaced element|replaced=]
<!-- https://github.com/w3c/csswg-drafts/issues/6069 -->
and its [=transferred size suggestion=] exists;
otherwise its [=content size suggestion=].
In all cases, the size is clamped by the [=maximum size|maximum=] [=main size=] if it's <a>definite</a>.
differs depending on whether the [=flex item=] is [=replaced element|replaced=] or not:

: For [=replaced elements=]
::
Use the smaller of the [=content size suggestion=]
and the [=transferred size suggestion=]
(if one exists),
capped by the [=specified size suggestion=]
(if one exists).

: For [=non-replaced elements=]
::
Use the larger of the [=content size suggestion=]
and the [=transferred size suggestion=]
(if one exists),
capped by the [=specified size suggestion=]
(if one exists).

In either case,
the size is clamped by the [=maximum size|maximum=] [=main size=]
if it's <a>definite</a>.

<!-- This differs from Grid's definition
(which just consults the first of specified,transferred,content that exists)
Expand Down

0 comments on commit 9beaea1

Please sign in to comment.