Re: [whatwg] Throwing in my support for picture into the mix

2012-05-18 Thread Mikko Rantalainen
2012-05-16 18:01 Europe/Helsinki: Julian Reschke:
 On 2012-05-16 16:36, Glenn Maynard wrote:
 On Wed, May 16, 2012 at 9:16 AM, Julian Reschke julian.resc...@gmx.de
 mailto:julian.resc...@gmx.de wrote:
 Actually, the key point is that this is non-conforming to start
 with: image candidate strings must have at least one descriptor
 (http://www.whatwg.org/specs/web-apps/current-work/#image-candidate-string).
 ...
 
 My point being that the syntax is fragile unless implementations follow 
 the spec word by word. I know they are supposed to, but the way it's 
 introduced *will* make people split the attribute value by ,.

HTML5 parser is also fragile unless implementations follow the spec. It
doesn't make much sense to spec anything in HTML5 if you cannot trust
the browser vendors to read it. In addition, if some vendor does not
follow the spec, it's *very* easy to point that out. This situation is
very unlike the old HTML versions that left way too much unspecified and
almost any behavior was acceptable by the spec for many corner cases.

The spec is pretty clear for the implementors so the only issue should
be if content authors can deal with the syntax. Also remember that the
current spec tries to make it very clear that the UA is free to choose
any of the available images as used no matter what the content author
says (however, it does recommend the spec to be followed).

-- 
Mikko


[whatwg] Throwing in my support for picture into the mix

2012-05-16 Thread Paul Court
I have joined this list after reading @wilto's a list apart article 
(http://www.alistapart.com/articles/responsive-images-and-web-standards-at-the-turning-point/)
 and realised it was about time I stopped sitting on the sideline and get 
involved in the debate.

I have searched the archives as best as I can over the last hour or so, so 
forgive me if this is regurgitated.

First, I would like to suggest throwing img srcset out the window and into a 
landfill somewhere (It's not even fit for recycling!). This reminds me if the 
recent semi-colon in JavaScript debate that erupted as a result of @fat's 
code in the Twitter Bootstrap project - To one or two people who are very 
specialised in their particular area, it seems like a non issue - and I think 
that is the case with the img srcset syntax. From a browser developer point 
of view it might be easier to implement, but from a I'm just learning to code 
point of view, that syntax is bat-shit crazy!

Second, I'll add my support for the proposed picture + source tag version, 
as a much more readable implementation, and also shows similarity with the 
video tag already in use, so it should be easier to pick up.

Finally, wouldn't it be more productive in the long run to define a template 
if you will for situations where alternate versions of the same element are 
required. Obviously, we already have video + source, perhaps before long 
picture + source, and I am sure there are others. 

(What was the reason for ditching the object + param tags again? because we 
just seem to be re-implementing them with different names!)

Paul

Re: [whatwg] Throwing in my support for picture into the mix

2012-05-16 Thread Glenn Maynard
On Wed, May 16, 2012 at 4:28 AM, Paul Court p...@pmcnetworks.co.uk wrote:

 First, I would like to suggest throwing img srcset out the window and
 into a landfill somewhere (It's not even fit for recycling!). This reminds
 me if the recent semi-colon in JavaScript debate that erupted as a result
 of @fat's code in the Twitter Bootstrap project - To one or two people who
 are very specialised in their particular area, it seems like a non issue -
 and I think that is the case with the img srcset syntax. From a browser
 developer point of view it might be easier to implement, but from a I'm
 just learning to code point of view, that syntax is bat-shit crazy!


It's a simple, unambiguous, extensible format.  If you don't like this
format, you probably dislike all of CSS, since they're in exactly the same
style.

and also shows similarity with the video tag already in use, so it should
 be easier to pick up.


See http://krijnhoetmer.nl/irc-logs/whatwg/20120515#l-2856 for a brief
discussion about why the video pattern isn't a great one to follow.  It's
much more complex.

-- 
Glenn Maynard


Re: [whatwg] Throwing in my support for picture into the mix

2012-05-16 Thread Julian Reschke

On 2012-05-16 15:46, Glenn Maynard wrote:

On Wed, May 16, 2012 at 4:28 AM, Paul Courtp...@pmcnetworks.co.uk  wrote:


First, I would like to suggest throwingimg srcset  out the window and
into a landfill somewhere (It's not even fit for recycling!). This reminds
me if the recent semi-colon in JavaScript debate that erupted as a result
of @fat's code in the Twitter Bootstrap project - To one or two people who
are very specialised in their particular area, it seems like a non issue -
and I think that is the case with theimg srcset  syntax. From a browser
developer point of view it might be easier to implement, but from a I'm
just learning to code point of view, that syntax is bat-shit crazy!



It's a simple, unambiguous, extensible format.  If you don't like this
...


It is?

Quick check, do

  srcset=a,b

and

  srcset=a, b

mean the same thing?

And what about

  srcset=a ,b

?

Best regards, Julian


Re: [whatwg] Throwing in my support for picture into the mix

2012-05-16 Thread Glenn Maynard
On Wed, May 16, 2012 at 8:57 AM, Julian Reschke julian.resc...@gmx.dewrote:

 It is?

 Quick check, do

  srcset=a,b

 and

  srcset=a, b

 mean the same thing?

 And what about

  srcset=a ,b


Yes, they all mean the same thing: a url a with no descriptors, and a url
b with no descriptors.  What makes you think they wouldn't?

-- 
Glenn Maynard


Re: [whatwg] Throwing in my support for picture into the mix

2012-05-16 Thread Julian Reschke

On 2012-05-16 16:07, Glenn Maynard wrote:

On Wed, May 16, 2012 at 8:57 AM, Julian Reschkejulian.resc...@gmx.dewrote:


It is?

Quick check, do

  srcset=a,b

and

  srcset=a, b

mean the same thing?

And what about

  srcset=a ,b



Yes, they all mean the same thing: a url a with no descriptors, and a url
b with no descriptors.  What makes you think they wouldn't?



, is a legal URI character. (Collect a sequence of characters that 
are not space characters, and let that be url.)


Best regards, Julian


Re: [whatwg] Throwing in my support for picture into the mix

2012-05-16 Thread Glenn Maynard
On Wed, May 16, 2012 at 9:16 AM, Julian Reschke julian.resc...@gmx.dewrote:

 , is a legal URI character. (Collect a sequence of characters that are
 not space characters, and let that be url.)


Actually, the key point is that this is non-conforming to start with: image
candidate strings must have at least one descriptor (
http://www.whatwg.org/specs/web-apps/current-work/#image-candidate-string).

It makes me think of something else, but I'll follow up on one of the main
threads (Paul: please don't start new threads when we have so many on the
topic already).

-- 
Glenn Maynard


Re: [whatwg] Throwing in my support for picture into the mix

2012-05-16 Thread Glenn Maynard
On Wed, May 16, 2012 at 9:36 AM, Glenn Maynard gl...@zewt.org wrote:

 It makes me think of something else, but I'll follow up on one of the main
 threads


Actually, strike that: src is already included as a candidate in step 13,
which is the only case I can think of where you might want a URL with no
descriptors.

-- 
Glenn Maynard


Re: [whatwg] Throwing in my support for picture into the mix

2012-05-16 Thread Julian Reschke

On 2012-05-16 16:36, Glenn Maynard wrote:

On Wed, May 16, 2012 at 9:16 AM, Julian Reschke julian.resc...@gmx.de
mailto:julian.resc...@gmx.de wrote:

, is a legal URI character. (Collect a sequence of characters
that are not space characters, and let that be url.)


Actually, the key point is that this is non-conforming to start
with: image candidate strings must have at least one descriptor
(http://www.whatwg.org/specs/web-apps/current-work/#image-candidate-string).
...


My point being that the syntax is fragile unless implementations follow 
the spec word by word. I know they are supposed to, but the way it's 
introduced *will* make people split the attribute value by ,.


Best regards, Julian