- From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
- Date: Tue, 15 Oct 2024 18:38:08 +0000
- To: public-css-archive@w3.org
I don't like this much, why should e.g. `max-width: fit-content` be like `max-content` instead of fitting into the container?
If we are not going to treat it as a cyclic percentage, I would rather say that `fit-content`:
- Should behave as `min-content` for the purpose of computing the min-content contribution
- Should behave as `max-content` for the purpose of computing the max-content contribution
So `max-width: fit-content; width: 100000px` should just behave like `width: fit-content`.
| Servo witch my patch | Gecko, Blink | WebKit |
| - | - | - |
|  |  |  |
<details><summary>Source code</summary>
```html
<!DOCTYPE html>
<div style="width: 2ch; border: 1ch solid magenta; font-family: monospace">
<div style="display: inline-block; border: solid 1ch;">
<div style="display: inline-block; width: 100000ch; max-width: fit-content;">
abc def ehg
</div>
</div>
</div>
<br>
<div style="width: 9ch; border: 1ch solid magenta; font-family: monospace">
<div style="display: inline-block; border: solid 1ch;">
<div style="display: inline-block; width: 100000ch; max-width: fit-content;">
abc def ehg
</div>
</div>
</div>
<br>
<div style="width: 16ch; border: 1ch solid magenta; font-family: monospace">
<div style="display: inline-block; border: solid 1ch;">
<div style="display: inline-block; width: 100000ch; max-width: fit-content;">
abc def ehg
</div>
</div>
</div>
```
</details>
Gecko and Blink forcing overflow when `min-content` wouldn't require it seems against the nature of `fit-content`.
--
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10721#issuecomment-2414743959 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 15 October 2024 18:38:09 UTC