Re: srcN - Alternative to picture and srcset

On Fri, Sep 27, 2013 at 3:51 AM, Shane Hudson <Shane@shanehudson.net> wrote:
> I quite like where Tab is going with this. I wonder though, would it be
> possible to have multiple srcs instead of numbering them? It feels kind of
> hacky. I'm pretty sure that browsers (both current and legacy) only take the
> first src in an img?

No, you can't have multiple attributes of the same name - the HTML
parser deals with that and only takes one of them.

On Fri, Sep 27, 2013 at 4:14 AM, Attiks <attiks@gmail.com> wrote:
> I have to agree with Shane, it feels hacky to number them, also if you want
> to remove one later, you'll have a gap, which does not look nice and no idea
> how it's going to be handled.

Yeah, gaps don't look nice, but they're handled fine - the algorithm
collects all of the srcN attrs and sorts them by index (step 4), so
gaps are just skipped over.

> Maybe it is an option to separate all of them into one src using for example
> a ";"

I'm already using a semicolon and a comma; I think another level of
separator would get really confusing.  ^_^

~TJ

Received on Friday, 27 September 2013 16:44:21 UTC