Re: [whatwg] <imgset> responsive imgs proposition (Re: The src-N proposal)

On Tue, Nov 12, 2013 at 6:54 PM, Adam Barth <w3c@adambarth.com> wrote:

> On Tue, Nov 12, 2013 at 10:45 AM, John Mellor <johnme@google.com> wrote:
> > - Doesn't address viewport-switching (variable-sized images), though we
> may
> > be able to fix that by extending image-set to support src-N's
> > <viewport-urls> syntax.
>
> Why doesn't it support variable-sized images?  In example above, one
> of the cases is 30x30 and the other is 60x60.  Maybe I've
> misunderstood what you mean by variable-sized images?


In most responsive designs, there are images whose resolution depends on
both the viewport width and the devicePixelRatio. Your approach technically
allows handling both, by combining max-width and max-resolution MQs, but if
you have 6 widths and 4 dprs, you have to write 24 separate MQs, for every
combination. This is the same problem srcset's "w" unit had; see
xanthir.com/b4Su0 for a clear explanation, and compare the extreme
verbosity (and incomprehensibility) of the srcset example there, with the
much simpler equivalent src-1.

Received on Tuesday, 12 November 2013 19:05:44 UTC