W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2013

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

From: John Mellor <johnme@google.com>
Date: Tue, 12 Nov 2013 19:04:59 +0000
Message-ID: <CAG_kaUb2JkPDLU+ZrUntGhuDrBZA0jtBrdXxZO8StBxPuCO=aQ@mail.gmail.com>
To: Adam Barth <w3c@adambarth.com>
Cc: "Jukka K. Korpela" <jkorpela@cs.tut.fi>, Markus Ernst <derernst@gmx.ch>, whatwg <whatwg@lists.whatwg.org>, Markus Lanthaler <markus.lanthaler@gmx.net>, Ryosuke Niwa <rniwa@apple.com>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:14 UTC