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

> Firefox only says width of 10 because they do not obey the definite stretched height. Moving the height to the item shows that they also give 100x100

We chatted with @dholbert and he suspects this is a bug, where the explicit height is precomputed a little too aggressively. Oddly enough, WebKit seems to exhibit the same behavior.

So where we're at in terms of interop for replaced elements is:
    * Chrome always uses the transferred size (if it exists), in preference to the natural size, regardless of which is larger.
    * Firefox does the same thing when the opposite-axis size is explicitly specified (which it considers a bug), but uses the smaller of the transferred size and the natural size when the opposite-axis size is computed as auto+stretch.

Our preferred outcome is still to clarify the spec as described in https://github.com/w3c/csswg-drafts/issues/6794#issuecomment-1218602408, if it's possible to do given Web-compat. This would use the smaller of the transferred size and the intrinsic size when both exist.

The reason is that the automatic minimum size is intended as a safety mechanism, not as a way of expressing preferred sizes.
* for non-replaced elements, the goal was to avoid overflow (thus using min-intrinsic only)
* for replaced elements, the goal was to avoid collapsing down to nothing and disappearing
* in all cases we wanted an explicit size from the author to win, thus allowing the specified size or (on replaced elements) the transferred size to cut down this minimum

If the author wants an item to stay at its preferred size, they should not be allowing it to shrink.

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


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

Received on Thursday, 18 August 2022 21:05:34 UTC