- From: Pelle Wessman via GitHub <sysbot+gh@w3.org>
- Date: Thu, 07 Jul 2022 14:19:37 +0000
- To: public-css-archive@w3.org
voxpelli has just created a new issue for https://github.com/w3c/csswg-drafts: == [selectors-4] additional resource state pseudo-classes for img / picture elements == The [Resource State Pseudo-classes](https://drafts.csswg.org/selectors/#resource-pseudos) section mentions (emphasis mine): > The pseudo-classes in this section apply to elements that represent loaded resources, particularly **images**/videos Yet none of the currently defined pseudo classes seems to actually apply to any images. [Following up](https://twitter.com/voxpelli/status/1545047038466830342) on [a recent popular tweet](https://twitter.com/jh3yy/status/1543700258018000896) that used `onerror` on `img`-tags to style failed images, I would like to mimic https://github.com/w3c/csswg-drafts/issues/3821 and resurrect a few of the pseudo-classes suggested in https://github.com/w3c/csswg-drafts/issues/3134 Primarily I would like to see: * `:failed` – a replacement for the use of `onerror` to style images that fail to load * `:loading` – a way to style images that are in the process of loading (would include both downloading and decoding I think) Could also be useful to support the existing: * `:stalled`– as images on bad internet connections can very much stall to load as well, especially a progressive JPEG which could me stuck in a low quality state. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7467 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 7 July 2022 14:19:39 UTC