Re: [csswg-drafts] [css2] min/max-height and margin collapse is not interoperable (#8919)

For collapsing through, when the spec requires a computed value of zero, what kinds of zero are included, exactly? Just `0px`? What about `0%` or `calc(0px + 0%)`?

| Value                             | Gecko | Blink | WebKit <br> (`height`) | WebKit <br> (`min-height`) |
| --------------------------------- | ----- |------ | ---------------------- | -------------------------- |
| `0px`                             | ✅     | ✅     | ✅                      | ✅                          |
| `1px`                             | ❌     | ❌     | ❌                      | ❌                          |
| `0%` against `auto`               | ✅     | ✅     | ✅                      | ✅                          |
| `0%` against `0px`                | ✅     | ✅     | ✅                      | ✅                          |
| `0%` against `100px`              | ✅     | ✅     | ✅                      | ✅                          |
| `1%` against `auto`               | ❌     | ✅     | ✅                      | ❌                          |
| `1%` against `0px`                | ❌     | ✅     | ❌                      | ❌                          |
| `1%` against `100px`              | ❌     | ❌     | ❌                      | ❌                          |
| `calc(0px + 0%)` against `auto`   | ✅     | ✅     | ✅                      | ❌                          |
| `calc(0px + 0%)` against `0px`    | ✅     | ✅     | ❌                      | ❌                          |
| `calc(0px + 0%)` against `100px`  | ✅     | ✅     | ❌                      | ❌                          |
| `calc(0px + 1%)` against `auto`   | ❌     | ✅     | ✅                      | ❌                          |
| `calc(0px + 1%)` against `0px`    | ❌     | ✅     | ❌                      | ❌                          |
| `calc(0px + 1%)` against `100px`  | ❌     | ❌     | ❌                      | ❌                          |
| `calc(1px + 0%)` against `auto`   | ❌     | ✅     | ✅                      | ❌                          |
| `calc(1px + 0%)` against `0px`    | ❌     | ❌     | ❌                      | ❌                          |
| `calc(1px + 0%)` against `100px`  | ❌     | ❌     | ❌                      | ❌                          |
| `calc(1px + 1%)` against `auto`   | ❌     | ✅     | ✅                      | ❌                          |
| `calc(1px + 1%)` against `0px`    | ❌     | ❌     | ❌                      | ❌                          |
| `calc(1px + 1%)` against `100px`  | ❌     | ❌     | ❌                      | ❌                          |

I guess this may be affected by https://drafts.csswg.org/css-sizing-3/#behave-auto

> Legacy spec prose defining layout behavior, particularly in [[CSS2]](https://drafts.csswg.org/css-sizing-3/#biblio-css2), might explicitly refer to [`width`](https://drafts.csswg.org/css-sizing-3/#propdef-width)/[`height`](https://drafts.csswg.org/css-sizing-3/#propdef-height) having a computed value of [`auto`](https://drafts.csswg.org/css-sizing-3/#valdef-width-auto) as a condition; some of these cases should be interpreted as meaning [behaves as auto](https://drafts.csswg.org/css-sizing-3/#behave-as-auto)


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


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

Received on Friday, 30 June 2023 20:43:20 UTC