Re: Fallback reuse (was: Re: Is algorithm for selecting based on media query defined?)

Oh now I understand, I'm sorry.
Hmm. Yeah, good point. 

That said, if you want to polyfill this for any existing browser, you'll need the duplicate source because the img request will be prefetched unless its wrapped in noscript or whatever. Not that existing browsers should drive the behavior, but I'm not sure we'll be able to get away with omitting that duplicate in real use for a while is all.


On May 17, 2012, at 10:42 PM, Kornel Lesiński wrote:

> On Thu, 17 May 2012 17:34:10 +0100, Scott Jehl <scott@scottjehl.com> wrote:
> 
>> I may be misunderstanding your point, but I think the fallback img is there to support browsers that do not natively support/understand picture.
>> 
>> It's like <canvas> fallback content, ignored if the picture element itself is supported.
> 
> I think that ignoring fallback <img> is a waste. It increases verbosity and adds unnecessary repetition of the <picture> element.
> 
> <picture>
> <source src=1.png media="foo">
> <source src=2.png>
> <img src=2.png>
> </picture>
> 
> could be shortened to:
> 
> <picture>
> <source src=1.png media="foo">
> <img src=2.png>
> </picture>
> 
> if <img> was interpreted same as <source media="all"> by <picture>-supporting UAs.
> 
> 
> For the same reason I've also suggested dropping <picture alt> in favour of reusing fallback content:
> http://lists.w3.org/Archives/Public/public-whatwg-archive/2012May/0216.html
> 
> -- 
> regards, Kornel Lesiński

Received on Saturday, 19 May 2012 05:41:24 UTC