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

Stretchy images shouldn't require media queries

From: Eric Portis <lists@ericportis.com>
Date: Fri, 2 Nov 2012 11:10:55 -0600
Message-ID: <CAKOuMHqMLhCCAhNygVrrbb3nOGUYSM-g0VQ2t9pi=9b2ErW_uA@mail.gmail.com>
To: public-respimg@w3.org
Hello all,

I just sent a big email to the WHATWG list, using a srcset example to
illustrate the pitfalls of tying a responsive-images markup solution to
viewport-size queries. Requiring authors to bake information about their
layouts into their markup results in markup that is potentially complex and
certianly fragile.


All of my concerns also apply to <picture>. Replace my "this is complex and
fragile" srcset example with this:


<source media="(min-width: 56em)" srcset="400.jpg 1x, 800.jpg 2x">
<source media="(min width: 32em)" srcset="200.jpg 1x, 400.jpg 2x">
<source media="(min-width: 28em)" src="800.jpg">
<source srcset="400.jpg 1x, 800.jpg 2x">
 <img src="200.jpg">


....and the "just let authors describe the resources" example with this:


<source src="800.jpg" width="800" height="533">
<source src="400.jpg" width="400" height="266">
<source src="200.jpg" width="200" height="133">

<img src="200.jpg">


....and it's an email about the <picture> spec. Thoughts?

Received on Saturday, 3 November 2012 21:33:47 UTC

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