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

Matthew Wilcox mail at matthewwilcox.com
Wed May 16 13:11:41 PDT 2012

> 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

More information about the whatwg mailing list