W3C home > Mailing lists > Public > public-respimg@w3.org > September 2013

Re: srcN - Alternative to picture and srcset

From: Cory Brown <oh.wise.man@gmail.com>
Date: Fri, 27 Sep 2013 08:03:10 -0400
Message-ID: <CAKxo9DqzoAs+PaegD0akEjsFegwt6O+xZ7XmM90cK7BsgYQ1RA@mail.gmail.com>
To: Mark <mark.mcdonnell@bbc.co.uk>
Cc: public-respimg@w3.org
This is really intriguing, and I like it. I have some thoughts about it:

1. The numbering of the attributes is no doubt to ensure there are not
multiple attributes of the same name, but must that be the case? Would it
be possible to have multiple "srcN" attributes which the interface would
expose as an array, not unlike classList. As has been pointed out
adding/removing src# attributes will very quickly get the numbers out of
whack.

2. I am concerned that should the CG move toward this -- it looks promising
as it's both succinct and expressive, easy to read and easy to write --
and it fails in some technical point, there is not a large philosophical
jump to make toward using the expanded srcset attribute, and I find that
solution to be terrible to write and terrible to read, things I think are
important considerations when adding to the specification. The separation
of different cases into different attributes versus a delimited list is
small in terms of implementation, but weighs heavy for readability.


On Fri, Sep 27, 2013 at 7:27 AM, Mark <mark.mcdonnell@bbc.co.uk> wrote:

>  Please consider my short reply a* +1* for this concise combination of
> the source/srcset work.
>
> I'll need to have a read through the provided specification to get a
> better understanding of implementation.
>
> But looking good.
>
> M.
>
>
> On 27/09/2013 12:15, Yoav Weiss wrote:
>
>   Personally, this looks like a huge improvement over existing proposals.
>
>  It combines picture art-direction handling (each srcN attribute is an
> equivalent to picture's <source>), srcset's DPR switching (almost the same)
> and new viewport switching syntax which has 2 main advantages over srcset's
> viewport switching syntax: It is DRYer and enables relative units.
>
>  The attribute name part feels hacky, but it's something I can live with
> both as a developer and as someone likely to implement this.
>
>  +1 from me.
>
>  Yoav
>
>
>
>
> On Fri, Sep 27, 2013 at 12:20 PM, Marcos Caceres <marcos@marcosc.com>wrote:
>
>> Hi All,
>>
>> Tab Atkins has put forward and alternative proposal to both srcset and
>> picture:
>>
>> http://tabatkins.github.io/specs/respimg/Overview.html
>>
>> It combines what was originally in <source> and `srcset` into a "srcN"
>> attribute. Example:
>>
>>   <img src1="(max-width: 400px) pic-small.jpg"
>>        src2="(max-width: 1000px) pic-medium.jpg"
>>        src="pic-large.jpg"
>>        alt="Obama talking to a soldier in hospital scrubs.">
>>
>> Please take a look and discuss. I've cc'ed Tab who I'm sure can answer
>> any questions.
>>
>> Kind regards,
>> Marcos
>> --
>> Marcos Caceres
>>
>>
>>
>>
>
>


-- 
Cory Brown
Received on Friday, 27 September 2013 12:03:38 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:12:40 UTC