<?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>Martini Lab Blog</title>
	<atom:link href="http://www.martinilab.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.martinilab.com/blog</link>
	<description>Web design, CSS, scripting, Adobe, tips and other scraps of things that come my way</description>
	<lastBuildDate>Tue, 22 Jun 2010 18:23:41 +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>Let Them Die</title>
		<link>http://www.martinilab.com/blog/167/let-them-die/</link>
		<comments>http://www.martinilab.com/blog/167/let-them-die/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 18:19:48 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=167</guid>
		<description><![CDATA[This month&#8217;s edition of A List Apart covers how to manage multiple browser vendors and their varying support for html5 and css3 1. We&#8217;re all aware of the different uses of border-radius in both FireFox and Webkit. And being able &#8230; <a href="http://www.martinilab.com/blog/167/let-them-die/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This month&#8217;s edition of A List Apart covers how to manage multiple browser vendors and their varying support for html5 and css3 <a href="#links"><sup>1</sup></a>.  We&#8217;re all aware of the different uses of <code>border-radius</code> in both FireFox and Webkit.  And being able to not fork the code in making rounded corners by simply writing standard css3 is tempting.  In fact, it&#8217;s ideal.  Having it managed with javascript is actually very clever, and&#8230; cool!</p>
<p>But I would propose something different entirely.  Instead of using a js library to help browsers properly render a soundly constructed html5/css5 webpage, short of making sure it doesn&#8217;t look like &#8220;total ass&#8221; on IE, just let the page render as it lay.</p>
<p>By now, web designers are largely aware of the rendering quirks of various browsers.  Little things like not adding margins to floating divs for IE&#8217;s sake, or not applying -webkit gradients to divs that contain text fields, are a part of mental mine field map that goes into our work.</p>
<p>Using a javascript library to get around this isn&#8217;t the answer.  Remember that script that lets IE6 properly render PNG transparency?  It might have been relevant to a couple of years ago when there were still a vast majority of users that used IE6, but most web designers have abandoned even trying to support the browser, much less trying to make every pixel line up properly or make every image look decent.  At some point (if our bosses let us), we move on.  </p>
<p>Sadly, we moved onto other scripts that do what html5 is supposed to do already.</p>
<p>Here&#8217;s my advice.  Write your site to work just fine without any javascript (or css for that matter) needed.  If you can still use the site, you&#8217;re good to go.  Using ajax history to browse back and forth with the browser chrome?  Make sure it works without javascript and move on.  If you&#8217;ve got some killer CSS mojo for your site, just write it.  Write that widget that does that thing with the stuff, but to say that we have to cover every contingency is unreasonable.  </p>
<p>When did we go from saying &#8220;to hell with bad browsers&#8221; to using libraries to keep these browsers on &#8220;the same page?&#8221;</p>
<p>Older browsers won&#8217;t go away (I still see Netscape occasionally show up on Google Analytics), but the support we give them can.  </p>
<p>I like to look at these barbaric browsers like the Klingons in Star Trek XI.  Their survival was in jeopardy and Kirk was having none of it.  Eventually, he came around and now we&#8217;re stuck with the Klingons and their foreheads forever.</p>
<p>Don&#8217;t let this happen to bad browsers.  Let them die.</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/Swvf3w6hcY4&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Swvf3w6hcY4&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p><a name="links">1. Links</a></p>
<ul>
<li><a href="http://www.alistapart.com/articles/stop-forking-with-css3/">Stop Forking With CSS3</a></li>
<li><a href="http://www.alistapart.com/articles/taking-advantage-of-html5-and-css3-with-modernizr/">Taking Advantage of HTML5 and CSS3 with Modernizr</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/167/let-them-die/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>For hobronto</title>
		<link>http://www.martinilab.com/blog/160/for-hobronto/</link>
		<comments>http://www.martinilab.com/blog/160/for-hobronto/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 15:47:33 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[jquery bookmarklet]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=160</guid>
		<description><![CDATA[You&#8217;re welcome. Bookmarklet Someone on twitter asked how to find and replace certain words on a web page. This is a bookmarklet on that replaces the word &#8216;god&#8217; with &#8216;sky cake.&#8217; Test it out!]]></description>
			<content:encoded><![CDATA[<p>You&#8217;re welcome.</p>
<p><a href="javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g%3Ef.fn.jquery||h(f)){c=a.createElement(%22script%22);c.type=%22text/javascript%22;c.src=%22http://ajax.googleapis.com/ajax/libs/jquery/%22+g+%22/jquery.min.js%22;c.onload=c.onreadystatechange=function(){if(!b&#038;&#038;(!(d=this.readyState)||d==%22loaded%22||d==%22complete%22)){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,%221.3.2%22,function($,L){var%20el%20=%20$('body');el.html(el.html().replace(/god/ig,'sky%20cake'));});">Bookmarklet</a></p>
<p>Someone on twitter asked how to find and replace certain words on a web page. This is a bookmarklet on that replaces the word &#8216;god&#8217; with &#8216;sky cake.&#8217; </p>
<p><a href="http://en.wikipedia.org/wiki/God">Test it out!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/160/for-hobronto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing thevariants.com</title>
		<link>http://www.martinilab.com/blog/155/introducing-thevariantscom/</link>
		<comments>http://www.martinilab.com/blog/155/introducing-thevariantscom/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 22:58:17 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=155</guid>
		<description><![CDATA[The Variants is a new web series sitcom about the crew of a local comic shop. So far, four promos have been produced and released in time for SDCC 2009 and Episode one is scheduled for release. Each episode (or &#8230; <a href="http://www.martinilab.com/blog/155/introducing-thevariantscom/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.thevariants.com/"><img src="http://www.martinilab.com/blog/wp-content/uploads/2009/07/thevariants-thumb.png" alt="thevariants-thumb" title="thevariants-thumb" width="300" height="252" class="alignright size-full wp-image-156" /></a></p>
<p>The Variants is a new web series sitcom about the crew of a local comic shop.  So far, four promos have been produced and released in time for SDCC 2009 and Episode one is scheduled for release.  Each episode (or is it webisode) runs about ten minutes.</p>
<p>Putting this together was a lot of fun.  With internet video content rising well beyond YouTube, I had many examples of what people expect from a media web site.  Plus, I got to work in a little bit of html5 semantics.</p>
<p>Go watch <a href="http://www.thevariants.com">The Variants</a> promos and laugh, laugh and laugh.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/155/introducing-thevariantscom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing scribbr.com</title>
		<link>http://www.martinilab.com/blog/149/introducing-scribbrcom/</link>
		<comments>http://www.martinilab.com/blog/149/introducing-scribbrcom/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 22:51:26 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=149</guid>
		<description><![CDATA[Scribbr is a tiny web app for drawing and posting to twitter. With jQuery, the user can control the color, size, opacity of the cursor to draw on the canvas element 320 x 320 in size. Last summer, I had &#8230; <a href="http://www.martinilab.com/blog/149/introducing-scribbrcom/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://scribbr.com/status/laprincessatx/2i"><img src="http://www.martinilab.com/blog/wp-content/uploads/2009/06/2i-150x150.png" alt="Thanks, Lisa!" title="Thanks, Lisa!" width="150" height="150" class="alignright size-thumbnail wp-image-150" /></a></p>
<p><a href="http://scribbr.com">Scribbr</a> is a tiny web app for drawing and posting to twitter.   With jQuery, the user can control the color, size, opacity of the cursor to draw on the <code>canvas</code> element 320 x 320 in size.</p>
<p>Last summer, I had the opportunity to work with Eisner Award winning cartoonist Scott Kurtz of <a href="http://www.pvponline.com">PVP</a>. During one conversation we had, he came up with a punch-line to what we were talking about.  I don&#8217;t remember what the subject was, but the punch-line involved a mock editorial cartoon.  He grabbed a 2&#8243; x 2&#8243; sticky note pad and drew the cartoon.  We had a laugh.</p>
<p>This would never happen online.  At least, not in any convenient, simple, method that I was aware of.</p>
<p>Right now, it&#8217;s very crude.  The controls are, admittedly, non-intuitive. There is no &#8216;Undo&#8217; other than clearing the canvas and starting over. It doesn&#8217;t support older browsers either.</p>
<p>I&#8217;m actually quite okay with that last part. This site was immensely fun to build. Getting it to work on IE6 would have taken away from that.  Right now, I know that it works on FireFox 3.0, Safari 4.0b (or WebKit nightly build), and Google Chrome 2.0.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/149/introducing-scribbrcom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zeus Comics redesign</title>
		<link>http://www.martinilab.com/blog/133/zeus-comics-redesign/</link>
		<comments>http://www.martinilab.com/blog/133/zeus-comics-redesign/#comments</comments>
		<pubDate>Fri, 22 May 2009 12:42:22 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=133</guid>
		<description><![CDATA[If for no other reason than finally consolidating the past five years of css style changes into some semblance of organization, this redesign was a long time coming. Zeus Comics and Collectibles is an award-winning comic book retail store in &#8230; <a href="http://www.martinilab.com/blog/133/zeus-comics-redesign/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_136" class="wp-caption alignright" style="width: 310px"><a href="http://www.zeuscomics.com"><img src="http://www.martinilab.com/blog/wp-content/uploads/2009/05/zeus2009.jpg" alt="Zeus Comics" title="Zeus Comics" width="300" height="225" class="size-full wp-image-136" /></a><p class="wp-caption-text">Zeus Comics new design went live Thursday</p></div>
<p>If for no other reason than finally consolidating the past five years of css style changes into some semblance of organization, this redesign was a long time coming.  </p>
<p><a href="http://www.zeuscomics.com">Zeus Comics and Collectibles</a> is an award-winning comic book retail store in Dallas, Texas. For almost nine years, Zeus has been serving the needs of the comic book reading community in the DFW area in the only manner one can expect from a locally gay-owned business – fabulously!<br />
<span id="more-133"></span><br />
Since its last redesign, when Zeus won the <a href="http://www.comic-con.org/cci/cci_eisners_spirit_06zeuscomics.shtml">Will Eisner Spirit of Comics Retailing Award</a> in 2006, design trends evolved, and how we organize and display our code has matured. Zeus went through many attempts at integrating its point-of-sale system with an ecommerce solution.  I’m embarrassed to admit, its first version, not having any experience in ecommerce (how hard could it be?) used FileMaker Pro and Lasso. Looking back, I’m stunned by some on my coding and design decisions. Some of which locked the site into arcane structures from which are not easily broken. And some still exist.</p>
<p>The old method for adding something to the site was simple—make a new folder and add some new tables and call it good.  Want a forum? Install Aterr. Want a checklist? Add a new CodeIgniter folder. After all, what’s one more, right?  After a while, we ended up with many little systems and no way to support them all.</p>
<p>The site’s design needed consistency from its previous version as well. Too dramatic a departure and it loses its branding. We weren’t looking for a fresh start, just a face lift (with enough skin for more adjusting later).</p>
<p>Our approach to ecommerce was simple: always be closing.   One of the lessons learned from out previous cart solution was the more steps a customer has to take to complete an order, the more likely we’d lose the sale.  When you go into a retail store to buy a comic, you don’t expect to be a member of that shop.  When was the last time you walked up to a counter to pay for your goods to have the clerk ask for you username and password. I don’t have a user name. I just want to buy this book.</p>
<p>This was how our previous cart worked.  And I’ll say this first, after trying out X-cart, Zen Cart, Squirrel Cart and later Magento Commerce, Shop Script was the only solution with the simplest way for us to control data from our point-of-sale source. After adding all the items to the cart, the user would have to create an account, add records to the address book for both shipping and billing, choose those records and add them to the order, and then they could finalize their purchase.</p>
<p>In the current system, we’ve taken out the need for membership.  We don’t need it.  We don’t really want it.  We certainly don’t want to support it, if a customer forgets their password.  Instead, customers get a tracking key upon return from Paypal.  We don’t want your credit card info either.</p>
<p>In the next few weeks, I hope to have a downloadable version of the ecommerce solution, so stay tuned.</p>
<p>Is zeuscomics.com all done now? Hardly. Out of the gate, I’m already tracking new errors plus some old ones that will be address by the next release. Fortunately, one of the design/coding goals was to be able to change and grow the site as needed.  Stay tuned for that too.</p>
<p><a href="http://www.zeuscomics.com">http://www.zeuscomics.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/133/zeus-comics-redesign/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YouTube’s H.264 turnaround time is the new dial up</title>
		<link>http://www.martinilab.com/blog/128/youtube-h264-turnaround-time/</link>
		<comments>http://www.martinilab.com/blog/128/youtube-h264-turnaround-time/#comments</comments>
		<pubDate>Thu, 21 May 2009 16:40:15 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=128</guid>
		<description><![CDATA[Just how long does it take for a YouTube video to become available on the YouTube iPhone app? Seriously, if YouTube accepts .wmv, .avi, .mkv, .mov, .mpeg, .mp4, .flv, .ogg, 3gp and outputs to multiple .flv, mp4, 3gp… OMG, why &#8230; <a href="http://www.martinilab.com/blog/128/youtube-h264-turnaround-time/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_129" class="wp-caption alignright" style="width: 215px"><a href="http://www.martinilab.com/blog/wp-content/uploads/2009/05/twitterific-youtube-fail.jpg"><img src="http://www.martinilab.com/blog/wp-content/uploads/2009/05/twitterific-youtube-fail.jpg" alt="Twitterific -&gt; YouTube -&gt; Fail" title="twitterific-youtube-fail" width="205" height="430" class="size-full wp-image-129" /></a><p class="wp-caption-text">Twitterific -> YouTube -> Fail</p></div>
<p>Just how long does it take for a YouTube video to become available on the YouTube iPhone app?</p>
<p>Seriously, if YouTube accepts .wmv, .avi, .mkv, .mov, .mpeg, .mp4, .flv, .ogg, 3gp and outputs to multiple .flv, mp4, 3gp… OMG, why then is the link I just tapped not available?</p>
<p>I understand that once uploaded, videos take time to convert for display. Having uploaded some from my own iMovie library, waiting for YouTube to do its magic without a progress bar is torture.  But once it’s done and properly playing on the website, the video still has to become available for HD (if available), mobile, etc.</p>
<p>As we become more connected on more networks on new devices, our content experience should become more homogeneous. Websites should get closer to looking the same on our desktop computers as they do our mobile devices. Instead, because of mobile phones and netbooks (more specifically, their wireless connectivity) web designers, who once enjoyed building for higher display resolutions and bigger bandwidth, find themselves thrown back into building sites that are “dial-up” friendly.  It’s a whole new browser war sans Netscape Navigator.</p>
<p>Which brings me back to YouTube on the iPhone. Video codec H.264, briefly put, is designed for both high-def and small bandwidth playback.  Since YouTube offers multiple versions of the same video, it has to take the original video upload and convert it several times. And since the only way to view YouTube on Apple TV or the iPhone is with h.264, YouTube needs to make additional conversions/transcodings.</p>
<p>In the end, content for the web isn’t just for the browser.  It includes phones, game consoles, dvr (TiVo), and any future devices we don’t yet know we need.  And all of them need the same content in their own specific formats.</p>
<p>All of this means that the next time I see something along the lines of “@amboy00: too funny! http://tinyurl.com/pqhugm,” I’ll probably have to wait until I get back to my desk to see the funny.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/128/youtube-h264-turnaround-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun with WebKit css gradients</title>
		<link>http://www.martinilab.com/blog/104/fun-with-webkit-css-gradients/</link>
		<comments>http://www.martinilab.com/blog/104/fun-with-webkit-css-gradients/#comments</comments>
		<pubDate>Fri, 15 May 2009 21:38:52 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=104</guid>
		<description><![CDATA[As a follow up to yesterday’s woeful tale of using WebKit’s proprietary css properties, I wanted to follow up with a couple examples of how one can use these features without getting all “bevel-ly” The only benefit of text-shadow is &#8230; <a href="http://www.martinilab.com/blog/104/fun-with-webkit-css-gradients/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_108" class="wp-caption alignright" style="width: 110px"><a href="http://www.martinilab.com/blog/wp-content/uploads/2009/05/album.png"><img src="http://www.martinilab.com/blog/wp-content/uploads/2009/05/album.png" alt="Queen Album Cover" title="Killer WebKit" width="100" height="100" class="size-full wp-image-108" /></a><p class="wp-caption-text">Killer WebKit</p></div>
<p>As a follow up to yesterday’s <a href="http://www.martinilab.com/blog/91/webkit-background-clip-problem/">woeful tale</a> of using WebKit’s proprietary css properties, I wanted to follow up with a couple examples of how one can use these features without getting all “bevel-ly”</p>
<p>The only benefit of <code>text-shadow</code> is not downloading graphics for what can be expressed in css.  The same goes for <code>-webkit-border-image</code>, <code>-webkit-gradient</code>, <code>-moz-border-radius</code>, anything that keeps a web designer from having to launch Photoshop is a boon to bandwidth.</p>
<p>Here are two examples of using some WebKit css gradients.*</p>
<p><em>Update: You must have the Chrome 2.0 or Safari 4.b for these to work.</em></p>
<p><a href='http://www.martinilab.com/blog/wp-content/uploads/2009/05/album.html'>Example 1</a>. is brought to you by “Killer Queen”</p>
<p>This similar looking display to that of the iPhone album display uses a radial gradient (opposed to a linear) as the background for the track names. The overall effect is a dim light. The odd numbered tracks also use a gradient to take advantage of <code>-webkit-gradient</code>&rsquo;s support of alpha values.</p>
<p><a href='http://www.martinilab.com/blog/wp-content/uploads/2009/05/calendar.html'>Example 2</a>. is a css calendar.</p>
<p>This one combines linear gradients and javascript arrays.  Because <code>-webkit-gradient</code> can use rbga formatting in place of the usual hexadecimal value, calculating the values from color to another was much easier.</p>
<p>The drawback to these browser specific properties are, well, browser specific.  While adding a gradient value to your <code>div id=wrapper</code> might give it a groovy drop shadow effect on Safari, nothing is happening on either Firefox, and much less for IE.  </p>
<p>The workaround at this point is to browser detect.</p>
<pre lang="javascript" line="1">
if(jQuery.browser.safari) {
$('#wrapper').addClass('problem-solved');
}
else {
	$('#wrapper').addClass('wah-wah-wah');
}
</pre>
<p>Or whatever.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/104/fun-with-webkit-css-gradients/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>-webkit-background-clip Problems</title>
		<link>http://www.martinilab.com/blog/91/webkit-background-clip-problem/</link>
		<comments>http://www.martinilab.com/blog/91/webkit-background-clip-problem/#comments</comments>
		<pubDate>Thu, 14 May 2009 18:07:23 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=91</guid>
		<description><![CDATA[Someday, all the nifty Photoshop Blending options will be available as CSS properties. Mark my words! In the mean time, we’re kind of stuck with drop shadows, and now gradients (and text strokes) for WebKit browsers. Too bad you can’t &#8230; <a href="http://www.martinilab.com/blog/91/webkit-background-clip-problem/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_94" class="wp-caption alignright" style="width: 160px"><a href="http://www.martinilab.com/blog/wp-content/uploads/2009/05/thumbnail_29708.jpg"><img src="http://www.martinilab.com/blog/wp-content/uploads/2009/05/thumbnail_29708-150x150.jpg" alt="Specimen 7" title="thumbnail_29708" width="150" height="150" class="size-thumbnail wp-image-94" /></a><p class="wp-caption-text">Specimen 7</p></div>
<p>Someday, all the nifty Photoshop Blending options will be available as CSS properties.  Mark my words! In the mean time, we’re kind of stuck with drop shadows, and now gradients (and <a href="http://webkit.org/blog/85/introducing-text-stroke/">text strokes</a>) for WebKit browsers. Too bad you can’t use them together.</p>
<p>In order to take advantage of the background clipping, the color needs to be transparent.  First off, that pretty much ruins any other browser from displaying text.  So this is only useful to Safari users (not even the iPhone currently supports it).  In Photoshop, you can get around having a transparent color and still having a drop shadow by setting that layers Fill Opacity to 0% while the layers opacity at 100%.</p>
<p>Also, using this technique has some odd behavior with padding. In my example, I couldn’t set padding to the parent div without the effect inheriting that padding.  Restating the padding didn’t affect it either.</p>
<p>Here is the example: <a href='http://www.martinilab.com/blog/wp-content/uploads/2009/05/webkit-background-clip.html'>webkit-background-clip.html</a></p>
<p>Now, you can add the <code>-webkit-text-stroke</code> and that will work with <code>text-shadow</code>, but only on the stroke and not the text.  I’ve yet to find an example that uses all three without looking like one of Superjail’s Doctor’s <a href=" http://superjail.wordpress.com/2008/10/13/specimen-7/">genetic experiments</a>.</p>
<p>Perhaps it is for the best, getting these to work together might have been the next <code>blink</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/91/webkit-background-clip-problem/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Twitshirt = Me all over your chest</title>
		<link>http://www.martinilab.com/blog/83/twitshirt-me-all-over-your-chest/</link>
		<comments>http://www.martinilab.com/blog/83/twitshirt-me-all-over-your-chest/#comments</comments>
		<pubDate>Thu, 07 May 2009 18:55:20 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=83</guid>
		<description><![CDATA[Some of the things best left unsaid, yet said anyway, have ways of coming back to haunt you. But at least you get a $1 commision from it. Twitshirts by Amboy00 (that&#8217;s me!)]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.martinilab.com/blog/wp-content/uploads/2009/05/twitshirt.jpg" alt="twitter tee shirt caption" title="twitshirt" width="401" height="209" class="size-full wp-image-82" /><br />
Some of the things best left unsaid, yet said anyway, have ways of coming back to haunt you.  But at least you get a $1 commision from it.</p>
<p><a href="http://twitshirt.com/amboy00">Twitshirts by Amboy00</a> (that&#8217;s me!)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/83/twitshirt-me-all-over-your-chest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tackling Safari&#8217;s slow gif &#8220;feature&#8221; with jQuery</title>
		<link>http://www.martinilab.com/blog/75/tackling-safaris-slow-gif-feature-with-jquery/</link>
		<comments>http://www.martinilab.com/blog/75/tackling-safaris-slow-gif-feature-with-jquery/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 23:19:36 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=75</guid>
		<description><![CDATA[Safari&#8217;s WebKit has a funny behavior of displaying animated gif files at a lower frame rate than Firefox. From what I can tell, WebKit (including Google Chrome) caps the animated gif frame rates at 10fps. While it may be faster &#8230; <a href="http://www.martinilab.com/blog/75/tackling-safaris-slow-gif-feature-with-jquery/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Safari&#8217;s WebKit has a funny behavior of displaying animated gif files at a lower frame rate than Firefox. From what I can tell, WebKit (including Google Chrome) caps the animated gif frame rates at 10fps. While it may be faster than some IE6 browsers, it&#8217;s not exactly helpful for those files with higher frame rates.</p>
<p>For example, the popular ajax loader file that hails from Apple&#8217;s own <a href="http://developer.apple.com/documentation/userexperience/Conceptual/AppleHIGuidelines/XHIGControls/XHIGControls.html">asynchronous progress indicator</a>, has 12 points and loops around once a second.  Well, for one thing, 12fps is really choppy (so I&#8217;ve <a href="http://www.martinilab.com/blog/pages/animatedgif/images/ajax-loader.gif">made</a> the fading spokes a little more smoother at 24pfs), but it already plays slower on Apple&#8217;s nifty browser.</p>
<h2>jQuery to the rescue</h2>
<p>Did you know that jQuery can control css background positions? Are you thinking what I&#8217;m thinking?<br />
<span id="more-75"></span></p>
<h2>But first, back to drawing board</h2>
<p>So the first part was to break up the animated gif frames and spread them out across a very long canvas. Since Photoshop no longer opens animated gif files (unless you own ImageReady somewhere), Fireworks can open the file. Use Fireworks to export the frames to individual files and THEN Photoshop can import all the files as a stack.</p>
<p>File &gt; Scripts &gt; Load Files into Stack&#8230;</p>
<p>For our ajax loader, expand all the layers next to each other and then save it out to its own gif.  The file size won&#8217;t be that difference in fact.<br />
<div id="attachment_76" class="wp-caption alignnone" style="width: 310px"><a href="http://www.martinilab.com/blog/wp-content/uploads/2009/04/gif-expanded.png"><img src="http://www.martinilab.com/blog/wp-content/uploads/2009/04/gif-expanded-300x29.png" alt="All of the frames set side by side" title="gif-expanded" width="300" height="29" class="size-medium wp-image-76" /></a><p class="wp-caption-text">All of the frames set side by side</p></div></p>
<h2>Now let&#8217;s get back to jQuery</h2>
<p>In our html, just set the div with a width and height to match your gif to prevent clipping and let the script do the rest.</p>
<pre lang="javascript" line="1">
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script>
$(document).ready(function(){
	var bgimage = 'url(images/ajax-loader-long.gif)';
	var frames = 24;
	var mpf = parseInt(1000/frames)  // how many miliseconds in each frame
	var currentFrame = 0;
	var offset = 0;

	$('.animate').css('background-image', bgimage);

	function animate() {
		offset = currentFrame * 64;
		$('.animate').css('background-position', '-' + offset + 'px 0px');
		currentFrame = (currentFrame == frames) ? 1 : currentFrame + 1;
	}

	setInterval(animate, mpf);
});
</script>
</pre>
<p>Now we have a script that will snap the position of the background over each &#8220;frame&#8221; at the correct frame rate. Actually, the frame rate is not divisible by 1000, but it&#8217;s close and it&#8217;s not like you could tell.</p>
<p>The only problem with this script is that it&#8217;s constantly running. If you look at the page in Firebug, your going to see the code whipping around with new values all the time. Annoying! Also, chances are your page isn&#8217;t going to need some animation playing constantly. Ajax loaders are intermittently called when a simple action is called as a&#8230; asynchronous progress indicator! Who knew.</p>
<p>So we&#8217;re going to put in a cancel command to this script: <strong>clearTimeout</strong>.</p>
<pre lang="javascript" line="1">
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script>
$(document).ready(function(){
	var bgimage = 'url(images/ajax-loader-long.gif)';
	var frames = 24;
	var mpf = parseInt(1000/frames)  // how many miliseconds in each frame
	var currentFrame = 0;
	var offset = 0;
	var runAnimate = 0;

	$('.animate').css('background-image', bgimage);

	function animate() {
		offset = currentFrame * 64;
		$('.animate').css('background-position', '-' + offset + 'px 0px');
		currentFrame = (currentFrame == frames) ? 1 : currentFrame + 1;
	}

	runAnimate = setInterval(animate, mpf);

	$('.animate').toggle(
		function () {
			clearTimeout(runAnimate);
		},
		function () {
			runAnimate = setInterval(animate, mpf);
		}
	);
});
</script>
</pre>
<p>Add in a toggle so show how to turn on and off the animation and were done.</p>
<p>It even works on ie6!</p>
<p>Take a look!  <a href="http://www.martinilab.com/blog/pages/animatedgif/animatedgif.html">example</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/75/tackling-safaris-slow-gif-feature-with-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
