Re: [csswg-drafts] [css-flexbox] Change content-size suggestion to min-intrinsic instead of min-content? (#6794)

Okay, after review and thought here, we think the correct action is to make Flex/Grid's auto-min-size use the "min intrinsic" size (rather than "min-content" size) for the content size suggestion. The difference between the two is that min intrinsic doesn't pay attention to the aspect ratio (natural or from the property). We believe this was the original intention of the spec - after all, the transferred size suggestion *already* invokes the aspect-ratio, so why should we invoke it *again* in the content size suggestion?

This would result in the example in the OP making the div 100px wide - it lacks a specified size, it's not replaced, so we just use its content size suggestion, which'll now be 100px. This matches the behavior for 'display: block'.

This gives us the same result as [Ian's suggestion](https://github.com/w3c/csswg-drafts/issues/6794#issuecomment-1028193403) (of paying attention to "min-width: auto" when calculating min-content sizes) without the fallout of this making auto min sizes matter in *more* places, perhaps unintentionally. Since 'min-width' and 'max-width' can also take 'min-content' as a value, this keeps its resolution consistent across all these sizing properties.

--------

some notes from our discussion:

Goal (of Automatic Minimum Size):
    Non-obtrusive minimum size to prevent overflow and bad things.

Currently specced as:
 * if specified exists, smaller of that and content suggestion
 * if transferred exists and is replaced, smaller of that and content suggestion
 * otherwise, just use the content size suggestion

Proposal:
    Define content size suggestion using min-intrinsic size (ignoring `aspect-ratio`), rather than min-content size (honoring `aspect-ratio`), since the transferred size suggestion is already doing the job of handling aspect ratio. (This was probably the original intention of the spec.)

Principles:
 * If the non-replaced box is empty, behaves like a replaced element.
 * If it is non-empty, 'min-size: auto' prevents overflow.
 * If replaced, its natural size is less important than what it is explicitly sized to (by any author-specified size constraint).
 * Subject to above constraints, we try to maintain the aspect ratio.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6794#issuecomment-1063323692 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 9 March 2022 20:13:48 UTC