<?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>weedygarden.net &#187; Mobile</title>
	<atom:link href="http://www.weedygarden.net/category/mobile/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.weedygarden.net</link>
	<description>The random ramblings of a web developer.</description>
	<lastBuildDate>Mon, 25 Jan 2010 02:16:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Using Print Styles to Create a Basic Mobile Experience</title>
		<link>http://www.weedygarden.net/2010/01/24/using-print-styles-to-create-a-basic-mobile-experience/</link>
		<comments>http://www.weedygarden.net/2010/01/24/using-print-styles-to-create-a-basic-mobile-experience/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 02:13:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.weedygarden.net/?p=115</guid>
		<description><![CDATA[In the last article, we made our print stylesheet. Now we&#8217;re going to take that stylesheet and turn it into a basic mobile stylesheet. Now when I say basic, I&#8217;m talking VERY basic. This is not what you&#8217;re displaying to your iPhone and Android users. Copy, Paste and Tweak Your Way to Mobile First off, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/2010/01/18/print-styles-your-first-step-to-basic-mobile/">In the last article</a>, we made our print stylesheet. Now we&#8217;re going to take that stylesheet and turn it into a basic mobile stylesheet. Now when I say basic, I&#8217;m talking VERY basic. This is not what you&#8217;re displaying to your iPhone and Android users.</p>
<h2>Copy, Paste and Tweak Your Way to Mobile</h2>
<p>First off, create an empty your mobile stylesheet and link it up:</p>
<p>
<pre>&lt;link href=&quot;/css/mobile.css&quot; media=&quot;handheld&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;</pre>
</p>
<p><img class="alignright" src="/wp-content/wpfiles/basic-mobile.png" alt="Basic mobile display" /></p>
<p>Grab your print styles and paste them into your mobile stylesheet. You&#8217;ll need to take a few of the items you hid (such as navigation), bring them back and give them some style. As with print, focus on what&#8217;s important to this user experience and hide what&#8217;s not.</p>
<h2>Branding is Still Important</h2>
<p>We&#8217;re going to use the same in-line images we included in our print stylesheet to brand our mobile site. How you have them set up in your print style may be all you need. If not, feel free to use &quot;width&quot; on them to make them fit. I typically recommend against using css to change the height/width of images, but I make an exception in this case.</p>
<h3>Images</h3>
<p>Since most of your content images are going to be wider than the screens of most phones, you should add max-width:100% to images in your content.</p>
<h3>Text</h3>
<p>One of the first things a basic mobile user should see on your page (either immediately preceding or following the header) is skip links. This is a list of anchor tags to key elements on your page. At a minimum, it should include links to navigation and content. As an added bonus, these links are helpful to screen readers as well. Be sure to hide this list in your print and screen stylesheets.</p>
<p>When it comes to body copy on the web, there has been a long-standing serif vs sans-serif debate. As a personal preference, I usually go with sans-serif for screen body copy (serif for titles), and serif for print. If you look at my <a href="/wp-content/themes/weedy-beta/css/print.css">print stylesheet</a>, you&#8217;ll see the following font stack:
<pre>Georgia, Times, &quot;Times New Roman&quot;, serif</pre>
<p> For screen and <a href="/wp-content/themes/weedy-beta/css/mobile.css">basic mobile</a>, I&#8217;m using:
<pre>&quot;Lucida Grande&quot;, Lucida, Helvetica, Arial, sans-serif</pre>
</p>
<h2>And Off We Go</h2>
<p>If recent trends tell us anything, it&#8217;s that an increasing percentage of web users are going to be accessing our sites on small screens. As developers, it&#8217;s our responsibility to to give at least a passing nod to these users and give them a pleasant experience. Offering basic mobile styles is the first step.</p>
<div  class="note">
<p>Two of the easiest way to test your newly crafted mobile view:</p>
<ul>
<li>Opera 10&#8242;s small screen view (View &gt; Small Screen)</li>
<li>Switching your style view if Firefox using the <a href="http://chrispederick.com/work/web-developer/">Web Developer extension</a>. (CSS &gt; Display CSS By Media Type)</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.weedygarden.net/2010/01/24/using-print-styles-to-create-a-basic-mobile-experience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Print Styles &#8211; Your First Step to Basic Mobile</title>
		<link>http://www.weedygarden.net/2010/01/18/print-styles-your-first-step-to-basic-mobile/</link>
		<comments>http://www.weedygarden.net/2010/01/18/print-styles-your-first-step-to-basic-mobile/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 02:53:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.weedygarden.net/?p=97</guid>
		<description><![CDATA[In my last article, I made mention that you should at least include a basic mobile stylesheet for your site. The easiest way to accomplish this is to piggy-back your print style. What? You say you don&#8217;t have a print stylesheet? Bad developer. In this article, we&#8217;re going to run through the very basics of [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="/2010/01/02/when-m-dot-is-not-an-option/">my last article</a>, I made mention that you should at least include a basic mobile stylesheet for your site. The easiest way to accomplish this is to piggy-back your print style. What? You say you don&#8217;t have a print stylesheet? Bad developer. In this article, we&#8217;re going to run through the very basics of a print style, and move on to basic mobile in the next.</p>
<h2>A Basic Print Style</h2>
<p>
<pre>&lt;link rel=&quot;stylesheet&quot; href=&quot;/css/print.css&quot; type=&quot;text/css&quot; media=&quot;print&quot; /&gt;</pre>
</p>
<p>There are several things to keep in mind when creating a print stylesheet:</p>
<h3>Background images and colors will not be seen *</h3>
<p><a href="/wp-content/wpfiles/print-full.png" title="View Print Style"><img src="/wp-content/wpfiles/print-preview.png" class="alignright" alt="Print Preview" /></a></p>
<p>Yes, you&#8217;ve spent a lot of time making your site beautiful. When someone prints your page for future reading/reference, they don&#8217;t need the glamour-shot version. They need something simple that&#8217;s not going to cost them a hundred dollars worth of ink to print.</p>
<h3>Hide the junk</h3>
<p>If you&#8217;re a typical site, you&#8217;ll have a bunch of navigation, maybe some ads, thumbnails from Flickr, etc. That&#8217;s the junk. Users that are printing a page don&#8217;t care about it at that moment in time. Right now, content really is king. This is a great time to use &#8220;display:none&#8221; on anything and everything that&#8217;s not related to the content at hand.</p>
<h3>Keep it simple, readability is the key</h3>
<p>So by now you&#8217;ve accepted that your print stylesheet does not have to look the same as the site itself. However, you do need to take some steps to keep some branding. This is going to require some inline images if you want your logo and such to show up. If this print-friendly image is different from what you want to show in your screen style, you can include it in the same element and simply hide it. Then you&#8217;ll have it available for the print style.</p>
<p>Next up are links. Links in your content are part of the story. Be sure to include a little css to show the user where the links would go should they actually be able to click them:</p>
<p>
<pre>#content a:link:after {content:&quot; [&quot; attr(href) &quot;] &quot;; font-size:90%;}</pre>
</p>
<p>Setting up a print stylesheet is not a difficult undertaking and should be part of every design. It&#8217;s a great way to help your users. If you&#8217;re curious, you can <a href="/wp-content/themes/weedy-beta/css/print.css">view the print stylesheet for this site</a> to see how little css it takes to achieve a basic print style.</p>
<h2>Other Resources</h2>
<ul>
<li><a href="http://css-discuss.incutio.com/?page=PrintStylesheets">Printing Web documents and CSS</a></li>
<li><a href="http://css-tricks.com/css-tricks-finally-gets-a-print-stylesheet/">CSS-Tricks Finally Gets A Print Stylesheet | CSS-Tricks</a></li>
<li><a href="http://printfancy.com/">printFancy</a></li>
</ul>
<p>If you&rsquo;re a higher-ed developer, you can find some higher-ed specifics:</p>
<ul>
<li><a href="http://doteduguru.com/id3876-dont-loose-your-identity-create-an-effective-print-style-sheet.html">Don&rsquo;t lose your identity – Create an effective print style sheet</a></li>
<li><a href="http://cuwebd.ning.com/group/css/forum/topics/1763934:Topic:29074">Print Stylesheets &#8211; University Web Developers</a></li>
</ul>
<p><em>* By default, browsers don&#8217;t print background colors or images. Here&#8217;s a section of the print dialog in Firefox. Note that these check boxes are off by default.</em> <img src="/wp-content/wpfiles/print-dialog.png" alt="Print Dialog" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.weedygarden.net/2010/01/18/print-styles-your-first-step-to-basic-mobile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When &#8220;m.&#8221; is Not an Option</title>
		<link>http://www.weedygarden.net/2010/01/02/when-m-dot-is-not-an-option/</link>
		<comments>http://www.weedygarden.net/2010/01/02/when-m-dot-is-not-an-option/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 13:38:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.weedygarden.net/?p=87</guid>
		<description><![CDATA[Over the past year at Notre Dame, we&#8217;ve really started to embrace and experiment with offering a mobile experience for a number of the projects that have made their way through our offices. There are a couple of obstacles that make this process difficult. A separate &#8220;m.&#8221; address is not an option Creating and testing [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past year at Notre Dame, we&#8217;ve really started to embrace and experiment with offering a mobile experience for a number of the projects that have made their way through our offices. There are a couple of obstacles that make this process difficult.</p>
<ol>
<li>A separate &#8220;m.&#8221; address is not an option</li>
<li>Creating and testing mobile styles is rarely part of the project budget</li>
</ol>
<p>This has led to some commonly used shortcuts that have allowed us to, at the very least, provide a serviceable mobile experience with very little effort.</p>
<h2>The basic mobile stylesheet</h2>
<p>At the very least, you should set up a &#8216;handheld&#8217; stylesheet.</p>
<p>
<pre>&lt;link href=&quot;/stylesheets/mobile.css&quot; media=&quot;handheld&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;</pre>
</p>
<p>A number of things to keep in mind.</p>
<ul>
<li>Keep your images under control by using width/max-width.</li>
<li>Use display:none liberally for content that is of little or no use to your mobile visitors.</li>
<li>Your mobile site doesn&#8217;t need all the pretty of the non-mobile version. If you include a lot of images, you&#8217;re going to end up with frustrated users.</li>
</ul>
<p>Now, how do you test this? If you have a WAP enabled phone, you&#8217;re all set. I don&#8217;t. I have, however, found that Opera&#8217;s small screen view will give you a fairly accurate reading on your sites mobile friendliness. All you need to do is select &#8220;View > Small Screen&#8221;. <a href="http://mobiforge.com/testing/story/a-guide-mobile-emulators">MobiForge also has a guide to mobile emulators that you may find handy</a>.</p>
<h2>Targeting the iPhone/iPod Touch (or Webkit)</h2>
<p>Here&#8217;s where the fun starts.</p>
<p><pre>
&lt;link rel=&quot;apple-touch-icon&quot; href=&quot;/images/iphone.png&quot; /&gt;
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width&quot; /&gt;
&lt;link href=&quot;/stylesheets/iphone.css&quot; media=&quot;only screen and (max-device-width: 480px)&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
</pre>
</p>
<p>At this point, you can go one of two routes:</p>
<ol>
<li>Over-ride your existing screen stylesheet to make everything look nice on the iPhone, or</li>
<li>Use javascript to eliminate your screen stylesheets and start fresh.</li>
</ol>
<p>I highly advise you go with the latter. Here&#8217;s why.</p>
<p>For any sizable site that has a lot of complex css, you&#8217;ll find you&#8217;re spending way too much time tracking down which element in your screen stylesheet is blowing-out the width of your iPhone display. It&#8217;s much easier to start from scratch, and simply borrow from main css. Remember, we&#8217;re going for speed here. This isn&#8217;t in the budget.</p>
<p>Here&#8217;s how:</p>
<p><pre>
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
  for (var i=0; i&lt;document.styleSheets.length; i++) {
    if (document.styleSheets[i].href != null &#038;&#038; document.styleSheets[i].href.lastIndexOf(&quot;iphone&quot;) == -1) {
      document.styleSheets[i].disabled = true;
    }
  }
  window.scrollTo(0,1);
}
</pre>
</p>
<p>This simply loops through your stylesheets and disables all but your iphone.css. If you want to target additional webkit browsers, then you need to add them to the if statement:</p>
<p><pre>
if(
  (navigator.userAgent.match(/iPhone/i)) ||
  (navigator.userAgent.match(/iPod/i)) ||
  (navigator.userAgent.match(/Android/i)) ||
  (navigator.userAgent.match(/webOS/i))
) {
</pre>
</p>
<p>One of recent side project sites, on which I was able to spend time with the iPhone css was <a href="http://gameday.nd.edu">Game Day</a>. Currently the iPhone/iPod account for 4% of the sites total traffic. The next mobile platform is Blackberry coming in at 0.26%. So yes, spend some time on your iphone.css. If you don&#8217;t have an iPhone or iPod to test on, download the latest iPhone SDK from Apple (membership to the developer connection is free). It includes an iPhone emulator that will work just as well for testing.</p>
<p>One of the great things about playing with custom styles for the iPhone is you get to play with all those fancy new Webkit and CSS3 features you can&#8217;t use in your day-to-day sites. So go ahead, you now have permission to experiment with gradients, drop shadows, RGBA, etc. Now if only we could serve up these sites as html5.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weedygarden.net/2010/01/02/when-m-dot-is-not-an-option/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
