Re: [csswg-drafts] [selectors-4] additional resource state pseudo-classes for img / picture elements (#7467)

I wrote about [a use case where I need to detect when an image has successfully loaded to hide a fallback avatar with initials](https://th3s4mur41.me/blog/css-complete-pseudo-class/).

While I explicitly referenced `:complete` (post was based on https://github.com/w3c/csswg-drafts/issues/3134), the same result could be achieved with `img:not(:failed, :loading)`, as previously suggested. 

That makes `:complete` potentially redundant if `:loading` and `:failed` are well-defined.

Thanks for pushing this forward. These selectors are incredibly useful for clean, declarative UI logic.

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


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

Received on Thursday, 11 September 2025 16:14:31 UTC