-
Notifications
You must be signed in to change notification settings - Fork 715
[selectors-4] additional resource state pseudo-classes for img / picture elements #7467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Makes sense to me. I wonder if :buffering and :loading should be interchangeable? Also :failed should probably be :loading-failed, since lots of things can fail in a lot of different ways. :) Agenda+ to ask the CSSWG what it wants to do here. |
The CSS Working Group just discussed The full IRC log of that discussion<TabAtkins> Topic: Additional resource-state pseudo-classes for img/picture<TabAtkins> fantasai: someone asked about pseudos for images to indicate whtehr they're loading, failed, stalled <TabAtkins> fantasai: So does the WG think this is reasonable? <dbaron> I think Gecko has internal pseudo-classes that do this <TabAtkins> fantasai: do we make loading & buffering both amtch when a video is trying to buffer and when an image is loading? <TabAtkins> TabAtkins: Like allow both to apply to either condition? <TabAtkins> fantasai: Yeah they're both loading, tho i'm not sure if the words are appropraite <TabAtkins> TabAtkins: I'm happy to defer that to editors <bradk> applies to any element that can take time loading, eg iframes? <TabAtkins> Rossen_: Sounds like there's general approval, should we reoslve on "yes, details TBD"? <bradk> +1 <bramus> +1 <chrishtr> +1 <TabAtkins> fantasai: We can propose edits and come back. |
If it is any help for whoever creates the proposal, Firefox has the
|
I’d like to suggest that HTTP status codes, particularly those commonly encountered in response to GET requests, be associated with some of the pseudo-classes proposed herein and in #3134. They may also inform the selection of some other states that may have frontend presentation, e.g.:
|
Something that might be worth discussing is whether it should copy
which sounds more like Concerning ad blockers, is a |
I guess there is also value in something like |
The Resource State Pseudo-classes section mentions (emphasis mine):
Yet none of the currently defined pseudo classes seems to actually apply to any images.
Following up on a recent popular tweet that used
onerror
onimg
-tags to style failed images, I would like to mimic #3821 and resurrect a few of the pseudo-classes suggested in #3134Primarily I would like to see:
:failed
– a replacement for the use ofonerror
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.The text was updated successfully, but these errors were encountered: