[whatwg] Simplified <picture> element draft
yoav at yoav.ws
Mon Nov 25 00:00:10 PST 2013
This is a part of the proposal that got people excited. The linked document
defines picture's source selection algorithm.
It contains some parts that I'm not sure have a consensus around them yet:
* It defines <picture> as controlling <img>, where earlier on this list we
discussed mostly the opposite (<img> querying its parent <picture>, if one
* It defines <img> as a part of <picture>'s shadow DOM, which we need to
see how it fits with having fallback <img> elements (which are necessary in
the near future).
This proposal does contain srcset as a subcomponent, but it's not the same
srcset as defined in the HTML spec, but a modified version based on
improvements from the src-N spec. (that cover the variable-width images
The proposal will also require some changes to <img> and specifically, when
not created by JS, <img> will have to avoid loading of resources until the
element is added to the DOM, and can see if its direct parent is <picture>.
If the parent is <picture>, <img> would then query the parent (or wait to
be "controlled" by its parent), otherwise, it'll load its resources as
On Mon, Nov 25, 2013 at 8:33 AM, Adam Barth <w3c at adambarth.com> wrote:
> I'm trying to sort out from the many messages on this topic which
> proposal I should read in detail. Is the one linked below the one
> that people are most excited about? I'm I correct in understand that
> this proposal contains srcset as a subcomponent?
> On Sat, Nov 23, 2013 at 3:04 PM, Kornel Lesiński <kornel at geekhood.net>
> > I've written down proposal for the simplified source selection algorithm:
> > http://geekhood.net/picture-element.html
> > This also includes variant of the idea from the recent "<picture> redux"
> > proposal to use an actual <img> element as the basis for the <picture>
> > element definition.
> > This draft doesn't include all features of src-N *yet*, but I expect
> this to
> > be added either via extended srcset syntax to something like <source
> > once there's consensus how to approach this.
> > To simplify implementation even further I've allowed UAs to flatten
> > DOM to a plaintext string (in case they need to emulate <img alt> for
> > existing screen readers or accessibility APIs).
> > I've dropped usemap. It could be added, but I'm not sure if there is need
> > for it.
> > I've specified very few IDL attributes. This area may need to be
> > --
> > regards, Kornel
More information about the whatwg