- From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
- Date: Wed, 17 Apr 2024 17:58:32 +0000
- To: public-css-archive@w3.org
Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-sizing] Nobody floors min-content percentages in replaced elements by the transferred minimum size ==
https://drafts.csswg.org/css-sizing-3/#replaced-percentage-min-contribution
> If the box is [replaced](https://drafts.csswg.org/css-display-4/#replaced-element), a [cyclic percentage](https://drafts.csswg.org/css-sizing-3/#cyclic-percentage-size) in the value of any [max size property](https://drafts.csswg.org/css-sizing-3/#max-size-properties) or [preferred size property](https://drafts.csswg.org/css-sizing-3/#preferred-size-properties) ([width](https://drafts.csswg.org/css-sizing-3/#propdef-width)/[max-width](https://drafts.csswg.org/css-sizing-3/#propdef-max-width)/[height](https://drafts.csswg.org/css-sizing-3/#propdef-height)/[max-height](https://drafts.csswg.org/css-sizing-3/#propdef-max-height)), is resolved against zero when calculating the [min-content contribution](https://drafts.csswg.org/css-sizing-3/#min-content-contribution) in the corresponding axis. (See [§ 5.2.2 Compressible Replaced Elements](https://drafts.csswg.org/css-sizing-3/#min-content-zero) for a list of which elements in HTML this applies to.) If the box also has a [preferred aspect ratio](https://drafts.csswg.org/css-sizing-3/#preferred-aspect-ratio), **then this min-content contribution is floored by any [<length-percentage>](https://drafts.csswg.org/css-values-4/#typedef-length-percentage) [minimum size](https://drafts.csswg.org/css-sizing-3/#min-width) from the opposite axis—resolving any such percentage against zero—transferred through the preferred aspect ratio**.
I'm trying to implement this paragraph in Servo, but none of Gecko, Blink and WebKit seems to implement the last part.
```html
<!DOCTYPE html>
<div style="width: 0; border: 10px solid">
<div style="display: inline-block; border: 10px solid cyan">
<canvas width="200" height="200" style="width: 200%; min-height: 200px; border: 10px solid orange"></canvas>
</div>
</div>
```

Note the canvas has an aspect ratio of 1, but the `min-height: 200px` is not transferred to the inline axis: its inner min-content contribution is still zero.
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10225 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 17 April 2024 17:58:33 UTC