RE: [css3-images] image() function and file formats

> From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf
> Of Alan Gresley

>  From a spec point of view that maybe correct but from an authors point of
> view, this is a way to serve a SVG background-image to a browser that
> supports SVG in background-image and allow the other browsers to just show
> the PNG (IE9 does not support SVG in background-image). That is why the
> SVG is on top.

First, that's not correct: IE9 has supported SVG background-image for quite
a number of public builds. The CSS Space Invader demo [1] uses multiple SVG 
backgrounds, for instance. In recent builds you can even reference a viewBox 
ID using a URL fragment and thus select multiple backgrounds from the same 
document.

Second, for earlier versions of IE that do not support SVG backgrounds,
they also do not support multiple backgrounds so this declaration does
not buy you any kind of fallback.

Third, this usage pattern results in all browsers that support multiple
backgrounds to download and process both images which is sub-optimal. 

Conclusion: avoid.

[1] http://ie.microsoft.com/testdrive/Graphics/SpaceInvader/Default.html

Received on Wednesday, 19 January 2011 17:42:11 UTC