[whatwg] Simplified <picture> element draft

Yoav Weiss yoav at yoav.ws
Wed Jan 8 09:47:24 PST 2014

On Wed, Jan 8, 2014 at 6:18 PM, Maciej Stachowiak <mjs at apple.com> wrote:

> On Dec 31, 2013, at 7:17 AM, Yoav Weiss <yoav at yoav.ws> wrote:
> > On Mon, Nov 25, 2013 at 5:33 PM, Adam Barth <w3c at adambarth.com> wrote:
> >
> >> Is there an editor's draft or some other relatively self-contained
> >> write-up that I could review?
> >>
> >>
> > Tab has rewritten the picture spec to match the latest proposal. You
> could
> > review it at http://picture.responsiveimages.org/
> This approach seems cleaner than src-n. I'll try to read it in more
> detail, but a few initial comments:
> - Is there any reason not to allow the sizes="" attribute and the extended
> definition of srcset="" on <img> as well as <source>? It seems like the
> <picture> wrapper is not helpful in cases where you only use one <source>
> element.

No reason. We have an open issue to add that [1]

> - It seems this draft allows arbitrary media queries, with only a subset
> expected to give best performance (by correctly informing the preload
> scanner). In my opinion, this is worse than the alternative of only
> supporting the media queries that could plausibly be integrated with
> preload scanning. Creating a programming interface with a "performance
> cliff" - a point beyond which performance suddenly gets significantly worse
> for what seems like a small incremental change - is generally a bad idea.
> And the use cases for fully general media queries seem much more
> speculative than the ones for the simplified subset.

I'm not opposed to having a white-list of "performance-safe" authorized
media queries, and extending that list in the future if necessary, but we
need to make sure that it's extensible without causing the content to break
in browsers where the new MQs are not supported. As far as I can tell, the
current syntax can support this.

> Regards,
> Maciej
[1] https://github.com/ResponsiveImagesCG/picture-element/issues/90

More information about the whatwg mailing list