Re: [csswg-drafts] [css-grid-2] Inconsistent min/max-content contribution for images that failed to load (#11806)

Not related to grid at all. In fact this seems rather under the scope of https://html.spec.whatwg.org/multipage/rendering.html#images-3 rather than CSS.

```html
<!DOCTYPE html>
<img src="about:invalid" style="min-width: 150px; width: 300px; border: solid">
```

| Gecko | Blink | WebKit |
| - | - | - |
| ![](https://github.com/user-attachments/assets/8f6ae69e-d267-42e0-a6cc-65e0ca7c667f) | ![](https://github.com/user-attachments/assets/ac97029f-050c-45e8-8a17-41c1c7dc940e) | ![](https://github.com/user-attachments/assets/41624b35-3e50-4b59-a63f-df1f233f9bcf) |

Since the element has no `alt` attribute, HTML says to treat it as replaced.

Therefore, Blink is wrong to ignore `width` just because it has `display: inline`. It doesn't ignore `min-width`, so it's quite weird.

Gecko and WebKit apply a natural aspect ratio of 1. HTML should probably clarify whether "treat the element as a [replaced element](https://drafts.csswg.org/css-display/#replaced-element)" uses any natural sizes or ratio.

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


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

Received on Monday, 3 March 2025 13:25:23 UTC