Re: srcN - Alternative to picture and srcset

That assumes JS is available, which may not be true. The solution should ideally work without JS, since src-n will work without JS.

What about just letting usemap take a list of IDs in the same order as src-n?

<img usemap=“#map1, #map” src-1=“(max-width: 400px) img1.png” src-2=“(max-width: 1000px) img2.png” alt=“whatever” />



On Nov 3, 2013, at 2:28 PM, Yoav Weiss <yoav@yoav.ws> wrote:

> For everything other than art direction, you can set the area in percentages, so it should work.
> 
> For art direction, we could say that usemap always applies to the current source, and for the rare case of an art directed image map, use JS to adapt the map to the source.
> 
> On Nov 3, 2013 8:19 PM, "Attiks" <attiks@gmail.com> wrote:
> It isn't only a problem in the art direction case, in the other cases the dimensions are changing as well, so the map has to be resized accordingly. You're right that it isn't a problem for the "retina" (DPR) use cases.
> 
> 
> On Sun, Nov 3, 2013 at 8:03 PM, Aaron Gustafson <aaron@easy-designs.net> wrote:
> On Sun, Nov 3, 2013 at 1:48 PM, Podjarny, Guy <gpodjarn@akamai.com> wrote:
> I didn't think this through fully yet, but isn't this only a problem if we change the contents of the picture (e.g. Art direction) as opposed to reducing quality or pixel density?
> 
> 
> Correct. It’s only an issue if you have multiple layouts.
> 
>  
> If so, we could just declare that srcN doesn't support multiple usemap options, meaning you can only (successfully) use it if you're limiting your use of srcN to viewport and DPR switching.
> Makes sense?
> 
> 
> Completely. I would be in favor of this restriction as the alternative makes me cringe.
> 
> Cheers,
> 
> Aaron
> 
> ----
> Aaron Gustafson
> Founder & Technical Lead
> Easy Designs, LLC
> @aarongustafson
> 

Received on Sunday, 3 November 2013 19:55:21 UTC