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

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

From: Alan Gresley <alan@css-class.com>
Date: Thu, 20 Jan 2011 04:13:36 +1100
Message-ID: <4D371BC0.40006@css-class.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: www-style list <www-style@w3.org>
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.


Regarding <http://dev.w3.org/csswg/css3-images/#image-notation>:

   # The ‘image()’ notation allows an author to specify multiple images,
   # each one a fallback for the previous.


You may want to reword the later part as:

   | The ‘image()’ notation allows an author to specify multiple images,
   | each one as a fallback for the previous.


-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
Received on Wednesday, 19 January 2011 17:14:10 GMT

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