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

@tabatkins and I think some of the confusion here comes from missing a small nuance in this paragraph:

> The content-based minimum size 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** and its transferred size suggestion exists; otherwise its content size suggestion.

The flex item in question does not have a specified size suggestion, and is not replaced, and therefore it falls through to the final clause and uses its content size suggestion which is its min-content size in the main axis (100px). Therefore Firefox's behavior here is correct.

@aethanyc mentioned

> However, the current spec implies that the specified size suggestion is the item’s preferred main size, which can be computed via aspect-ratio + definite cross-size. @dholbert pointed to me that the definition was changed after the edit in 0c1a35d, and this seems changing the behavior.

0c1a35d was definitely not meant to change behavior, but I can see how switching the emphasis from the “computed value” would change how automatic sizes are interpreted. We need to clarify that we're only considering non-automatic definite sizes:

```diff
diff --git a/css-flexbox-1/Overview.bs b/css-flexbox-1/Overview.bs
index 2c3418beb..358740409 100644
--- a/css-flexbox-1/Overview.bs
+++ b/css-flexbox-1/Overview.bs
@@ -1001,7 +1001,7 @@ Grid doesn't have similarly meaningful shrinkability, so it doesn't need to care
  <dl>
   <dt><dfn>specified size suggestion</dfn>
   <dd>
-   If the item’s [=preferred size|preferred=] [=main size=] is <a>definite</a>,
+   If the item’s [=preferred size|preferred=] [=main size=] is <a>definite</a> and not [=automatic size|automatic=],
    then the <a>specified size suggestion</a> is that size.
    It is otherwise undefined.
```
Committed in ca4dc9e0a .


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


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

Received on Monday, 31 January 2022 20:33:15 UTC