[css3-background] Transparent background-image and fallbacks

Hello www-style,

I'm interested in using multiple background-images as fallbacks for when a  
particular image format isn't supported, as defined in [1].

For my use-case it's fine as long as I use fully opaque images, but for a  
case where I have a transparent image on top and a different image as  
fallback (with slightly different shape) it doesn't work that well because  
I'd not want that fallback image visible at all if the first one was used.

I was wondering if there was a way of detecting which images were actually  
used, because that would make it easy to fix UA issues by javascript.  
However, I note that the current spec wording doesn't deal with the cases  
where a particular url wasn't supported/used by the UA. Would it be  
possible to remove the url's that were not supported by the UA from the  
computed value of the 'background-image' property? That is essentially  
what happens to the display in such cases, and it would make such cases  
easy to detect.

Are there any other ways of detecting CSS background-image format support,  
or other ways of providing fallbacks for the case outlined above?


[1] http://www.w3.org/TR/css3-background/#the-background-image

Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed

Received on Wednesday, 14 October 2009 11:00:12 UTC