<?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>dev.joeblade.com</title>
	<atom:link href="http://dev.joeblade.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.joeblade.com</link>
	<description>Client side developer / designer / writer</description>
	<lastBuildDate>Thu, 05 Aug 2010 16:17:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Go deep. Zoom out. All in one place. Some notes on the msnbc.com redesign.</title>
		<link>http://dev.joeblade.com/2010/07/go-deep-zoom-out-all-in-one-place-some-notes-on-the-msnbc-com-redesign/</link>
		<comments>http://dev.joeblade.com/2010/07/go-deep-zoom-out-all-in-one-place-some-notes-on-the-msnbc-com-redesign/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 14:07:44 +0000</pubDate>
		<dc:creator>Paul Haine</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dev.joeblade.com/?p=54</guid>
		<description><![CDATA[Last week <a href="http://www.msnbc.msn.com/id/37643077">msnbc.com relaunched their news story pages</a> and I'm finding them pretty exciting. The heart of the redesign concept is the notion that in telling a story, all the different parts of a story -- an article, a video, a gallery, a comment thread, etc. -- are all equally valid and important. ]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdev.joeblade.com%2F2010%2F07%2Fgo-deep-zoom-out-all-in-one-place-some-notes-on-the-msnbc-com-redesign%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdev.joeblade.com%2F2010%2F07%2Fgo-deep-zoom-out-all-in-one-place-some-notes-on-the-msnbc-com-redesign%2F&amp;source=paul_haine&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Last week <a href="http://www.msnbc.msn.com/id/37643077">msnbc.com relaunched their news story pages</a> and I’m finding them pretty exciting. The heart of the redesign concept is the notion that in telling a story, all the different parts of a story — an article, a video, a gallery, a comment thread, etc. — are all equally valid and important. To express this, they’ve turned any msnbc.com story page into the canonical, one-stop source for every bit of media and reporting related to that story, instead of having one URL for the article, one for the video, and so on.</p>
<p><span id="more-54"></span>Here’s a decent example:</p>
<p><a href="http://www.msnbc.msn.com/id/38081870/ns/disaster_in_the_gulf/">BP, feds too cozy for some in assessing damage<br />
Company weighs in on decision-making in every key aspect</a></p>
<p>This story is being reported with an article, a video and a photo slideshow — these are referred to as ‘slices’. Each slice also has a ‘drawer’ underneath it to allow you to continue exploring that particular type of media, or expand the article if there’s more content to read. Part of the rationale behind this is to abandon the notion of pageviews, as <a href="http://www.mikeindustries.com/blog/archive/2010/06/another-nail-in-the-pageview-coffin">Mike Davidson explains here</a>. Adverts are integrated into the general flow as slices in their own right, breaking up the content but not getting all in your face about it.</p>
<h2>Pages vs packages</h2>
<p>At the guardian we have the notion of a ‘story package’; it’s the same concept that msnbc are playing with but it’s simpler. Pieces of content — articles, galleries, videos, etc. — are editorially linked together in the editors’ tools and then every bit of content provides links to everything other bit of the same package. You can see it in action here, on the <a href="http://www.guardian.co.uk/music/2009/jun/25/michael-jackson-dead">story about Michael Jackson dying</a>. </p>
<p>It’s more flexible in some ways than msnbc’s approach and allows the editors to thematically link a much larger number of items — the Michael Jackson story package all on one page would be enormous, and the commenting model wouldn’t work; at guardian.co.uk you generally comment on the piece of content, not on the overarching story. In the case of the Jackson package there are several opinion pieces, each with a different slant on the story, each with their own discussion thread. This allows for a far more intimate dynamic between commenter and author, but does also fragment the discussion of the story. Swings and roundabouts.</p>
<p>One advantage to a story <em>page</em> rather than a story <em>package</em> is that more people may explore more aspects of the story if they’re presented in the same space. It’s very easy to quickly browse a gallery or watch a video if it’s immediately after an article and all you have to do to reach it is to continue scrolling.</p>
<h2>Navigation</h2>
<p>To explore the story page there are several floating icons that allow you to jump straight to slice you’re interested in, including links to the discussion thread and the ‘related content’ area at the foot of the story. These are pretty cool; essentially they’re a jazzed-up modern version of the ‘skip to content’ links that we’ve been peppering our sites with for a few years now except they’re not just for assistive devices, they’re for everyone, and they work pretty well. They always position themselves relative to the length of the page (though this might also work against them — as a user, I may find them easier to use if I always know where they’re going to be).</p>
<p>Their video player features both subtitles and transcripts which is a big usability and accessibility win. I rarely watch videos on sites because it either involves me getting headphones out if I’m in the office or turning down my radio if I’m at home, so subtitle support means I’m far more likely now to explore their video content. </p>
<p>The entire design is extremely polished; it feels like a finished product, very complete and lots of nice touches. It’s like playing a Nintendo game — I keep finding little secret bits and pieces like the hidden headlines at the very top of the page. I love every bit of their photo galleries. I love their timelines, visible on <a href="http://www.msnbc.msn.com/id/37972148/ns/us_news-crime_and_courts">this story</a>. There’s a Newsvine discussion about the redesign and predictably, most of the commenters <a href="http://world-news.newsvine.com/_news/2010/06/24/4558382-have-a-question-about-new-story-pages">hate it</a>. In my experience, this means the team behind the redesign have done something worthwhile, and they should feel very proud of themselves.</p>
<h2>Some niggles</h2>
<p>If JavaScript is disabled, you lose a <em>lot</em> of functionality. Photo slideshows no longer work at all, for instance. Visitors without JavaScript enabled are a small minority these days but nevertheless, some more graceful degradation would be nice.</p>
<p>There doesn’t appear to be any way in referencing a particular part of the story. If I want to send someone a link to the video for instance, I don’t think I can — I have to send them the story link and tell them to find the video. It would be nice if there were per-slice permalinks for this purpose.</p>
<p>The video player is in Flash so I can’t watch videos on my iPhone. There does seem to be a mobile version of the site so maybe I’m just looking in the wrong place, but as MobileSafari is a fully-featured desktop browser, I generally resent being carolled into the cut-down mobile site.</p>
<h2>Further reading</h2>
<ul>
<li><a href="http://www.msnbc.msn.com/id/37643077">Welcome to our new story pages | msnbc.com</a></li>
<li><a href="http://www.cooper.com/journal/2010/06/quick_critique_of_the_new_msnb.html">Quick critique of the new MSNBC redesign | cooper.com</a></li>
<li><a href="http://paidcontent.org/article/419-touting-redesign-msnbc-declares-pageviews-dead/">Touting Redesign, MSNBC Declares Pageviews ‘Dead’ | paidcontent.org</a></li>
<li><a href="http://jimray.tumblr.com/post/753953161/redesigning-stories">Redesigning stories | jimray</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dev.joeblade.com/2010/07/go-deep-zoom-out-all-in-one-place-some-notes-on-the-msnbc-com-redesign/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A short article about short links</title>
		<link>http://dev.joeblade.com/2010/06/a-short-article-about-short-links/</link>
		<comments>http://dev.joeblade.com/2010/06/a-short-article-about-short-links/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 18:23:25 +0000</pubDate>
		<dc:creator>Paul Haine</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dev.joeblade.com/?p=52</guid>
		<description><![CDATA[In which I briefly note how you can use the Guardian’s own short URLs for our content pages: A short article about short links]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdev.joeblade.com%2F2010%2F06%2Fa-short-article-about-short-links%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdev.joeblade.com%2F2010%2F06%2Fa-short-article-about-short-links%2F&amp;source=paul_haine&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>In which I briefly note how you can use the Guardian’s own short URLs for our content pages: <a href="http://www.guardian.co.uk/help/insideguardian/2010/jun/02/1">A short article about short links</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.joeblade.com/2010/06/a-short-article-about-short-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joeblade now using HTML5</title>
		<link>http://dev.joeblade.com/2010/05/joeblade-now-using-html5/</link>
		<comments>http://dev.joeblade.com/2010/05/joeblade-now-using-html5/#comments</comments>
		<pubDate>Mon, 31 May 2010 15:31:05 +0000</pubDate>
		<dc:creator>Paul Haine</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Joeblade]]></category>

		<guid isPermaLink="false">http://dev.joeblade.com/?p=44</guid>
		<description><![CDATA[I’ve reworked joeblade.com to use new HTML5 elements in favour of generic divs: &#60;header&#62;, &#60;article&#62;, &#60;aside&#62;, &#60;footer&#62; and &#60;time&#62; The structure I’m using is more or less as follows: &#60;header&#62; &#60;aside&#62; &#60;article&#62; &#60;header&#62; &#60;time&#62; &#60;footer&#62; You can view the source code for the full story. The first &#60;header&#62; is there to contain the masthead, and [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdev.joeblade.com%2F2010%2F05%2Fjoeblade-now-using-html5%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdev.joeblade.com%2F2010%2F05%2Fjoeblade-now-using-html5%2F&amp;source=paul_haine&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I’ve reworked <a href="http://joeblade.com">joeblade.com</a> to use new HTML5 elements in favour of generic divs: <code>&lt;header&gt;, &lt;article&gt;, &lt;aside&gt;, &lt;footer&gt; and &lt;time&gt;</code></p>
<p><span id="more-44"></span>The structure I’m using is more or less as follows:</p>
<pre>
<code>&lt;header&gt;
&lt;aside&gt;
&lt;article&gt;
  &lt;header&gt;
    &lt;time&gt;
&lt;footer&gt;</code>
</pre>
<p>You can view the source code for the full story. The first <code>&lt;header&gt;</code> is there to contain the masthead, and that’s all it does for now. The <code>&lt;aside&gt;</code> is for ancillary information about the main article and its category: related posts, tags and other posts from the same category. The <code>&lt;article&gt;</code> is obviously the main bit of content on the page.</p>
<p>The second <code>&lt;header&gt;</code>, within the <code>&lt;article&gt;</code>, contains the post headline and the byline. The byline contains the <code>&lt;time&gt;</code> element for the publication date, amongst other things.</p>
<p>The <code>&lt;footer&gt;</code> just contains what you would expect; footer stuff. In my case, it contains a bunch of links to category indecies and a few other pages.</p>
<h2>The <code>&lt;time&gt;</code> element</h2>
<p>My publication date is marked up like this:</p>
<p><code>&lt;time datetime="2010-05-30"&gt;30 May, 2010&lt;/time&gt;</code></p>
<p>The text of the element is in a human readable form; the <code>datetime</code> attribute provides a machine-readable form (though what I’m using is probably still readable by most humans). If I was using multiple <code>&lt;time&gt;</code> elements then I could remove ambiguity as to the function of this first one by including a boolean <code>pubdate</code> attribute, to indicate that this is a reference to a publishing date rather than, for instance, an event.</p>
<h2>The <code>&lt;nav&gt;</code> element</h2>
<p>You’ll notice I’ve not used a <code>&lt;nav&gt;</code> element for any of the links in my footer — I ummed and ahhed about this for a while but decided against it on the grounds that the <code>&lt;nav&gt;</code> element is meant for the site’s major navigation, and my site doesn’t really <em>have</em> major navigation. It isn’t a site you really navigate — you’re generally just reading an article. So, this is more of a philosophical omission rather than a technical one.</p>
<h2>HTML5 enabling script</h2>
<p>Modern browsers will allow you to style unrecognised elements but to support versions of IE older than version 9 I’m using <a href="http://remysharp.com/2009/01/07/html5-enabling-script/">Remy Sharp’s HTML5 enabling script</a>.</p>
<h2>Benefits</h2>
<p>What I’ve done for joeblade is all pretty basic, but it did help me to think more about the actual structure of my site and what things meant. When everything’s a <code>&lt;div&gt;</code> you just end up throwing stuff together, but HTML5 makes you think a bit more, and I spent more time reorganising my page than I did introducing new elements. </p>
<p>It’s unclear what benefit there is at this stage; I assume that search engines will start paying more attention to HTML5 markup than <code>&lt;div&gt;</code>–heavy markup in the same way they tend to favour standards-based sites over old table-based layouts. At the moment though, converting my sites to HTML5 was useful as a thought exercise, and it’s refreshing to not have to use the same tag for every element on the page.</p>
<h2>Further reading</h2>
<p><a href="http://html5doctor.com/designing-a-blog-with-html5/">Designing a blog with HTML5 by Bruce Lawson</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.joeblade.com/2010/05/joeblade-now-using-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom attributes in HTML5: data-* and dataset</title>
		<link>http://dev.joeblade.com/2010/05/custom-attributes-in-html5-data-and-dataset/</link>
		<comments>http://dev.joeblade.com/2010/05/custom-attributes-in-html5-data-and-dataset/#comments</comments>
		<pubDate>Sun, 09 May 2010 15:47:52 +0000</pubDate>
		<dc:creator>Paul Haine</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[data-]]></category>
		<category><![CDATA[dataset]]></category>
		<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://dev.joeblade.com/?p=25</guid>
		<description><![CDATA[Coming up with a proof-of-concept link tracking mechanism for use on guardian.co.uk led us to the ability in HTML5 to create custom attributes for storing metadata on directly on an element. ]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdev.joeblade.com%2F2010%2F05%2Fcustom-attributes-in-html5-data-and-dataset%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdev.joeblade.com%2F2010%2F05%2Fcustom-attributes-in-html5-data-and-dataset%2F&amp;source=paul_haine&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Coming up with a proof-of-concept link tracking mechanism for use on guardian.co.uk led us to the ability in HTML5 to create custom attributes for storing metadata on directly on an element. </p>
<h2>Preamble</h2>
<p>We had to provide some information somewhere in the page markup about the tracked component so that some javascript could then append that information to the <code>href</code> attribute value as a query string. For some non-technical reasons, we had to have this info in the query string and for SEO reasons we didn’t want to just have it appear in the raw <code>href</code> — hence the javascript.</p>
<p>One way of proceeding would have been to hide the information (for this initial stage, just a unique, numerical ID) somewhere near the link, perhaps like this:</p>
<p><code>&lt;span class="hidden tracking-code"&gt;id-45&lt;/span&gt;<br />
&lt;a href="blah.html" class="track-this"&gt;This link will be tracked&lt;/a&gt;</code></p>
<p>What then? With javascript you could traipse back up the DOM to find the nearest <code>span</code> element with a <code>tracking-code</code> attribute, get its content, reformat it and then tag it on the end of the anchor’s <code>href</code>, but that’s all pretty clumsy and you run the risk of those values appearing to the end user.</p>
<p>So, we decided it made sense to include the information directly on the element. First we considered the <code>name</code> attribute:</p>
<p><code>&lt;a href="blah.html" name="id-45"&gt;This link will be tracked&lt;/a&gt;</code></p>
<p>This is neater, but the <code>name</code> attribute is <a href="http://derickrethans.nl/html-name-attribute-deprecated.html">deprecated on anchor elements</a> so it didn’t make sense to implement a new feature with it. We flirted briefly with the idea of hijacking the little-used <a href="http://blog.vkistudios.com/index.cfm/2009/3/17/how-to-use-the-rev-attribute"><code>rev</code> attribute</a> just because I was reasonably sure it hadn’t been used across our site for anything else. But this didn’t sit well with us as, little-used or not, this wasn’t an appropriate use of the attribute. We didn’t want to use the <code>class</code> attribute for similar reasons. It didn’t feel quite right, and would have been marginally more complex to parse as we’re already using it heavily for styling purposes.</p>
<p>So, we turned to <a href="http://dev.w3.org/html5/spec/Overview.html#embedding-custom-non-visible-data">custom data attributes</a>:</p>
<p><code>&lt;a href="blah.html" data-track="id-45"&gt;This link will be tracked&lt;/a&gt;</code></p>
<p>From there, a simple bit of jQuery extracted that value and appended it as a query string to the <code>href</code> on page load. A downside to this mechanism is that to the user, all this is visible as cruft at the end of the URL in their browser but as I said above, there are non-technical reasons for us approaching it in this manner that I won’t go into here. So that we didn’t break SEO, we use <a href="http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html">canonical</a> data on every page.</p>
<h2>Custom data attributes</h2>
<p>A custom data attribute is an attribute that begins with <code>data-</code>. As described in the spec, they exist “to store custom data private to the page or application, for which there are no more appropriate attributes or elements” so they were basically exactly what we needed. They’re easy to access with javascript:</p>
<p><code>var data = document.getElementById("a").getAttribute("data-track");</code></p>
<p>The HTML5 spec also refers to a <code>dataset</code> object that returns a map of name/value pairs:</p>
<p><code>var data = document.getElementById("a").dataset.track;</code></p>
<p>No browser support for that yet, though there is a <a href="http://benweaver.com/blog/html5-dataset-jquery-plugin.html">jQuery dataset plugin</a>.</p>
<p>You can also style them, should you need to:</p>
<pre>
<code>a[data-track] {
	color: red;
}</code>
</pre>
<h2>Is it safe?</h2>
<p>Browsers are supposed to ignore unrecognised attributes, so there’s little risk that this information would ever appear on the page in a broken fashion. From a more philosophical view, it’s not ideal mixing up your data with your markup — it feels like it breaks the model of separating concerns, but then we also use the occasional inline <code>style</code> attribute as well (sometimes it’s just the right tool for the job), so I’m happy to be pragmatic about things.</p>
<h2>Further reading</h2>
<p>Some in favour, some against. All seems to be a bit polarising…</p>
<ul>
<li><a href="http://www.danwebb.net/2010/1/27/put-that-data-attribute-away-son-you-might-hurt-someone">Dan Webb: Put that data-* attribute away son…you might hurt someone</a></li>
<li><a href="http://www.barklund.org/blog/2009/08/28/html-5-datasets/">Barklund: Datasets in HTML 5 and what they’re good for</a></li>
<li><a href="http://ejohn.org/blog/html-5-data-attributes/">John Resig: HTML5 data– attributes</a></li>
</ul>
<h2>Update 12 May</h2>
<p>The query string will now be appended on the onclick event, not on page load, to further minimise exposure to robots and people. So it’s only visible by examining the URL in the browser’s address bar <em>after</em> the target page has loaded.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.joeblade.com/2010/05/custom-attributes-in-html5-data-and-dataset/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Design changes to joeblade.com</title>
		<link>http://dev.joeblade.com/2010/02/design-changes-to-joeblade-com/</link>
		<comments>http://dev.joeblade.com/2010/02/design-changes-to-joeblade-com/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 20:07:44 +0000</pubDate>
		<dc:creator>Paul Haine</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Joeblade]]></category>

		<guid isPermaLink="false">http://dev.joeblade.com/?p=22</guid>
		<description><![CDATA[I’ve reworked joeblade.com over the last couple of weeks, trimming it down to just the essentials. Here are some details about why.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdev.joeblade.com%2F2010%2F02%2Fdesign-changes-to-joeblade-com%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdev.joeblade.com%2F2010%2F02%2Fdesign-changes-to-joeblade-com%2F&amp;source=paul_haine&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I’ve reworked <a href="http://joeblade.com">joeblade.com</a> over the last couple of weeks, trimming it down to just the essentials. Here are some details about why.</p>
<p>Though I liked the wide version of the site, in particular the large masthead images that accompanied many of the posts there, it left me with a lot of space to fill outside the articles. I attempted to fill this space with adverts, and with links to previous posts, latest comments, the usual malarky.</p>
<p>The problem with the ads was that a) they were ugly and irritating and b) nobody ever clicked on them. I don’t blame them for this — I don’t click ads on websites either. I use an ad-blocker, so it was a bit hypocritical for me to include them in the first place, but the logic behind it was that a massive amount of my traffic comes from search engines, and it was an attempt to make a few pence off of the people that don’t hang around, but it never really worked — I think I made a couple of pounds over several months, which wasn’t enough to justify their inclusion.</p>
<p>As for previous posts, related content and all that jazz, this was part of an attempt to get people exploring past content. The site’s been running on and off for years and there’s plenty in the archives, but this didn’t really work either. Regular visitors didn’t need to explore the archives as they’ve read it, and new readers generally didn’t bother either, preferring to stick to whatever was new. Fair enough.</p>
<p>Finally, comments. I’ve been toying with the idea of disabling commenting for quite some time now, and with this version of the site, that’s done (though I plan to restore previous comments soon). There’s never really been a big, thriving, chatty community at joeblade and what I and the guest authors write doesn’t often lend itself well to debate. It’s also partly a reaction against the internet tendency to make <em>everything</em> commentable, even when it doesn’t make sense to do so.</p>
<p>When you enable comments, it alters your mindset a bit. You start worrying when people aren’t commenting, and you start trying to tailor your content to the needs of those that do comment just to try and get a discussion going. But joeblade isn’t really about that, and many of the sites I regularly read have a similar set up — lengthy articles and no commenting. I like this. It makes sense on a technical blog to have comments, so they’re staying open here.</p>
<p>So: the site is leaner, meaner and slightly prettier, using Typekit and wp-typography to make the content sparkle. Though all the above suggests a design failure, I’m not seeing it as such. The underlying architecture was strong, allowing me to make all my changes in under two hours, and I’ve learnt a lot technically as well. Not only that, I’m more comfortable with my own site: I’ve accepted that I have time to write for my site, or to spend ages designing and architecting it, but I don’t have time to do both to the extent that I’d like. As I have to choose, I choose to write.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.joeblade.com/2010/02/design-changes-to-joeblade-com/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using CSS columns in print layouts</title>
		<link>http://dev.joeblade.com/2009/08/using-css-columns-in-print-layouts/</link>
		<comments>http://dev.joeblade.com/2009/08/using-css-columns-in-print-layouts/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 11:55:04 +0000</pubDate>
		<dc:creator>Paul Haine</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Print]]></category>

		<guid isPermaLink="false">http://dev.joeblade.com/?p=12</guid>
		<description><![CDATA[I have a suspicion that print versions of webpages are a bit of a niche market. Nevertheless, they provide a reasonable testing ground for certain client side features that don’t get a lot of use in the screen medium. For the print version of joeblade articles, I decided to use CSS columns. Here’s a screenshot [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdev.joeblade.com%2F2009%2F08%2Fusing-css-columns-in-print-layouts%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdev.joeblade.com%2F2009%2F08%2Fusing-css-columns-in-print-layouts%2F&amp;source=paul_haine&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I have a suspicion that print versions of webpages are a bit of a niche market. Nevertheless, they provide a reasonable testing ground for certain client side features that don’t get a lot of use in the screen medium.</p>
<p><span id="more-12"></span>For the print version of joeblade articles, I decided to use CSS columns. Here’s a screenshot of the on screen layout of my review of the film <cite>Moon</cite>:</p>
<p><a href="http://dev.joeblade.com/supporting/moon-review-screen.png"><img src="http://dev.joeblade.com/supporting/moon-review-screen-thumb.png" alt="" /><br />
(click for full version)</a></p>
<p>Here’s a screenshot of the print version:</p>
<p><a href="http://dev.joeblade.com/supporting/moon-review-print.png"><img src="http://dev.joeblade.com/supporting/moon-review-print-thumb.png" alt="" /><br />
(click for full version)</a></p>
<p>There’s a few things going on there, including some judicious use of <code>text-indent</code>, <code>:first-child</code> and a smattering of sibling selectors, plus the use of a serif font in place of a sans-serif (first choice is Goudy Old Style, followed by Georgia). The CSS for the two columns is simple:</p>
<pre>
<code>div#article-content {
    -moz-column-count: 2;
    -webkit-column-count: 2;
    -moz-column-gap: 30px;
    -webkit-column-gap: 20px;
    font-size: 16px;
    line-height: 1.6;
    width: 760px;
}</code></pre>
<p>Currently only supported in Mozilla and Webkit, and then only with the <code>-moz</code> and <code>-webkit</code> prefixes, non-supporting browsers simply get a wider, single column instead of two. A further limitation is that Webkit doesn’t actually support this in print mode (but it does in screen mode) but I’ve left the code in case it gets fixed in a future update.</p>
<p>You can see live examples <a href="http://joeblade.com/">at joeblade.com</a>. It’s a bit rough around the edges at the moment, particularly when there are images or other media within the body of the article but I think for the most part it works pretty well. For instance, in <a href="http://joeblade.com/2009/08/23/ridley-scott-and-james-cameron-return-to-science-fiction/">this article on Ridley Scott and James Cameron’s return to science fiction</a>, there are some  images that span the width of the content. For the print version, I shrink them down to half their size and the content flows nicely around them. However, the captions look crap, so that’s something I need to fix still.</p>
<h3>Further reading:</h3>
<ul>
<li><a href="http://www.css3.info/preview/multi-column-layout/">Multi-column layout at css3.info</a></li>
<li><a href="http://www.w3.org/TR/css3-multicol/">CSS3 module: Multi-column layout</a></li>
<li><a href="http://www.alistapart.com/articles/css3multicolumn">A List Apart: Introducing CSS3 Multi-column module</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dev.joeblade.com/2009/08/using-css-columns-in-print-layouts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Specialist fonts with the @font-face rule</title>
		<link>http://dev.joeblade.com/2009/08/specialist-fonts-with-the-font-face-rule/</link>
		<comments>http://dev.joeblade.com/2009/08/specialist-fonts-with-the-font-face-rule/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 19:04:54 +0000</pubDate>
		<dc:creator>Paul Haine</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[@font-face]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://dev.joeblade.com/?p=6</guid>
		<description><![CDATA[Now widely-supported in the range of non-Microsoft-authored browsers, the @font-face CSS rule allows authors to specify a non-standard font within their CSS, pointing to the font file on their (or someone else’s) server. At its most basic: @font-face { font-family: "My Friendly Font Name"; src: url("/fonts/font-file.otf") } a { font-family: “My Friendly Font Name”, arial, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdev.joeblade.com%2F2009%2F08%2Fspecialist-fonts-with-the-font-face-rule%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdev.joeblade.com%2F2009%2F08%2Fspecialist-fonts-with-the-font-face-rule%2F&amp;source=paul_haine&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Now widely-supported in the range of non-Microsoft-authored browsers, the <code>@font-face</code> CSS rule allows authors to specify a non-standard font within their CSS, pointing to the font file on their (or someone else’s) server.</p>
<p><span id="more-6"></span>At its most basic:</p>
<p><code>@font-face {<br />
	font-family: "My Friendly Font Name";<br />
	src: url("/fonts/font-file.otf")<br />
}</p>
<p>a {<br />
	font-family: “My Friendly Font Name”, arial, sans-serif;<br />
}</code></p>
<p>Used as above, the result would be that the client-side agent would download and use the font specified within the @font-face rule. For non-supporting browsers, there are some backup font selections.</p>
<p>The major issue with the above is one of copyright; placing your font online and referencing it within your code effectively makes the font publically available, and if you had to buy a license to use your font, you probably don’t have the right to re-distribute it for free. For this reason, it’s prudent to only use open-source fonts in this manner.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.joeblade.com/2009/08/specialist-fonts-with-the-font-face-rule/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using CSS to identify links to the iTunes store</title>
		<link>http://dev.joeblade.com/2009/08/using-css-to-identify-links-to-the-itunes-store/</link>
		<comments>http://dev.joeblade.com/2009/08/using-css-to-identify-links-to-the-itunes-store/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 15:21:28 +0000</pubDate>
		<dc:creator>Paul Haine</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Attribute selectors]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Generated content]]></category>

		<guid isPermaLink="false">http://dev.joeblade.com/?p=3</guid>
		<description><![CDATA[Here's a thing I did in CSS, thought other people might find it useful. I kept on opening iTunes store links when I didn't want to and I was too brain-dead to see the URL before hitting it. Adding the following code to your user stylesheet will append "(iTunes store link)" to any url that begins with http://itunes.apple.com.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdev.joeblade.com%2F2009%2F08%2Fusing-css-to-identify-links-to-the-itunes-store%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdev.joeblade.com%2F2009%2F08%2Fusing-css-to-identify-links-to-the-itunes-store%2F&amp;source=paul_haine&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Here’s a thing I did in CSS, thought other people might find it useful. I kept on opening iTunes store links when I didn’t want to and I was too brain-dead to see the URL before hitting it. Adding the following code to your user stylesheet will append “(iTunes store link)” to any url that begins with http://itunes.apple.com: </p>
<p><code>a[href^=' http://itunes.apple.com']:after<br />
{<br />
content: ' (iTunes store link)';<br />
}</code></p>
<p>Which results in this:</p>
<p><samp><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewMovie?id=296598344&#038;s=143444">The Good Shepherd (iTunes store link)</a></samp></p>
<p>Won’t work in IE but all other browsers should be fine.</p>
<h3>So what is it?</h3>
<p>The above code is an example of a CSS3 attribute selector, specifically a “substring matching attribute selectors”, and will match an anchor element with an <code>href</code> attribute, the value of which must <em>begin</em> with ‘http://itunes.apple.com’. </p>
<p>It then uses the pseudo-element ‘:after’ to target the area after the anchor element, and finally uses the <code>content</code> property to insert a space, followed by some helpful text.</p>
<h3>Other substring matching attribute selectors are available</h3>
<p>You can also match a value that <em>ends</em> with a named value by using this:</p>
<p><code>a[href$='.apple.com']</code></p>
<p>which matches any <code>href</code> value that ends with ‘.apple.com’, and you can match a value whose value contains at least one instance of the named value: </p>
<p><code>a[class*='apple']</code></p>
<p>which matches any anchor with a <code>class</code> attribute that contains ‘apple’ somewhere within it.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.joeblade.com/2009/08/using-css-to-identify-links-to-the-itunes-store/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
