Just like "srcset" for the html <img> tag, there is a CSS background-image property called "image-set".
W3C Info: https://drafts.csswg.org/css-images-3/#funcdef-image-set
It is currently compatible with Chrome, Safari, Opera, and Android Browser. Not currently compatible with FireFox or IE / Edge browsers. It appears to be in development for Microsoft's Edge browser as well. http://caniuse.com/#feat=css-image-set
Here is an example of the implementation / testing: cloudfour.com/examples/image-set/
It appears to only accept generic (x) resolutions, dpi, for normal vs retina screens.
<image-set-option> = [ <image> | <string> ] <resolution>
background-image: image-set( "foo.png" 1x,
"foo-2x.png" 2x,
"foo-print.png" 600dpi );
I can't find any documentation on this beyond this.
My questions is are:
Does anyone use this?
Can this be used to optimize for page loading speed (ex. different versions based on screen widths for 320px width, 640px width, 1024px width, etc)?
(I know about @media screen and (max-width), don't mention this please.)