<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>out of my league on this one &#8211; John Marstall</title>
	<atom:link href="https://theiconmaster.com/tag/out-of-my-league-on-this-one/feed/" rel="self" type="application/rss+xml" />
	<link>https://theiconmaster.com</link>
	<description></description>
	<lastBuildDate>Fri, 24 Aug 2012 15:05:46 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>Give img set a chance</title>
		<link>https://theiconmaster.com/2012/05/give-img-set-a-chance/</link>
		
		<dc:creator><![CDATA[iconmaster]]></dc:creator>
		<pubDate>Thu, 17 May 2012 02:33:12 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[out of my league on this one]]></category>
		<category><![CDATA[web design]]></category>
		<guid isPermaLink="false">http://theiconmaster.com/?p=309</guid>

					<description><![CDATA[Oh the drama. 

Web standards wonks are hashing out a new standard for serving the appropriate version of an image given the resolution of a user's device. Unfortunately, that single standard has turned into <a href="http://www.alistapart.com/articles/responsive-images-and-web-standards-at-the-turning-point/">two competing proposals</a>, feelings are hurt, etc. 

If we're going to improve web images, these two assumptions seem sensible to me:

<ol>
<li><strong>One should modify the &#60;img&#62; tag as little as possible.</strong> Web designers know how the &#60;img&#62; tag works. It's not the most elegant thing imaginable, but it's familiar. We should work with what we've got. </li>


<li><strong>The new syntax should be as compact as possible.</strong> &#60;img&#62; tags get used a lot. Anything that gets added to &#60;img&#62; could potentially need to be added to a page dozens of times. We should save ourselves some keystrokes.</li>
 
</ol>

Let's look at the contenders. First, the offering from the Responsive Images Community Group, the &#60;picture&#62; element:

<div class="code">&#60;picture&#62;
   &#60;source src="image.png" /&#62; 
   &#60;source src="image@2x.png" media="min-width: 600px, min-device-pixel-ratio: 2" /&#62;
   &#60;img src="image.png" /&#62;
&#60;/picture&#62;</div>

To me, this looks like a pain. It requires the new tags be wrapped around every &#60;img&#62; element which needs to be made responsive (likely all of them). The &#60;source&#62; has to be spelled out for every alternate version. And while the "min-width" and "min-device-pixel-ratio" syntax matches that of a media query stylesheet, in a media query stylesheet these need only be typed once per media type. With the &#60;picture&#62; element proposal, those queries will need to be added to every image. 

Below is the version Apple suggested, "img set." And let's just acknowledge the elephant in the room: iOS retina devices are the entire reason this conversation is going on. Giving Apple's proposal a little extra weight may not be unreasonable. 

<div class="code">&#60;img src="image.png"
    set="image.png 600w 200h 1x,
         image@2x.png 600w 200h 2x" /&#62;</div>

Hey, this looks pretty compact by comparison. It only requires a new attribute on the familiar &#60;img&#62; tag. Think about that: <em>it's just one tag.</em> (I count four in the alternative, excepting the closing tag.) Using "w" and "h" for width and height is unusual in web development but easy enough to remember. To me, this looks like a winner. 

One of the arguments in favor of the &#60;picture&#62; element is that its syntax more closely matches that of the HTML5 &#60;video&#62; and &#60;audio&#62; elements. But this is a bad comparison. It's fairly rare for video or audio to be embedded in a page more than once; while a single page, again, could contain dozens of images.]]></description>
										<content:encoded><![CDATA[<p>Oh the drama. </p>
<p>Web standards wonks are hashing out a new standard for serving the appropriate version of an image given the resolution of a user&#8217;s device. Unfortunately, that single standard has turned into <a href="http://www.alistapart.com/articles/responsive-images-and-web-standards-at-the-turning-point/">two competing proposals</a>, feelings are hurt, etc. </p>
<p>If we&#8217;re going to improve web images, these two assumptions seem sensible to me:</p>
<ol>
<li><strong>One should modify the &lt;img&gt; tag as little as possible.</strong> Web designers know how the &lt;img&gt; tag works. It&#8217;s not the most elegant thing imaginable, but it&#8217;s familiar. We should work with what we&#8217;ve got. </li>
<li><strong>The new syntax should be as compact as possible.</strong> &lt;img&gt; tags get used a lot. Anything that gets added to &lt;img&gt; could potentially need to be added to a page dozens of times. We should save ourselves some keystrokes.</li>
</ol>
<p>Let&#8217;s look at the contenders. First, the offering from the Responsive Images Community Group, the &lt;picture&gt; element:</p>
<div class="code">&lt;picture&gt;<br />
   &lt;source src=&#8221;image.png&#8221; /&gt;<br />
   &lt;source src=&#8221;image@2x.png&#8221; media=&#8221;min-width: 600px, min-device-pixel-ratio: 2&#8243; /&gt;<br />
   &lt;img src=&#8221;image.png&#8221; /&gt;<br />
&lt;/picture&gt;</div>
<p>To me, this looks like a pain. It requires the new tags be wrapped around every &lt;img&gt; element which needs to be made responsive (likely all of them). The &lt;source&gt; has to be spelled out for every alternate version. And while the &#8220;min-width&#8221; and &#8220;min-device-pixel-ratio&#8221; syntax matches that of a media query stylesheet, in a media query stylesheet these need only be typed once per media type. With the &lt;picture&gt; element proposal, those queries will need to be added to every image. </p>
<p>Below is the version Apple suggested, &#8220;img set.&#8221; And let&#8217;s just acknowledge the elephant in the room: iOS retina devices are the entire reason this conversation is going on. Giving Apple&#8217;s proposal a little extra weight may not be unreasonable. </p>
<div class="code">&lt;img src=&#8221;image.png&#8221;<br />
    set=&#8221;image.png 600w 200h 1x,<br />
         image@2x.png 600w 200h 2x&#8221; /&gt;</div>
<p>Hey, this looks pretty compact by comparison. It only requires a new attribute on the familiar &lt;img&gt; tag. Think about that: <em>it&#8217;s just one tag.</em> (I count four in the alternative, excepting the closing tag.) Using &#8220;w&#8221; and &#8220;h&#8221; for width and height is unusual in web development but easy enough to remember. To me, this looks like a winner. </p>
<p>(Update: it&#8217;s worth noting that both specifications are still in flux and at least in the case of &#8220;img set,&#8221; some of the components may be optional. Imagine the following: </p>
<div class="code">&lt;img src=&#8221;image.png&#8221;<br />
    set=&#8221;image.png 1x,<br />
         image@2x.png 2x&#8221; /&gt;</div>
<p>Now <em>that&#8217;s</em> nice.)</p>
<p>One of the arguments in favor of the &lt;picture&gt; element is that its syntax more closely matches that of the HTML5 &lt;video&gt; and &lt;audio&gt; elements. But this is a bad comparison. It&#8217;s fairly rare for video or audio to be embedded in a page more than once; while a single page, again, could contain dozens of images.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
