<?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>Dave Rupert &#187; Archives</title>
	<atom:link href="http://daverupert.com/archives/feed/" rel="self" type="application/rss+xml" />
	<link>http://daverupert.com</link>
	<description>I&#039;m the lead developer at Paravel. This blog mostly deals with web development.</description>
	<lastBuildDate>Fri, 04 May 2012 21:09:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Making Video.js Fluid for RWD</title>
		<link>http://daverupert.com/2012/05/making-video-js-fluid-for-rwd/</link>
		<comments>http://daverupert.com/2012/05/making-video-js-fluid-for-rwd/#comments</comments>
		<pubDate>Thu, 03 May 2012 20:26:17 +0000</pubDate>
		<dc:creator>davatron5000</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://daverupert.com/?p=808</guid>
		<description><![CDATA[Video.js is a pretty, smooth, CSS-styleable video polyfill and my Google-Fu didn't return any responsive examples, so I grokked this out.
]]></description>
			<content:encoded><![CDATA[<p>Now, Uncle Dave is <a href="http://dolectures.co.uk">no stranger</a> to <a href="http://fitvidsjs.com">video in responsive web design</a> and I currently have a situation where I need to use <a href="http://videojs.com">Video.js</a> on a project. Out of the box, Video.js isn&#8217;t super flexible. My first attempts at responsivizing<sup id="fnref:fn1"><a href="#fn:fn1" rel="footnote">1</a></sup> it went awry, but I eventually grokked out a solution that worked. Here it is in 4 simple steps.</p>
<p>Impatient? <a href="http://jsbin.com/idinaf/4">Here&#8217;s the demo</a>.</p>
<h3>Step 1: Put stuff in the Head</h3>
<p>Per the requirements of Video.js, this stuff must be in the <code>head</code> so that it will continue to function on older IEs. You can self-host the files or use their CDN.</p>
<pre><code>&lt;link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet"&gt;
&lt;script src="http://vjs.zencdn.net/c/video.js"&gt;&lt;/script&gt;
</code></pre>
<h3>Step 2: Add Some CSS</h3>
<p>This step isn&#8217;t actually necessary, just helpful if Video.js doesn&#8217;t fire.</p>
<pre><code>video {
    max-width: 100%;
    height: auto;
}
</code></pre>
<h3>Step 3: Remove height and width</h3>
<p>You only need to make a minor edit to the <code>video</code> tag<sup id="fnref:fn2"><a href="#fn:fn2" rel="footnote">2</a></sup> from the Video.js example, simply delete the height and width attributes attribute.</p>
<pre><code>&lt;video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" poster="http://video-js.zencoder.com/oceans-clip.png" data-setup="{}"&gt;
  &lt;source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' /&gt;
  &lt;track kind="captions" src="captions.vtt" srclang="en" label="English" /&gt;
&lt;/video&gt;
</code></pre>
<p>Notice the explicit <code>ID</code>, you&#8217;re gonna need that later. You&#8217;ll have to modify the following if you have multiple videos on one page.</p>
<h3>Step 4: A little window.resize() magic</h3>
<p>Just before your <code>&lt;/body&gt;</code> tag add:</p>
<pre><code>&lt;script type="text/javascript"&gt;
    // Once the video is ready
    _V_("example_video_1").ready(function(){  

        var myPlayer = this;  // Store the video object
        var aspectRatio = 9/16; // Make up an aspect ratio

        function resizeVideoJS(){
              // Get the parent element's actual width
              var width = document.getElementById(myPlayer.id).parentElement.offsetWidth;
              myPlayer.width(width).height( width * aspectRatio ); // Set width to fill parent element, Set height
        }

        resizeVideoJS(); // Initialize resizeVideoJS()
        window.onresize = resizeVideoJS; // Call resizeVideoJS() on window.resize();
    });
&lt;/script&gt;
</code></pre>
<p><a href="http://jsbin.com/idinaf/4">View the demo</a></p>
<p>The code should read fine, but you&#8217;re probably asking yourself &#8220;Why not use the Video.js API&#8217;s built-in <code>myPlayer.width()</code>?&#8221; Well, smarty, turns out that <code>myPlayer.width()</code> will return <code>100</code> (pixels) becuase our width is set to 100%. So we simply ask the DOM for our video&#8217;s current rendered width.</p>
<p>If <code>window.resize()</code> isn&#8217;t your thing or you have performance concerns, I found an <a href="http://3strandsmarketing.com/video-fluid-2.php">intrinsic ratio version of Video.js</a>, which is the same principle as FitVids, after the javascript fires it&#8217;s CSS all the way down. I tend to steer clear of core-hack forks and it had a jQuery dependency, so it&#8217;s not for me on this project, but it&#8217;s an awesome solution.</p>
<p>Anyhow, I hope that help you. Good luck, citizens!</p>
<div class="footnotes">
<hr />
<ol>
<li id="fn:fn1">
Is this a word yet?&#160;<a href="#fnref:fn1" rev="footnote">&#8617;</a>
</li>
<li id="fn:fn2">
Intentionally didn&#8217;t include a WebM source. #hotdrama&#160;<a href="#fnref:fn2" rev="footnote">&#8617;</a>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://daverupert.com/2012/05/making-video-js-fluid-for-rwd/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://video-js.zencoder.com/oceans-clip.mp4" length="19448241" type="video/mp4" />
		</item>
		<item>
		<title>Uncle Dave&#8217;s Ol&#8217; Padded Box</title>
		<link>http://daverupert.com/2012/04/uncle-daves-ol-padded-box/</link>
		<comments>http://daverupert.com/2012/04/uncle-daves-ol-padded-box/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 14:20:49 +0000</pubDate>
		<dc:creator>davatron5000</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://daverupert.com/?p=805</guid>
		<description><![CDATA[Here's a CSS trick I've been using lately in my responsive designs.]]></description>
			<content:encoded><![CDATA[<p>Recently on <a href="http://shoptalkshow.com">ShopTalk</a>, we were asked about our favorite CSS tricks. I thought I&#8217;d share a new trick I&#8217;ve been playing with in my RWD workflow.</p>
<h3>How to use Uncle Dave&#8217;s Ol&#8217; Padded Box</h3>
<p>Inspired by Elliot Jay Stocks&#8217; article  &#8220;<a href="http://elliotjaystocks.com/blog/better-background-images-for-responsive-web-design/">Better Background Images for RWD</a>&#8221; and comments therein, I combined 2 of my favorite concepts for great success: <code>background-size: cover</code> and <a href="http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/">Thierry Koblentz&#8217; Intrinsic Ratios</a>.</p>
<pre><code>&lt;!-- http://yaccessibilityblog.com/library/aria-fix-non-standard-images.html --&gt;
&lt;div id="meowmeow" role="img" aria-label="Kitty Cats"&gt;&lt;/div&gt;

&lt;style&gt;
  #meowmeow {
        background: url(http://placekitten.com/720/405/) no-repeat center center;
        background-size: cover;
        height: 0;
        padding-bottom: 56.25%; /* 16:9 */
    }
&lt;/style&gt;
</code></pre>
<p>In its simplest form, it&#8217;s an empty <code>DIV</code><sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> with a standard background-image, except that it has a height of zero and a padding-bottom of 56.25%. Similar to how <a href="http://fitvidsjs.com">FitVids.js</a> works, percentage-based padding is based on the width of the viewport, so it creates a block that maintains its aspect ratio. Then, because it&#8217;s a normal <code>DIV</code>, you have the option of dropping in a layer of text or whatever you want into it.</p>
<h3>Flexible Implementation</h3>
<p><a href="http://css-tricks.com/on-responsive-images/">Responsive Images are a bit of a deal</a>, but becuase Uncle Dave&#8217;s Ol&#8217; Padded Box is just CSS&#8230; you can sorta make this thing do whatever you want. I&#8217;d stay away from targeting specific devices, but for example:</p>
<pre><code>&lt;style&gt;
    /* What if someone visits using an iPad? */
    @media screen and (min-width: 768px) {
        #meowmeow {
            background-image: url(cat-using-iPad.gif);
        }
    }
    /* ZOMG! WUT ABOUT RETINAZ D00D!?? */
    @media screen and (min-width: 768px) and (min-device-pixel-ratio: 1.5) {
        #meowmeow {
            background-image: url(cat-using-iPad.gif@2x.gif);
        }
    }
&lt;/style&gt;
</code></pre>
<h3>Advanced Usage: Change the Aspect Ratio</h3>
<p>Now! Witness the raw power of Uncle Dave&#8217;s Padded Box Technique! If things get weird or you need to <a href="http://www.stuffandnonsense.co.uk/blog/about/paying_attention_to_content_hierarchy_across_screen_sizes">pay attention</a> <a href="http://daverupert.com/2011/11/responsive-image-hierarchy/">to hierarchy</a>, you can change the aspect-ratio/auto-cropping of the image with just a little CSS:</p>
<pre><code>&lt;style&gt;
    /* The place where every responsive design gets a little weird */
    @media screen and (min-width: 480px) and (max-width: 700px) {
        #meowmeow {
            padding-bottom: 75%; /* 4:3, Dribbble-style */
        }
    }
&lt;/style&gt;
</code></pre>
<p>Isn&#8217;t that handy? You gain a bit more flexibility when using a background-image rather than an <code>IMG</code> tag. I realize an empty <code>DIV</code> isn&#8217;t ideal for every situation, but I&#8217;ve got a few more advanced usage techniques I&#8217;ll show in later posts that might convince ya.</p>
<h3>Limitations</h3>
<p>The obvious limitation is the dependency on <code>background-size: cover</code>. Great news is <a href="http://caniuse.com/#search=background-size">background-size is supported in all modern browsers</a> and matches <a href="http://caniuse.com/#search=media">media query support</a> exactly. The only place you might experience problems is using a media query polyfill for older browsers.</p>
<div class="footnotes">
<hr />
<ol>
<li id="fn:1">
If your image is just a decorative background, then you might not need the ARIA role stuff.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://daverupert.com/2012/04/uncle-daves-ol-padded-box/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Responsive Image Hierarchy</title>
		<link>http://daverupert.com/2011/11/responsive-image-hierarchy/</link>
		<comments>http://daverupert.com/2011/11/responsive-image-hierarchy/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 20:28:44 +0000</pubDate>
		<dc:creator>davatron5000</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://daverupert.com/?p=802</guid>
		<description><![CDATA[In a single column "mobile view", taller images appear more important than wider&#160;images.]]></description>
			<content:encoded><![CDATA[<p>Recently while working on a responsive web design at <a href="http://paravelinc.com">Paravel</a>, we came across an unexpected maxim regarding image aspect ratios and their visual hierarchy.</p>
<pre><code>Image Height == Image Importance
</code></pre>
<p>Our design employed a ~3:1 hero image with three ~4:3 thumbs below it. At full width it posessed the proper hierarchy: <code>Biggest == Most Important</code>. However, when resized and folded into a single column, the 3:1 image appears to be about &half; the height of the 4:3 images below it.</p>
<p>Narrow your browser width to see the visual hierarchy breakdown:</p>
<p><iframe src="http://jsbin.com/eferih/14" width="100%" style="background: white"></iframe></p>
<p><a href="http://jsbin.com/eferih/14">View &#8220;BEFORE&#8221; on JSBin</a></p>
<p>Pretty unacceptable to lose hierarchy on such a major feature of the site &#8211; especially when e-commerce and products are involved. We had to come up with a solution.</p>
<h3>Uncle Dave&#8217;s Squeeze n&#8217; Crop Method</h3>
<p>We wanted stop the image from scaling once it reached a certain height. Here&#8217;s what we did:</p>
<pre><code>&lt;div class="banner-item"&gt;
&lt;!-- Using a 2:1 image because the cat picture is better :) --&gt;
    &lt;img src="http://placekitten.com/1200/600" /&gt;
&lt;/div&gt;
</code></pre>
<p>First wrap the image in a DIV, this will act as an image-mask of sorts. Then apply some <code>min-height</code> + <del><code>max-height</code></del><ins><code>height</code></ins> + <code>overflow: hidden</code> magic to lock the image and hide the overflow:</p>
<pre><code>.banner-item {
  overflow: hidden;
  min-height: 300px; /* 300px is arbitrary. */
}
.banner-item img {
  width: 100%;
}

/* 600px is about the width "locked in" at */
@media screen and (max-width: 700px) {
  .banner-item img {
    width: auto;
    max-width: none;
    height: 300px;
  }
}
</code></pre>
<p>The image hugs the left of the wrapper. Auto-cropping is never perfect, but if you want to adjust the focal point of the image, you can do that with <code>position:relative</code>:</p>
<pre><code>/* OPTIONAL: Use to shift left as necessary */
@media screen and (max-width: 480px) {
  .banner-item img {
   position: relative;
   left: -40%
  }
}
</code></pre>
<h3>Results</h3>
<p><iframe src="http://jsbin.com/eferih/15" width="100%" style="background: white"></iframe></p>
<p><a href="http://jsbin.com/eferih/15">View &#8220;AFTER&#8221; on JSBin</a></p>
<p>There&#8217;s a lot of playing around with what &#8220;feels good&#8221;. Adjust the breakpoint of your media query to where it feels like your image locks-in to the desired height. There might be some &#8220;Math&#8221; [/quotehands] based off of a conch shell that can help you with this, but I just <a href="http://www.colbertnation.com/the-colbert-report-videos/24039/october-17-2005/the-word---truthiness">go with my gut</a>.</p>
<p>Good luck and let us know if you use this technique and/or can make it better.</p>
]]></content:encoded>
			<wfw:commentRss>http://daverupert.com/2011/11/responsive-image-hierarchy/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Responsive Video Embeds with FitVids</title>
		<link>http://daverupert.com/2011/09/responsive-video-embeds-with-fitvids/</link>
		<comments>http://daverupert.com/2011/09/responsive-video-embeds-with-fitvids/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 16:00:09 +0000</pubDate>
		<dc:creator>davatron5000</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://daverupert.com/?p=794</guid>
		<description><![CDATA[Continuing in my series of micro-jQuery plugins I'm pleased to announce FitVids, a Paravel + Chris Coyier venture]]></description>
			<content:encoded><![CDATA[<p>Last week, <a href="http://trentwalton.com">Trent Walton</a> tweeted about the frustration of getting standard video players to work in a responsive design:</p>
<div id="bbpBox_108986192002953217" class="bbpBox" style="padding:20px; margin:5px 0; background-color:#e6e6e6; background-image:url(http://a3.twimg.com/profile_background_images/230317815/the-dude.png); background-repeat:no-repeat">
<div style="background:#fff; padding:10px; margin:0; min-height:48px; color:#333333; -moz-border-radius:5px; -webkit-border-radius:5px;"><span style="width:100%; font-size:18px; line-height:22px;">I’d pay well for a video service that made embedding fluid/responsive videos the right way easy. It’s way more difficult that you’d think.</span>
<div class="bbp-actions" style="font-size:12px; width:100%; padding:5px 0; margin:0 0 10px 0; border-bottom:1px solid #e6e6e6;"><img align="middle" src="http://daverupert.com/wp-content/plugins/twitter-blackbird-pie//images/bird.png"><a title="tweeted on August 31, 2011 12:35 pm" href="http://twitter.com/#!/TrentWalton/status/108986192002953217" target="_blank">August 31, 2011 12:35 pm</a> via <a href="http://itunes.apple.com/us/app/twitter/id409789998?mt=12" rel="nofollow" target="blank">Twitter for Mac</a><a href="https://twitter.com/intent/tweet?in_reply_to=108986192002953217" class="bbp-action bbp-reply-action" title="Reply"><span><em style="margin-left: 1em;"></em><strong>Reply</strong></span></a><a href="https://twitter.com/intent/retweet?tweet_id=108986192002953217" class="bbp-action bbp-retweet-action" title="Retweet"><span><em style="margin-left: 1em;"></em><strong>Retweet</strong></span></a><a href="https://twitter.com/intent/favorite?tweet_id=108986192002953217" class="bbp-action bbp-favorite-action" title="Favorite"><span><em style="margin-left: 1em;"></em><strong>Favorite</strong></span></a></div>
<div style="float:left; padding:0; margin:0"><a href="http://twitter.com/intent/user?screen_name=TrentWalton"><img style="width:48px; height:48px; padding-right:7px; border:none; background:none; margin:0" src="http://a2.twimg.com/profile_images/1180283376/tw_normal.jpg"></a></div>
<div style="float:left; padding:0; margin:0"><a style="font-weight:bold" href="http://twitter.com/intent/user?screen_name=TrentWalton">@TrentWalton</a>
<div style="margin:0; padding-top:2px">Trent Walton</div>
</div>
<div style="clear:both"></div>
</div>
</div>
<p></p>
<p>Trent is right. It&#8217;s deceptively difficult to make videos fluid and responsive. I almost lost all my hair getting it to work on <a href="http://dolectures.co.uk">Do Lectures</a>. On one hand, the HTML5 <code>video</code> element is super easy to make responsive: <code>video { max-width: 100%; height: auto; }</code>. On the other hand, if you want to do something basic like embed a video from YouTube or Vimeo (that has a flash fallback) you can set the <code>width: 100%;</code> but the height stays the same breaking the aspect ratio… until now.</p>
<p>After some interstate brainstorming and coding with <a href="http://chriscoyier.net">Chris Coyier</a>, we came up with a solution. Mr. Walton, we&#8217;re here for our check.</p>
<h3>Introducing FitVids</h3>
<p><a href="http://fitvidsjs.com">FitVids</a> is a lightweight, easy-to-use jQuery plugin for fluid width video embeds. It currently supports the major video vendors: YouTube, Vimeo, Blip.tv, and a couple outliers.</p>
<p><iframe src="http://player.vimeo.com/video/28523422?title=0&amp;byline=0&amp;portrait=0" width="720" height="405" frameborder="0"></iframe></p>
<h3>How it works</h3>
<p>The plugin is based on <a href="http://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php">Chris&#8217; pre-exising work on fluid videos</a> and <a href="http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/">the Intrinsic Ratio method suggested by Thierry Koblentz (ALA #284)</a>. With these gems of knowledge combined with my ability to only make tiny jQuery plugins, getting your videos do aspect ratio-based resizing is now as easy as targeting your .container, .post, etc. with FitVids.</p>
<pre><code>$("#thing-with-videos").fitVids();
</code></pre>
<p>It&#8217;s that easy! Best part, there&#8217;s very little Javascript happening. After the initial setup, it&#8217;s all percentage based resizing with just CSS.</p>
<p>You can <a href="https://github.com/davatron5000/FitVids.js/">fork it on Github</a> to dig in deeper into how it works. We&#8217;d love your feedback.</p>
<p>FitVids happily joins the Paravel family of easy-to-use tools for radical web: <a href="http://letteringjs.com">Lettering.js</a> and <a href="http://fittextjs.com">FitText</a>. If you use FitVids or any of these plugins on a something, let us know! We love to seeing this stuff in action.</p>
<h3>Updates: Plugins and Modules</h3>
<p>Absolutely amazed that people are taking this and running with it. Thanks, y&#8217;all.</p>
<ul>
<li><a href="http://wordpress.org/extend/plugins/fitvids-for-wordpress/">FitVids WordPress Plugin</a> by <a href="http://kevindees.cc/">Kevin Dees</a></li>
<li><a href="http://drupal.org/project/fitvids">FitVids Drupal Module</a> by <a href="http://www.sharpshooter.org/">Derek Ahmedzai</a></li>
</ul>
<p>Also, we&#8217;ve made some updates to FitVids and you can add your own custom video vendors and test out other players. If this interests you, <a href="https://github.com/davatron5000/FitVids.js/blob/master/README.md">read more here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://daverupert.com/2011/09/responsive-video-embeds-with-fitvids/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>Tiny Apps on Tiny Devices</title>
		<link>http://daverupert.com/2011/08/tiny-apps-on-tiny-devices/</link>
		<comments>http://daverupert.com/2011/08/tiny-apps-on-tiny-devices/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 19:03:04 +0000</pubDate>
		<dc:creator>davatron5000</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://daverupert.com/?p=791</guid>
		<description><![CDATA[As if 10K Apart wasn't already challenging enough, this year submissions have to be responsive.]]></description>
			<content:encoded><![CDATA[<p>In association with <a href="http://visitmix.com">MIX Online</a> and <a href="http://aneventapart.com">An Event Apart</a>, Paravel is proud to take part in the launch of <a href="http://10k.aneventapart.com">The 2011 10K Apart: Responsive Edition</a>. It went fast but we had fun handling the <a href="http://blog.reaganray.com/post/8441225480/10kapart">the design process</a> and frontend buildout of this year&#8217;s contest site.</p>
<h3>The Buildout</h3>
<p><a href="http://10k.aneventapart.com/"><img src="http://daverupert.com/wp-content/uploads/2011/08/10k.jpg" alt="Insipre the Web with just 10K" style="max-width:100%;"/></a></p>
<p>The site itself is a simple 3 column responsive gallery with a few special ingredients:</p>
<ul>
<li><a href="https://github.com/davatron5000/Foldy960">Foldy960</a>, our homegrown not-a-framework, for the responsive base of the site. It&#8217;s lightweight and great for customization.</li>
<li><a href="http://fittextjs.com">FitText</a> for some subtle title resizing.</li>
<li><a href="http://marktyrrell.com/labs/blueberry/">Blueberry</a>, a responsive image slider. I was sad my trusty <a href="http://jquery.malsup.com/cycle/">jQuery.cycle</a> doesn&#8217;t work on fluid images, but I&#8217;m glad I found Blueberry. Highly Recommend++!!</li>
</ul>
<p>For the homepage feature we settled on a sliding background image that correlates your browser&#8217;s window width, even though we weren&#8217;t sure it was possible. After building a quick prototype to test that <a href="http://daverupert.com/2011/07/interaction/">interaction</a>, it was easier than we thought. Then it was simply a matter of applying the final copy, textures, and images.</p>
<p>As we were wrapping up, MIX&#8217;s <a href="http://rainypixels.com/">Nishant Kothary</a> asked us if we&#8217;d be interested in making a sample app for launch day&#8230;</p>
<h3>Introducing Colorrrs</h3>
<p><a href="http://10k.aneventapart.com/Uploads/501/"><img src="http://daverupert.com/wp-content/uploads/2011/08/colorrrs.jpg" alt="Colorrrs" style="max-width:100%;"/></a></p>
<p><a href="http://10k.aneventapart.com/Uploads/501/">Colorrrs</a> is 7,085 bytes (zipped) of random inspiration. We decided to isolate Dribbble&#8217;s awesome <a href="http://dribbble.com/colors/">Browse By Color</a> feature, make it ajaxy, and add a &#8220;Random&#8221; button for funsies. The heart of the app is a simple <a href="http://developer.yahoo.com/yql/">YQL</a> query to get data from Dribbble, then some jQuery to stitch it all together.</p>
<p>I&#8217;m finding Colorrrs to be a great way to explore Dribbble. I&#8217;ve been exposed to some sweet shots way outside the range of my daily browsing habits &#8211; and I enjoy that.</p>
<p>Coming up with a sample app for launch day and subjecting myself to the 10K limit was as fun as it was challenging. You have to think and choose your codes carefully. Now, knowing firsthand what goes into making such a tiny app, I&#8217;m even more excited to see what the world comes up with. Good luck, everyone!</p>
<h4>Further Reading</h4>
<ul>
<li>MIX Online announcing <a href="http://visitmix.com/writings/10k-apart-the-responsive-edition">10K Apart &#8211; Responsive Edition</a></li>
<li>Reagan Ray on <a href="http://blog.reaganray.com/post/8441225480/10kapart">Designing the 2011 10K Apart Contest</a></li>
<li>Trent Walton on <a href="http://trentwalton.com/2011/08/03/10k-apart-the-responsive-edition">10K Apart: The Responsive Edition</a></li>
<li>Nishant Kothary on <a href="http://rainypixels.com/writings/journal/back-to-the-future-of-wireframes">Back to the Future of Wireframes</a> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://daverupert.com/2011/08/tiny-apps-on-tiny-devices/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Interaction</title>
		<link>http://daverupert.com/2011/07/interaction/</link>
		<comments>http://daverupert.com/2011/07/interaction/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 12:53:05 +0000</pubDate>
		<dc:creator>davatron5000</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://daverupert.com/?p=784</guid>
		<description><![CDATA[New technologies are being added to the browser faster than we can blog about them.]]></description>
			<content:encoded><![CDATA[<p>We now have CSS3 transforms, transitions, animations, media queries, HTML5 audio &amp; video, Canvas, inline SVG, and even WebGL for full 3D rendering. Infinite possibilities and combinations that keep me up at night.</p>
<h3>Better Browsers, Better Devices, New Interactions</h3>
<aside><a href="http://www.abookapart.com/products/responsive-web-design"><img src="http://daverupert.com/wp-content/uploads/2011/07/RWD.png" alt="Responsive Web Design"/></a><a href="http://www.abookapart.com/products/responsive-web-design">Responsive Web Design</a> by <a href="http://unstoppablerobotninja.com/">Ethan Marcotte</a> has spurred my thinking about interaction design. Fluid grids and media queries force us to consider content first and the interaction it will have with users&#8217; devices.</aside>
<p>Browser improvements aren&#8217;t just limited to graphics and animations. We can now tap into the hardware capabilities of various devices: geolocation, orientation<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup>, notifications, multitouch, etc. These capabilities create brand new avenues of physical interaction we&#8217;ve never had access to before.</p>
<p>How can we use these new features for more meaningful interactions? How can we use them responsibly? Here are a few rules I live by:</p>
<ul>
<li>Don&#8217;t repeat the sins of Flash.</li>
<li>Don&#8217;t make users wait.</li>
<li>Make it non-essential.</li>
<li>Make it delightful.</li>
</ul>
<p>Stick to these rules and you&#8217;ll be able to surprise users with simple, joyful interactions (and should keep the luddites at bay).</p>
<h3>The tools for the job.</h3>
<p>Interaction Design is still tough. Aside from sliding around paper cutouts on a flat surface, I haven&#8217;t come across a tool greater than HTML for mocking up interaction<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup>.</p>
<p>I&#8217;m not naive enough to say, &#8220;Thou Shalt Only Design in Browser.&#8221; Though, in the near future I&#8217;m sure we&#8217;ll all spend more and more time mocking up working interaction prototypes in browser. We&#8217;ll all need <a href="http://lab.simurai.com">HTML/CSS labs</a> to test clicks, fonts, swipes, flips, orientations, squeeziness™, and more on multiple devices.</p>
<p>We&#8217;re in hyper-futuristic times if you consider the browsers and devices we use each day. It&#8217;s a new frontier and there&#8217;s never been a bigger space for exploration. Go forth and make awesome.</p>
<div class="footnotes">
<hr />
<ol>
<li id="fn:1">
If you have a Mac Laptop, iPad2 or iPhone4 &#8211; load this page up and give the header a twist.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a>
</li>
<li id="fn:2">
Friends on Twitter have suggested the following for IxD mockups: Keynote, <a href="http://balsamiq.com/">Balsalmiq</a>, <a href="http://invisionapp.com/">InVision</a>, Fireworks, and Omnigraffle.&#160;<a href="#fnref:2" rev="footnote">&#8617;</a>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://daverupert.com/2011/07/interaction/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Two-Tone Borders with CSS3</title>
		<link>http://daverupert.com/2011/06/two-tone-borders-with-css3/</link>
		<comments>http://daverupert.com/2011/06/two-tone-borders-with-css3/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 15:14:11 +0000</pubDate>
		<dc:creator>davatron5000</dc:creator>
				<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://daverupert.com/?p=779</guid>
		<description><![CDATA[Harnessing the Power of CSS3 into the Cloud for Real-Time Letterpress Effects.]]></description>
			<content:encoded><![CDATA[<p>We love using texture in our designs at Paravel. When you settle on a good texture, there&#8217;s nothing better than a slighly embossed line to give a letterpress like feel in between sections.</p>
<p><a href="http://daverupert.com/wp-content/uploads/2011/06/doubleborder-sample.png"><img src="http://daverupert.com/wp-content/uploads/2011/06/doubleborder-sample.png" alt="" title="doubleborder-sample" class="alignnone size-full wp-image-780" style="padding: 3px; background:#fff; max-width: 100%; height: auto;" /></a><br />
If you zoom in, you&#8217;ll see the lines are actually two tone: a main color and a highlight color.</p>
<p>Typically, we&#8217;d use a 1x2px image based approach -either background-images on nested DIVs (CSS2) or multiple background-images (CSS3)- to accomplish this effect. Challenging ourselves to <a href="http://daverupert.com/2010/06/web-performant-wordpress/">reduce HTTP Requests</a>, we came up with a simple solution to get the job done.</p>
<pre><code>&lt;style&gt;
    body { background: url(noise.jpg) repeat; }
    #blog {
        border-top: 1px solid #fff;
        box-shadow: 0 -1px 0 #cdd4b4;
        /* you'll need all the vendor prefixes for `box-shadow` */
    }
&lt;/style&gt;
&lt;body&gt;
    &lt;p id="blog"&gt;This is my content&lt;/p&gt;
&lt;/body&gt;
</code></pre>
<p>Bingo Bango! It works, is future proof, and degrades nicely. <a href="/demos/twotone/">View the Demo</a></p>
<p><a href="/demos/twotone/"><img src="http://daverupert.com/wp-content/uploads/2011/06/twotonedemo.png" alt="" title="twotonedemo" class="alignnone size-full wp-image-782" style="background: #fff; padding: 3px; max-width: 100%; height: auto;"></a></p>
<h3>Double-Double Borders</h3>
<p>What if you need two-tone lines on the top and the bottom of a element? That&#8217;s easy as well.</p>
<pre><code>#blog {
    border-top: 1px solid #fff;
    border-bottom: 1px solid #cdd4b4;
    box-shadow: 0 -1px 0 #cdd4b4, 0 1px 0 #fff;
}
</code></pre>
<p><strong>UPDATED:</strong> <a href="http://twitter.com/divya">Divya Manian</a> and <a href="http://twitter.com/mrflix">Felix Niklas</a> were quick to point out a better way for multiple borders using multiple box shadows. Updated code, but <a href="http://jsfiddle.net/nimbu/UcUMS/">view the e-solution here!</a>.</p>
<h3>Bonus Sass Mixin</h3>
<p>If you&#8217;re going to do this a lot, with all the vendor prefixes needed it makes sense to use <a href="http://sass-lang.com">Sass</a>. Here&#8217;s a <em>free</em> Sass mixin to get the job done:</p>
<pre><code>@mixin doubleborder($side, $innerColor, $outerColor) {
    $shadow: "0 0 0";
    border-#{$side}: 1px solid $innerColor;
    @if ($side == "top") { $shadow: 0 -1px 0; }
    @if ($side == "right") { $shadow: 1px 0 0; }
    @if ($side == "bottom") { $shadow: 0 1px 0; }
    @if ($side == "left") { $shadow: -1px 0 0; }
    -webkit-box-shadow: $shadow $outerColor;
    -moz-box-shadow: $shadow $outerColor;
    -o-box-shadow: $shadow $outerColor;
    box-shadow: $shadow $outerColor;
}

#blog {
    @include doubleborder(top, #fff, #cdd4b4);
}
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://daverupert.com/2011/06/two-tone-borders-with-css3/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>AustinJS Lettering.js Presentation</title>
		<link>http://daverupert.com/2011/03/austinjs-lettering-js-presentation/</link>
		<comments>http://daverupert.com/2011/03/austinjs-lettering-js-presentation/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 12:45:32 +0000</pubDate>
		<dc:creator>davatron5000</dc:creator>
				<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://daverupert.com/?p=776</guid>
		<description><![CDATA[I recently spoke at Austin Javascript about Lettering.js. It was videotaped and I have slides.]]></description>
			<content:encoded><![CDATA[<p>I recently had the opportunity to speak at <a href="http://austinjavascript.com">AustinJS</a> about <a href="https://github.com/davatron5000/Lettering.js">Lettering.js</a>, the jQuery plugin I created for <a href="http://lostworldsfairs.com">The Lost World&#8217;s Fairs</a>. The <strong>presentation starts at ~4:23</strong> and is followed by a 10 minute Q&#038;A. My favorite part of the whole talk is when I invent a brand new CSS property called `-webkit-slightly-escalating-text`.</p>
<p><iframe src="http://player.vimeo.com/video/20214958?portrait=0" width="620" height="350" frameborder="0"></iframe></p>
<p>Here are the slides that are available for <a href="http://www.slideshare.net/davatron5000/lettering-js">download on Slideshare</a> (and hopefully soon at Note &#038; Point). Also, don&#8217;t forget to re-look at the ever growing gallery of real-world examples over at <a href="http://LetteringJS.com">LetteringJS.com</a>.</p>
<div class="clearfix">
<div id="__ss_7299011" style="margin-bottom:1em"><object id="__sse7299011" width="620" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=letteringjs-110317152644-phpapp01&#038;stripped_title=lettering-js&#038;userName=davatron5000" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse7299011" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=letteringjs-110317152644-phpapp01&#038;stripped_title=lettering-js&#038;userName=davatron5000" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="620" height="355"></embed></object> </div>
<p>Big thanks to <a href="http://llbbl.com">Logan Lindquist</a> and his side project <a href="http://AustinTechVideos.com">AustinTechVideos.com</a> for recording the talk. If you run a meetup in/around Austin, consider hiring him. I think it&#8217;s an excellent thing to document all the talks around town.
</div>
<h3>Bonus PowerPoint!!</h3>
<p>Because I know you like PowerPoints, here are some <a href="http://www.slideshare.net/davatron5000/webkit-transitions-the-good-the-bad-the-awesome">slides on Webkit Transitions</a> and <a href="http://daverupert.com/demos/">the accompanying demos</a> I did for a talk at <a href="http://refreshaustin.com">Refresh Austin</a> last year. </p>
<div id="__ss_7299209"  style="margin-bottom:1em"><object id="__sse7299209" width="620" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=webkittransitions-110317155144-phpapp01&#038;stripped_title=webkit-transitions-the-good-the-bad-the-awesome&#038;userName=davatron5000" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse7299209" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=webkittransitions-110317155144-phpapp01&#038;stripped_title=webkit-transitions-the-good-the-bad-the-awesome&#038;userName=davatron5000" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="620" height="355"></embed></object>  </div>
<p>Also worth checking out: <a href="http://trentwalton.com">Trent Walton</a> and I co-wrote an article for a Summer 2010 issue of <a href="http://netmag.co.uk">NetMag</a> (Issue 205 &#8211; Out of Print) that features similar, less-copyright-infringing, demos along with a simple walkthrough explanation of CSS transitions and animations.</p>
]]></content:encoded>
			<wfw:commentRss>http://daverupert.com/2011/03/austinjs-lettering-js-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>40 Things I Learned From Side Projects</title>
		<link>http://daverupert.com/2010/12/40-things-i-learned-from-side-projects/</link>
		<comments>http://daverupert.com/2010/12/40-things-i-learned-from-side-projects/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 14:52:41 +0000</pubDate>
		<dc:creator>davatron5000</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://daverupert.com/?p=769</guid>
		<description><![CDATA[As the year ends, I took some time to write down every skill I&#8217;ve learned in 2010 as a direct result of side projects.]]></description>
			<content:encoded><![CDATA[<p>It&rsquo;s been a busy year at Paravel, no doubt. In addition to client work, we at Paravel put a high value on personal side projects, famously <a href="http://themanyfacesof.com">The Many Faces Of</a>, because through goofing off we can stay at the top of our craft.</p>
<p>In order to quantify the benefits side projects, I decided to take note of at least 40 different skills and technologies I&rsquo;ve learned this year <em>solely through side projects</em>. The bulk of my work at Paravel is still in PHP and since clients aren&rsquo;t paying me to be totally confused for hours on end, I had to hone these new skills in my spare time.</p>
<p><img src="http://daverupert.com/wp-content/uploads/2010/12/forty.jpg" alt="TL;DR" title="forty" width="780" height="420" class="aligncenter size-full wp-image-773" /></p>
<section class="section">
<h3>HTML5</h3>
<p>Side projects were a beautiful place to start understanding and using HTML5. It started with babysteps, but HTML5 is now the norm at Paravel. I&#8217;m enjoying getting into the grittier parts of HTML5 and am super-fascinated by things like the Geolocation API.</p>
<p class="note">Skills += New HTML5 Elements, HTML5 Forms, Modernizr, Custom &lt;audio&gt; &#038; &lt;video&gt; controls, Geolocation, Local/Session Storage, ARIA roles</p>
</section>
<section class="section">
<h3>CSS3</h3>
<p>We&rsquo;ve been using CSS3 at Paravel for well over a year, but it wasn&rsquo;t until <a href="http://www.refreshaustin.org/2010/april-meeting-old-school-business-with-new-school-tools-webkits-transition/">I presented at Refresh Austin in April</a> that I really learned CSS3 Transforms, Transitions and Animations. <a href="http://daverupert.com/demos/webkit/">The demos</a> I prepared for the talk are still helpful to me and eventually turned into an article <a href="http://trentwalton.com">Trent Walton</a> and I cowrote for <a href="http://www.netmag.co.uk/">.NET Magazine</a>.</p>
<p class="note">Skills += CSS3 Transforms, CSS3 Transitions, &#038; CSS3 Keyframe Animations</p>
</section>
<section class="section">
<h3>Ruby</h3>
<p>Learning Ruby has been a long time in the making, like since 2006, but I&rsquo;ve finally made the switch from PHP. I&rsquo;m thinking like a Rubyist now and have open side projects in both Rails and Sinatra.</p>
<p><em>Special Thanks:</em><br />
The wonderful <a href="http://austinonrails.org">Austin on Rails</a> community and Socialization Practice afterwards.<br />
<a href="http://cafebedouins.com">The Cafe Bedouins</a> who I can interrupt and say &ldquo;What did I do wrong?&rdquo;<br />
<a href="http://collectiveidea.com/blog/archives/2010/06/12/meet-keith-gaddis/">Keith Gaddis</a> and his Behavior Driven Development (BDD) class.<br />
And <a href="http://mattt.me/">Mattt Thompson</a>, with whom I&#8217;m working on a soon-to-be-released side project [/tease].</p>
<p class="note">Skills += Rails 3, Sinatra, BDD, HAML, SASS / Compass</p>
</section>
<section class="section">
<h3>Web Performance</h3>
<p>An afternoon of recording the <a href="http://atxwebshow.com/2010/01/22/episode-4-googles-make-the-web-faster-with-getify/">ATX Web Show with guest Kyle Simpson</a> turned into a binge night of coding and a now unending obsession. I spend my days counting kilobytes and milliseconds.  I documented these learnings in my <a href="http://daverupert.com/2010/06/web-performant-wordpress/">Web Performant WordPress</a> post, but it all started because of that podcast interview.</p>
<p class="note">Skills += Browser cache, ETags, gzip compression, LABjs, WordPress Caching</p>
</section>
<section class="section">
<h3>Version Control</h3>
<p>Being the lone developer at an small frontend-y design shop, we haven&rsquo;t really needed a version control system, FTP suits our needs pretty well. Sure you can play Git by yourself, but its boring and unfulfilling. Git is really better when at least 2 people are involved. /innuendo</h3>
<p>Thanks to the patience (again) of Mattt-sensei and <a href="https://github.com/davatron5000/Lettering.js/network">the folks contributing to Lettering.JS</a>, I&rsquo;m behind, but getting my source control skills in check.</p>
<p class="note">Skills += Git, Heroku</p>
</section>
<section class="section">
<h3>APIs</h3>
<p>In 2010, I spent some time following and learning a few newer APIs. <a href="http://thedesigncubicle.com">Brian Hoff</a> and I even started <a href="http://rebbbounds.tumblr.com">Rebbbounds</a> to keep track of the cool stuff that&rsquo;s being done with the Dribbble API. And the aforementioned side project with Mattt-sensei is based on one or more of these APIs and will hopefully deploy soon.</p>
<p class="note">Skills += Gowalla API, Dribbble API, Infochimps API</p>
</section>
<section class="section">
<h3>OAuth</h3>
<p>Playing around with the <a href="http://gowalla.com/api">Gowalla API</a>, led directly into using their OAuth service for checkins.  And on another top secret side project, I played around with Twitter and Facebook Auth using the <a href="http://icelab.com.au/articles/welcome-to-the-omnisocial/">Omnisocial gem</a>.  It&rsquo;s tops!</p>
<p class="note">Skills += Gowalla OAuth, Omnisocial Gem</p>
</section>
<section class="section">
<h3>Mobile Web Design/Development</h3>
<p>Starting in March with the annual <a href="http://sxsw.austintownhall.com/m">Austin Town Hall SXSW Free Show Guide</a>, I started shifting a lot of my focus to mobile web development.  Then the iPad came out and I released <a href="http://themanyfacesof.com/games/goonies/">a touch-based mobile web app board game for The Many Faces Of</a>.</p>
<p class="note">Skills += jQTouch, jQueryMobile, Touch Events, Mobile Web Apps</p>
</section>
<section class="section">
<h3>iOS App Development</h3>
<p>Without spilling the beans too much, I&rsquo;m working on an iPhone app that&rsquo;s pretty good, especially with the help of Paravel+Mattt. I&rsquo;m still challenged by Objective-C so it&rsquo;ll be slow goings, but hopefully I&rsquo;ll  be able to focus more time on that in the near, near future.</p>
<p class="note">Skills += iOS, Objective-C, XCode, Interface Builder</p>
</section>
<section class="section">
<h3>Miscellaneous Buzzwords</h3>
<p>One-day tangent projects also allowed me to pick up a few more miscellaneous skills. Most self-impressing, I made a <a href="http://dribbble.com/shots/6578-RuPorter-final-">label for my homebrew</a> and now I can use Illustrator now without feeling like a total dweeb.</p>
<p class="note">Skills += MongoDB, Node.js, Adobe Illustrator, WordPress Custom Post Types, Tumblr Themes</p>
</section>
<section class="section">
<h3>These 40 Things I Learned</h3>
<p>Let me reiterate: <strong>These 40 things are a result of doing side projects</strong>. Naturally, these skills are transferring over to Paravel&#8217;s client work as well. Side projects are adding value to me, the employee, as well as my company. But don&#8217;t take my word for it, just <a href="http://trentwalton.com/2010/10/28/keep-on-learning/">read the words of my own boss and check-writer, Trent Walton</a>:</p>
<blockquote><p>As a boss, I know that learning through experimentation and exploration makes my employees more valuable.  As a worker, I know that if I&rsquo;m going to have a job in this industry next year I&rsquo;d better learn something new.</p></blockquote>
<p>Side projects haven&#8217;t kept us from doing business, they&#8217;ve kept us from doing &#8220;business as usual&#8221;.  They&#8217;ve kept us from growing stale in an ever-changing webscape. Not to mention the intellectual stimulation in regards to learning new things. I&#8217;m not talking about levitating things with my brain, but almost. I&#8217;m more engaged day-to-day in my current job than I have been in any other job I&#8217;ve had in my life.</p>
<p>The Japanese have a word that literally means working yourself to death, &#8220;karoushi&#8221; (過労死). Don&#8217;t do that. Be responsible with your mental health and your relationships. I feel morally obliged to mention this.</p>
<p>In the same serious tone, don&#8217;t underestimate how beneficial side projects are to employees as well as employers.  I&#8217;ve benefitted both professionally and personally by spending time working on stuff (web apps, podcasts, etc) that I enjoy. Keyword: &#8220;enjoy&#8221;.</p>
<p class="note">Lastly, I&#8217;d like to thank my wife for being patient with me when I&#8217;m on the computer because I often lose basic husband skills like being attentive. <3</p>
</section>
]]></content:encoded>
			<wfw:commentRss>http://daverupert.com/2010/12/40-things-i-learned-from-side-projects/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Lettering.JS</title>
		<link>http://daverupert.com/2010/09/lettering-js/</link>
		<comments>http://daverupert.com/2010/09/lettering-js/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 16:17:33 +0000</pubDate>
		<dc:creator>davatron5000</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://daverupert.com/?p=763</guid>
		<description><![CDATA[Web Typography is exploding all over the web. We developed a lightweight, easy to use jQuery plugin for radical Web Typography.]]></description>
			<content:encoded><![CDATA[<p id="update">Oh wow! Lettering.JS now has  it&#8217;s own website with a little mini-gallery.<br/><a href="http://letteringjs.com">Check it out</a> to see how other people are using it.</p>
<p><a href="http://paravelinc.com">Paravel</a> has just wrapped up an exciting <a href="http://dribbble.com/search?q=operation+condor" target="_blank">secret project</a> with three of the web&#8217;s most talented designers: <a href="http://jasonsantamaria.com">Jason Santa Maria</a>, <a href="http://frankchimero.com">Frank Chimero</a>, and <a href="http://weightshift.com">Naz Hamid</a>. These designs are epic, like 18,123px epic. Working with these guys was a complete joy. There were a few fun development challenges and &#8211; as you might expect from these gentlemen &#8211; a lot of fancy typography work in the delivered PSDs.</p>
<p>Before <a href="http://trentwalton.com">Trent</a> and I marked up the designs, we noticed that in many instances we would need to style individual letters. We decided we&#8217;d need a system to keep our markup maintainable. Something agile enough that a text change wouldn&#8217;t ruin us. Our solution was to call upon the power of Javascript to insert some easy to remember <code>span</code> tags.</p>
<h3>Individual Letter Control with Lettering.js</h3>
<p>We developed a really simple, lightweight, easy to use jQuery plugin, we&#8217;re calling it &#8220;Lettering Dot JS&#8221;, and we&#8217;re releasing it today for free over <a href="http://github.com/davatron5000/Lettering.js">on Github</a>. Let me demo it for you: <code>&lt;/stevejobs&gt;</code></p>
<p>We&#8217;ll start with some really basic markup:</p>
<pre><code>&lt;h1 class=&quot;fancy_title&quot;&gt;Some Title&lt;/h1&gt;</code></pre>
<p>After including jQuery, <a href="http://github.com/davatron5000/Lettering.js/downloads">download and include the minified version of Lettering.js</a>, then a script block:</p>
<pre><code>&lt;script src=&quot;path/to/jquery-1.4.2.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;path/to/jquery.lettering.min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
$(document).ready(function() {
&nbsp;&nbsp;$(&quot;.fancy_title&quot;).lettering();
});
&lt;/script&gt;</code></pre>
<p>The resulting code will churn your <code>.fancy_title</code> and output the following:</p>
<pre><code>&lt;h1 class=&quot;fancy_title&quot;&gt;
  &lt;span class=&quot;char1&quot;&gt;S&lt;/span&gt;
  &lt;span class=&quot;char2&quot;&gt;o&lt;/span&gt;
  &lt;span class=&quot;char3&quot;&gt;m&lt;/span&gt;
  &lt;span class=&quot;char4&quot;&gt;e&lt;/span&gt;
  &lt;span class=&quot;char5&quot;&gt;&lt;/span&gt;
  &lt;span class=&quot;char6&quot;&gt;T&lt;/span&gt;
  &lt;span class=&quot;char7&quot;&gt;i&lt;/span&gt;
  &lt;span class=&quot;char8&quot;&gt;t&lt;/span&gt;
  &lt;span class=&quot;char9&quot;&gt;l&lt;/span&gt;
  &lt;span class=&quot;char10&quot;&gt;e&lt;/span&gt;
&lt;/h1&gt;
</code></pre>
<p>Magical. Now the text is easy to manipulate in your CSS using an ordinal <code>.char#</code> pattern.  This plugin assumes basic counting skills, but it&#8217;s a pretty fast and easy way to get control over every letter.</p>
<p>As you can imagine, it would be a pain in the ass to have all those spans littering your markup and a nightmare to maintain. If the client came by the next day and said that the SEO Expert demands that you have to change the title to &#8220;Cool Title&#8221;, it&#8217;d just be a matter of changing the original clean markup to:</p>
<pre><code>&lt;h1 class=&quot;fancy_title&quot;&gt;Cool Title&lt;/h1&gt;</code></pre>
<p>It also plays nicely with CMSs like WordPress or Expression Engine and art direction plugins.</p>
<h3>Wrap Words with Lettering.js</h3>
<p>Once we developed this e-solution and played with it, we found it useful enough to broaden the scope so that we could break apart and wrap words in a sentence in a <code>span</code> tag.</p>
<p>Here&#8217;s an example of the .lettering(&#8216;words&#8217;) method:</p>
<pre><code>&lt;p class=&quot;word_split&quot;&gt;Don&#x27;t break my heart.&lt;/p&gt;

&lt;script&gt;
$(document).ready(function() {
&nbsp;&nbsp;$(".word_split").lettering('words');
});
&lt;/script&gt;</code></pre>
<p>Which will generate:</p>
<pre><code>&lt;p class=&quot;word_split&quot;&gt;
  &lt;span class=&quot;word1&quot;&gt;Don&#x27;t&lt;/span&gt;
  &lt;span class=&quot;word2&quot;&gt;break&lt;/span&gt;
  &lt;span class=&quot;word3&quot;&gt;my&lt;/span&gt;
  &lt;span class=&quot;word4&quot;&gt;heart.&lt;/span&gt;
&lt;/p&gt;
</code></pre>
<p>You can then style each word using the <code>.word#</code> class.</p>
<h3>Wrap Lines with Lettering.js</h3>
<p>Once word wrapping was complete, noticed the need for yet another method, one that would break lines up mid-sentence.  We struggled for a semantic way to do this, but then remembered <code>&lt;br&gt;</code> tag which a semantic way to say &#8220;break this line&#8221;.  Similar to the above examples where lines of text are broken up by either non-breaking spaces or individual letters, the <code>lettering('lines')</code> method will create breakpoints at <code>&lt;br&gt;</code>  tags:</p>
<pre><code>&lt;p class=&quot;line_split&quot;&gt;Are you&lt;br/&gt; ready to&lt;br/&gt; RUMmMmMMBBLE!&lt;/p&gt;

&lt;script&gt;
$(document).ready(function() {
&nbsp;&nbsp;$(".line_split").lettering('lines');
});
&lt;/script&gt;</code></pre>
<p>Resulting code:</p>
<pre><code>&lt;p class=&quot;line_split&quot;&gt;
  &lt;span class=&quot;line1&quot;&gt;Are you&lt;/span&gt;
  &lt;span class=&quot;line2&quot;&gt;ready to&lt;/span&gt;
  &lt;span class=&quot;line3&quot;&gt;RUMmMmMMBBLE!&lt;/span&gt;
&lt;/p&gt;
</code></pre>
<h3>Kern Well</h3>
<p>If you&#8217;re going through the trouble to load a fancy font and that word or phrase is the largest on the site, then it&#8217;s important for it to be kerned well. With Lettering.js, kerning is a breeze. You can simply use <code>$("#id-of-what-i-want-to-kern").lettering();</code> and then on each <code>.char#</code>, you can set relative position or left/right margin. Works like a charm.</p>
<h3>Best Practices</h3>
<p>We&#8217;ve found this to be a pretty quick and elegant solution to create <a href="http://trentwalton.com/css3/type/">typographical CSS3 posters</a>. It&#8217;s also a great solution for really custom type headings, while keeping the text selectable.</p>
<p>Be smart and use sparingly. You&#8217;ll probably break your browser if you try to tried to do wrap every letter on your page in a span tag, so don&#8217;t do that. Look to use this in your Headings, Blockquotes, Asides, etc.</p>
<h4>Non-Javascript Fallback</h4>
<p>As with any kind of Javascript, have a fall back plan in case the user doesn&#8217;t have javascript enabled. The bottom line is up to you, my bottom line would be &#8220;legible and on the screen&#8221;. Also, use <code>lettering.min.js</code>: <a href="http://github.com/davatron5000/Lettering.js/downloads">Download the minified version of Lettering.js here</a>.</p>
<h4>Performance Anti-Pattern</h4>
<p>Web performance patterns advise that you put Javascripts at the bottom of your page before your <code>&lt;/body&gt;</code> tag.  There is an unfortunate side effect where you may experience a <a href="http://paulirish.com/2009/fighting-the-font-face-fout/">FOUT (Flash of Unstyled Text)</a> when you&#8217;re manipulating your text after the DOM has loaded. Unfortunately, we found the best solution to avoid/minimize the FOUT caused by this plugin is to put your scripts (jQuery, Lettering.js) in the document <code>&lt;head&gt;</code>. On the one hand, your page will load slower. On the other hand, a flash/restyling makes your site feel slow. Users might ultimately feel the site is faster if they don&#8217;t see the FOUT.</p>
<h3>Download, Fork, Commit, Please.</h3>
<p>We really want Lettering.js to be a quality helper for web typography. If you have any feedback or suggestions, please leave those over on the Github. We&#8217;re excited about typography on the web and want to help make it print quality.</p>
<p><a class="download" href="http://github.com/davatron5000/Lettering.js/downloads">Download the Plugin here.</a></p>
<p><em>Thanks to <a href="http://paulirish.com">Paul Irish</a> for code review!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://daverupert.com/2010/09/lettering-js/feed/</wfw:commentRss>
		<slash:comments>67</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using disk: enhanced
Database Caching 1/21 queries in 0.004 seconds using disk: basic
Object Caching 819/859 objects using disk: basic

Served from: daverupert.com @ 2012-05-17 05:46:51 -->
