W3C home > Mailing lists > Public > www-style@w3.org > January 2011

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

From: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 19 Jan 2011 09:24:16 -0800
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Message-Id: <307325FB-7784-4DDC-9F8D-AE4F06BFD259@gmail.com>
To: Alan Gresley <alan@css-class.com>

On Jan 19, 2011, at 9:13 AM, Alan Gresley wrote:

> On 20/01/2011 3:33 AM, Tab Atkins Jr. wrote:
>> On Tue, Jan 18, 2011 at 9:25 PM, Alan Gresley<alan@css-class.com>  wrote:
>>> On 19/01/2011 8:37 AM, Tab Atkins Jr. wrote:
>>>> Right now, the image() function has a form of light type-sniffing via
>>>> the file extension, such that if the UA sees an image with an
>>>> extension corresponding to a type of image the UA *knows* it doesn't
>>>> support, it can skip trying to load the image altogether and just jump
>>>> to the next image in the list.
>>> Does this not work.
>>> background: url(example.svg), url(example.png);
>> No, that's specifying multiple background images, which is a
>> completely different feature. It means that you want to download and
>> display both of them, with the example.svg on top.
>> ~TJ
> 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.

Not that useful if there is transparency in the image though, as both images would show in UAs that supported both formats.
Received on Wednesday, 19 January 2011 17:24:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:54 UTC