-
Notifications
You must be signed in to change notification settings - Fork 689
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
preloading a CSS image #2994
Comments
Maybe a |
Yeah, that's probably the most reasonable way to target this. |
Thanks for your opinions. I love the idea. Maybe speical cases like url(attr(...)) needs to be treated specially. |
Could there be made a distinction between preload (high priority, before regular requests), load (with regular requests) and prefetch (low priority, after regular requests)? |
Thanks for the reply. @inoas To further break down image loading priorities, images with For example,
Here it's reasonable to prioritise the load for the spinning-circle loading indicator as opposed to the large one that's used in |
We have the Priority Hints API for hinting of priorities. But there's no CSS equivalent to the priority hints' |
Good job! Thank you very much for the information. So, things can be simplified if we can delegate priority part to Priority Hints. All remaining work that needs to do is to define a url-modifier for preloading. |
For now, we seem to have to do something hacky if we want to preload a image for use as a CSS image later. Despite hacky workarounds requiring script or document code invovled, there are some pure CSS wordarounds(like the following example):
It seems preloading a CSS image is "prefectly" resolved via pure CSS, however, these pure CSS methods look very counter-intuitive, lengthy and maintenance-invovling, and even further, they aren't just theoretically garanteed to be correct(though they work in most of broswers in the real world).
I'd really like to see a native CSS feature that explictly designates preloading of images.
Any ideas on this issue? I'm looking forward to hearing from you.
The text was updated successfully, but these errors were encountered: