[whatwg] Problems with width/height descriptors in srcset

Jeremy Keith jeremy at adactio.com
Mon May 21 10:09:24 PDT 2012


Simon asked:
>> It also lets us add "max-width", though that may complicate
>> the resource choosing algorithm a bit.
>> 
>> ~TJ
> 
> Does doing so solve any use cases?

Yes, absolutely. I can go through it all again, but basically having both a min-width/height and a max-width/height option gives the developers the choice of either building in a "Mobile First" or Desktop First" way.

i.e.

either:
Use a small image by default in src and list larger and larger images in srcset
or:
Use a large image by default in src and list smaller and smaller images in srcset.

If you want specific examples of responsive sites currently using one or other of these techniques, I'll be able to find them for you.

Jeremy

-- 
Jeremy Keith

a d a c t i o

http://adactio.com/





More information about the whatwg mailing list