W3C home > Mailing lists > Public > www-style@w3.org > October 2009

[css3-background] Transparent background-image and fallbacks

From: Erik Dahlstrom <ed@opera.com>
Date: Wed, 14 Oct 2009 13:00:50 +0200
To: www-style@w3.org
Message-ID: <op.u1sd7ogwgeuyw5@localhost>
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?

Cheers
/Erik

[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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:21 GMT