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

On Wed, Jan 19, 2011 at 9:13 AM, Alan Gresley <alan@css-class.com> 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:
>>> 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.
>
> 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.

As Brad points out, no, this is not a general solution to that sort of
problem.  If the top image has any transparency it doesn't work.  I
don't believe we should be promoting hacks like this.


> 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.

I believe my wording is correct English, and should mean the same thing.

~TJ

Received on Wednesday, 19 January 2011 17:35:00 UTC