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

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

From: James Robinson <jamesr@google.com>
Date: Tue, 18 Jan 2011 14:27:42 -0800
Message-ID: <AANLkTin_C8GVMM7wvhNwp8kLc-pxY3N_1oevRN9z6UZM@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
On Tue, Jan 18, 2011 at 1:37 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> The CSS3 Images spec
> <http://dev.w3.org/csswg/css3-images/#image-notation> defines the
> image() function, which allows authors to specify multiple images,
> representing the first one that doesn't give an error (that is, if the
> first one 404s or similar, the browser will instead fetch the second
> one in the list, etc.).
> 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.

I think if a UA really doesn't want to load a given image using whatever
rule it feels inclined to, then it can go ahead to the next image in the
list.  I don't think the extension language is necessary in the spec to
allow a UA to skip .svg (for example) if it really wanted to.  I also agree
that skipping URLs based on extension is probably not a great idea, but that
seems like more of a quality of implementation issue.

- James
Received on Tuesday, 18 January 2011 22:28:14 UTC

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