[csswg-drafts] [css-sizing] Automatic minimum size for box with a preferred aspect ratio doesn't make sense (#11717)

Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-sizing] Automatic minimum size for box with a preferred aspect ratio doesn't make sense ==
https://drafts.csswg.org/css-sizing-4/#aspect-ratio-minimum

> In order to avoid unintentional overflow, the [automatic minimum size](https://drafts.csswg.org/css-sizing-3/#automatic-minimum-size) in the [ratio-dependent axis](https://drafts.csswg.org/css-sizing-4/#ratio-dependent-axis) of a box with a [preferred aspect ratio](https://drafts.csswg.org/css-sizing-4/#preferred-aspect-ratio) that is neither a [replaced element](https://drafts.csswg.org/css-display-4/#replaced-element) nor a [scroll container](https://drafts.csswg.org/css-overflow-3/#scroll-container) is its [min-content size](https://drafts.csswg.org/css-sizing-3/#min-content) capped by its [maximum size](https://drafts.csswg.org/css-sizing-3/#max-width).

But the min-content and max-content sizes will just take the size on the ratio-determining axis and transfer it through the ratio.

```html
<!DOCTYPE html>
<div id="target" style="height: 100px; aspect-ratio: 1; border: solid; min-width: 0; width: min-content;">
  <div style="width: 200px"></div>
</div>
<div id="target" style="height: 100px; aspect-ratio: 1; border: solid; min-width: 0; width: max-content;">
  <div style="width: 200px"></div>
</div>
```

Gecko and Blink agree: both the min-content and max-content inline sizes are 100px.

So this being 200px wide can't be explained by the quote above:

```html
<!DOCTYPE html>
<div id="target" style="height: 100px; aspect-ratio: 1; border: solid">
  <div style="width: 200px"></div>
</div>
```


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11717 using your GitHub account


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

Received on Friday, 14 February 2025 21:45:10 UTC