W3C home > Mailing lists > Public > public-respimg@w3.org > May 2012

Re: Is algorithm for selecting based on media query defined?

From: Kornel Lesiński <kornel@geekhood.net>
Date: Thu, 17 May 2012 15:47:37 +0100
To: "Aaron Gustafson" <aaron@easy-designs.net>
Cc: public-respimg@w3.org, "Matthew Wilcox" <mail@matthewwilcox.com>
Message-ID: <op.wegjdnb2te2ec8@aimac.local>
On Thu, 17 May 2012 15:22:04 +0100, Aaron Gustafson  
<aaron@easy-designs.net> wrote:

> Traditionally, the first to match is the one picked. In the video
> element, this is why we put WebM before Ogg: the same browsers support
> both, but WebM is smaller, so we put it first so it is the one that’s
> downloaded.

Is that the case for <picture> as well? It doesn't seem to match examples.

How is interpreted source without media? (media="all"? media="none"?)


<picture alt="Alt tag should accurately describe the image represented by  
all sources, though cropping and zooming may differ.">
  <source src="mobile.jpg" /> <!-- Matches by default. -->
  <source src="high-res.jpg" media="min-width: 800px" /> <!-- Overrides the  
previous source over 800px before any assets are fetched, resulting in a  
single request. -->
  <img src="mobile.jpg" /> <!-- Fallback content, in the event the  
<picture> tag is completely unsupported by the user’s browser. -->

In that case I'd expect <source src="mobile.jpg"> to always match and  
<source src="high-res.jpg"> be impossible to use.

regards, Kornel Lesiński
Received on Thursday, 17 May 2012 14:48:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:06:07 UTC