W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

Re: [whatwg] So if media-queries aren't for determining the media to be used what are they for?

From: Matthew Wilcox <mail@matthewwilcox.com>
Date: Wed, 16 May 2012 21:11:41 +0100
Message-ID: <CAMCRKi++Fpg-5S3k-syO0Fg2CpAgzUQszwGmAut6App-6q4xSg@mail.gmail.com>
To: Kornel Lesiński <kornel@geekhood.net>
Cc: whatwg@lists.whatwg.org
> The solution I've seen proposed[1] only aliases media query content, and
> works only on a per-page basis, so it doesn't allow automatic addition of a
> new image size site-wide, since you have to insert new <source> into every
> <picture> anyway.

That is not true. With that particular solution you would never alter
any mark-up inside the <body>, you would only ever need to alter the
<meta> variables in the <head> - which more often than not are in a
single server-side template for a website. That solution makes it
trivial to adjust, add, or subtract the breakpoints of a design, and
therefor images, site-wide under normal website conditions (i.e.,
you're using a CMS to output the website).

> To me it looks like about the same amount of work as inserting new pixel
> size into every srcset.

Completely not the case.

> What solution do you have in mind that would let you add a 'tv' breakpoint
> site-wide for all images that have been prepared for it, without need to
> update code that embeds those images? And is that really saving much effort?
> Wouldn't you have to revisit every page anyway to test the new layout?

That following link does it:

> [1]http://www.w3.org/community/respimg/2012/05/13/an-alternative-proposition-to-and-srcset-with-wider-scope/
>
> --
> regards, Kornel Lesiński
Received on Wednesday, 16 May 2012 20:12:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT