[csswg-drafts] [css-sizing] Does indefinite `stretch` behave as automatic size or as initial value? (#11006)

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

== [css-sizing] Does indefinite `stretch` behave as automatic size or as initial value? ==
First, consider

```html
<!DOCTYPE html>
<div style="min-height: max-content; height: 0; width: 200px; border: solid">lorem ipsum</div>
```

| Spec, Blink | Gecko, WebKit | 
| - | - |
| ![](https://github.com/user-attachments/assets/257a35dd-2f2e-40bb-8d70-da86787e8153) | ![](https://github.com/user-attachments/assets/45702af0-3ab7-40e2-ad36-90a060e82fe4) |

@bfgeek told me that  Blink had to deal with some breakage when they adopted this behavior, but that it's the correct thing to do. But what about `stretch`?

```html
<!DOCTYPE html>
<div style="min-height: -moz-available; min-height: -webkit-fill-available; min-height: stretch; 
            height: 0; width: 200px; border: solid">lorem ipsum</div>
```

| Spec | Gecko, Blink | WebKit |
| - | - | - |
| ![](https://github.com/user-attachments/assets/257a35dd-2f2e-40bb-8d70-da86787e8153) | ![](https://github.com/user-attachments/assets/45702af0-3ab7-40e2-ad36-90a060e82fe4) | ![](https://github.com/user-attachments/assets/2e946436-f436-4dae-94a4-524812784516) |

(WebKit seems to stretch elements with an indefinite height that contain some `-webkit-fill-available`, so it's always definite)

From https://drafts.csswg.org/css-sizing-4/#stretch-fit-sizing

> Formally, its behavior is the same as specifying an [automatic size](https://drafts.csswg.org/css-sizing-3/#automatic-size) together with a [self-alignment property](https://drafts.csswg.org/css-align-3/#self-alignment-properties) value of [stretch](https://drafts.csswg.org/css-sizing-4/#valdef-width-stretch)

But here Blink is not implementing this, not sure if due to an oversight.

And then the situation is that browsers are implementing `stretch`, but nobody follows the spec here. It may be too late for `*-content`, but I would like to have an agreement for `stretch` before it ships. So Agenda+.

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


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

Received on Saturday, 5 October 2024 07:08:29 UTC