-
Notifications
You must be signed in to change notification settings - Fork 719
[CSS-images] Specify fallback behavior when replaced or background image content not available #1984
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
See “invalid image” in https://drafts.csswg.org/css-images-3/#image-values which is the spec prose that's currently active (no one implements |
Yeah, I think "invalid image" should cover the loading case as well. |
For content images, at least, browsers treat loading images (blank space or partial image render) differently from invalid images (broken-image icon). Not sure whether its worthwhile to have a similar distinction for CSS images. It might be worth testing to see what browsers currently do. |
Yeah, letting the UA discriminate between those cases when doing its ultimate fallback seems fine, and will just need some extra prose. But it would be good, I think, to let ( |
OK, we've defined “loading image” as a term somewhat distinct from “invalid image”, see changes at: 846d21d Agenda+ for CSSWG review. |
…mage() aware of it. Properly specify behavior of image() when it contains only a URL, and that URL is invalid/loading. #1984
The CSS Working Group just discussed The full IRC log of that discussion |
jonathanKingston/css-fetch-integration#1 seems relevant when it comes to defining how images are loaded. |
The CSS Working Group just discussed The full IRC log of that discussion |
The CSS Working Group just discussed The full IRC log of that discussion |
The current text looks fine. |
The CSS Working Group just discussed
The full IRC log of that discussion |
Uh oh!
There was an error while loading. Please reload this page.
There appears to be no spec language for what paints to the screen when the replaced content
of an
![]()
or CSS backgroud image is not available at paint time, either due to being in processof being loaded, or due to an async decode.
Image fallbacks appear to be (partially?) specified in the presence of the image() function as part of
css images level 4. https://www.w3.org/TR/css-images-4/#image-fallbacks. This needs to be
extended more generally.
I think the best behavior is to fall back to whatever content painted underneath the paint phase that
would have drawn the image. e.g. if step 1.2. or step 7.1 of the algorithm below had no image content,
still paint but just skip those steps.
https://www.w3.org/TR/CSS2/zindex.html
See also whatwg/html#1920
@vmpstr @tabatkins
The text was updated successfully, but these errors were encountered: