- From: Florian Rivoal <florianr@opera.com>
- Date: Tue, 29 May 2012 12:49:24 +0200
- To: whatwg@lists.whatwg.org
On Mon, 28 May 2012 18:29:45 +0200, Matthew Wilcox <mail@matthewwilcox.com> wrote: > Personally I think it's better than either <picture> or srcset alone. > But I don't think it's good enough even so, it still has problems: > > * It's verbose (but less-so than <picture>). It's just as dense as the original srcset proposal if you don't need media queries: <img src="normal.jpg" srcset="high.jpg 2x"> I my mind, you only pull out the rest if you actually need media queries. > * It has two attributes that could easily be confused as doing the > same job. There's little clear logic as to why they're split, from an > authors viewpoint. It might be confusing, but there is logic in the splitting: srcset="....." lets you describe the properties of a set of equivalent images, and the browser decides which one is more appropriate given the environment. <picture><source media="..." lets you decide which image should be displayed based on the properties of the medium you're displaying on. > * It bakes design properties into the mark-up. They will be the wrong > breakpoints come any re-design. It does, and I am somewhat reluctant because of that. But arguably, <img> already has that problem, even if it is to a lesser degree, and to be purely semantic, the mark-up ought to only contain the alt text, to be replaced (or not, if you're on a voice browser) by the approriate image using the css content property. But <img> is practical enough that you don't want be bothered with that, and I am thinking that media queries enabled images (aka <picture>) would be valuable for the same reason. - Florian
Received on Tuesday, 29 May 2012 10:50:05 UTC