Re: [csswg-drafts] [selectors] Pseudo-classes for image state (#3134)

Thinking about 2 cases for image error handling.
* bad URL or network/server error. Image is not available.
* URL is fine but content is not a supported image.

For the 1st case there is no need for `:broken` as `:invalid` css selector already there.
https://developer.mozilla.org/en-US/docs/Web/CSS/:invalid

Reusing the same name for semantically identical cases would make the framework authors life easier :)

For 2nd case `:broken` selector would be appropriate. 
The fallback would lead to alternative presentation like embedded into CSS SVG or alternative host URL.

the `:invaid` will NOT be trigerred when URL is valid and has some content. But `:broken` would be trigerred in any case.

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


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

Received on Sunday, 29 June 2025 20:44:29 UTC