<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Joe Critchley</title>
	
	<link>http://joecritchley.com/articles</link>
	<description>Articles on HTML5, CSS3 &amp; JS</description>
	<lastBuildDate>Fri, 20 Apr 2012 13:52:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/joecritchley/articles" /><feedburner:info uri="joecritchley/articles" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>UUIs – An interface for the Web?</title>
		<link>http://feedproxy.google.com/~r/joecritchley/articles/~3/DOt23zrf1zE/</link>
		<comments>http://joecritchley.com/articles/uuis/#comments</comments>
		<pubDate>Fri, 20 Apr 2012 13:52:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://joecritchley.com/articles/?p=151</guid>
		<description><![CDATA[We&#8217;re in a heated and prolonged state, where the return of native apps is inspiring both end-users and creative developers, but is also damaging the Web&#8217;s freedom. The &#8216;Web vs. Native&#8217; argument shouldn&#8217;t exist. We should be working on a &#8230; <a href="http://joecritchley.com/articles/uuis/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re in a heated and prolonged state, where the return of native apps is inspiring both end-users and creative developers, but is also damaging the Web&#8217;s freedom.</p>
<p>The &#8216;Web vs. Native&#8217; argument shouldn&#8217;t exist. We should be working on a unified solution, mixing the visibility of the Web with the raw power of native applications.</p>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/joecritchley/articles/~4/DOt23zrf1zE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://joecritchley.com/articles/uuis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://joecritchley.com/articles/uuis/</feedburner:origLink></item>
		<item>
		<title>Digital Limbo: Part 1 – Our Situation</title>
		<link>http://feedproxy.google.com/~r/joecritchley/articles/~3/WYesC1DBZpA/</link>
		<comments>http://joecritchley.com/articles/digital-limbo-part-1/#comments</comments>
		<pubDate>Sun, 18 Mar 2012 14:23:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://joecritchley.com/articles/?p=145</guid>
		<description><![CDATA[Web apps and native apps aren&#8217;t good enough on their own, and it&#8217;s up to interaction designers &#38; problem solvers to rise above this.]]></description>
			<content:encoded><![CDATA[<p><em>Web apps and native apps aren&#8217;t good enough on their own, and it&#8217;s up to interaction designers &amp; problem solvers to rise above this.</em></p>
<img src="http://feeds.feedburner.com/~r/joecritchley/articles/~4/WYesC1DBZpA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://joecritchley.com/articles/digital-limbo-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://joecritchley.com/articles/digital-limbo-part-1/</feedburner:origLink></item>
		<item>
		<title>Making it LESS painful.</title>
		<link>http://feedproxy.google.com/~r/joecritchley/articles/~3/9AC500bRnpE/</link>
		<comments>http://joecritchley.com/articles/making-it-less-painful/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 15:34:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://joecritchley.com/articles/?p=135</guid>
		<description><![CDATA[I&#8217;ve been dabbling with LESS recently, and at first, I hated it. But now I&#8217;m slowly converting, and here&#8217;s a few quick technical and convention-based tips, to hopefully reduce its PITA levels. Reverse scoping This is a feature that&#8217;s explicitly &#8230; <a href="http://joecritchley.com/articles/making-it-less-painful/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been dabbling with LESS recently, and at first, I hated it. But now I&#8217;m slowly converting, and here&#8217;s a few quick technical and convention-based tips, to hopefully reduce its PITA levels.</p>
<p><span id="more-135"></span></p>
<hr />
<h2>Reverse scoping</h2>
<p>This is a feature that&#8217;s explicitly documented for SASS, but it&#8217;s also possible with LESS. The &amp; operator can be used to reverse the scope of the selector:</p>
<p><script src="https://gist.github.com/1723922.js?file=gistfile1.css"></script> Unfortunately, you are limited to just adding something before   or after the parent selector (i.e. you can&#8217;t intercept the selector half-way through), but it&#8217;s extremely useful in most situations. Especially for Modernizr, as you can see!</p>
<hr />
<p>&nbsp;</p>
<h2>CSS3 Mixin trick</h2>
<p>I know a lot of people use the Compass framework, but I think something like that is overkill. Here&#8217;s how I write CSS3 properties that have multiple values:  <script src="https://gist.github.com/1723939.js?file=gistfile1.css"></script></p>
<hr />
<h2>Readability</h2>
<p>I think LESS&#8217;s main drawback is readability. To allieviate this issue, I have gone away from my normal method of CSS formatting, and tried to follow these conventions:</p>
<ul>
<li><strong>- Use simple comment-drive dividers before any nested selectors that are targetting a <em>different</em> element.</strong></li>
<li><strong>- Whenever possible, place the selectors which are <em>directly modifying</em> the parent element at the top of the nest.</strong></li>
<li><strong>- Avoid resorting to single-line selectors within nested selectors. Keep everything constant.</strong> (… unless it&#8217;s a &#8216;dictionary&#8217; of modifications, such as a heavy list of different background colours)</li>
</ul>
<p>Here&#8217;s a quick example:</p>
<p><script src="https://gist.github.com/1723951.js?file=gistfile1.css"></script></p>
<hr />
<h2>Semantic grid</h2>
<p>I eventually got round to trying Semantic.gs on a project, and it&#8217;s great! I&#8217;ve always been an advocate of rapid prototyping with column classes on elements, but this now means there is literally no need for it.</p>
<p>It has got a few niggles, for example .push and .pull don&#8217;t always work on nested fluid grids, but the amount of coding you save negates that anyway.</p>
<p>Go to <a href="http://semantic.gs">http://semantic.gs</a> for more information.</p>
<img src="http://feeds.feedburner.com/~r/joecritchley/articles/~4/9AC500bRnpE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://joecritchley.com/articles/making-it-less-painful/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://joecritchley.com/articles/making-it-less-painful/</feedburner:origLink></item>
		<item>
		<title>My design/dev Picks – (2012 so far)</title>
		<link>http://feedproxy.google.com/~r/joecritchley/articles/~3/XWJNnQZJE1Y/</link>
		<comments>http://joecritchley.com/articles/picks-jan-2012/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 18:09:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://joecritchley.com/articles/?p=126</guid>
		<description><![CDATA[Whilst spending a week on the pistes in Andorra, I kept track of a few of the latest goings-on on the web. Due to a lack of Mac, I saved most of them to read when I arrived back in &#8230; <a href="http://joecritchley.com/articles/picks-jan-2012/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>Whilst spending a week on the pistes in Andorra, I kept track of a few of the latest goings-on on the web. Due to a lack of Mac, I saved most of them to read when I arrived back in the UK. And I was actually surprised to see what a kick-start 2012 has had so far.<span id="more-126"></span></em></p>
<p>Here&#8217;s a few nuggets that are definitely worth checking out:</p>
<h2><a href="http://www.youtube.com/watch?v=sXqXpwyBI1k" target="_blank">The UI for Scorekeeper</a></h2>
<p>This is just beautiful to look at &#8211; to the point where I almost want a PlayBook. The transitions are extremely user friendly: for example, any designed information is persistent, i.e. it stays on the screen throughout scenes, if it makes sense to do so. I think this is something that is often overlooked in UI design (particularly on the web).</p>
<hr />
<h2><a href="http://jsdo.it/hidetaro7/CSS3MatrixMapping_new" target="_blank">CSS3 Matrix Mapping </a></h2>
<p>I was starting to think that people had stopped playing around with CSS3 transforms for a while, until this turned up. I think it would be interesting to see the Matrix used for 3D transition effects. It runs very smoothly.</p>
<hr />
<h2><a href="http://snook.ca/archives/javascript/preparetransition-jquery-plugin" target="_blank">jQuery prepareTransition plugin</a></h2>
<p>The idea of this jQuery plugin is fairly simple, but it&#8217;s an intuitive way of keeping your JavaScript as DRY as possible when animating using CSS3. It essentially toggles a class when an element is transitioning.</p>
<hr />
<h2><a href="http://www.joezimjs.com/projects/publish-subscribe-jquery-plugin/" target="_blank">jQuery Publish/Subscribe plugin</a></h2>
<p>I&#8217;ve got to admit, the concept of pub-sub is fairly new to me, but this plugin seems like a great way to get learning the asynchronous pattern.</p>
<hr />
<h2><a href="http://kippt.com/" target="_blank">Kippt - online bookmarking</a></h2>
<p>God knows how many online bookmarking services there are out there, but this one has been catching the attention of a few people this week, and I&#8217;m guessing it&#8217;s mainly down to it&#8217;s UI not being a piece of turd *cough*<em>Pinboard</em>*cough*.</p>
<hr />
<h2><a href="http://getkirby.com/" target="_blank">Kirby - a file-based CMS</a></h2>
<p>When I first saw this, I thought it was going to be some kind of retro SQLite mashup, but this &#8216;NoDB&#8217; CMS actually seems pretty fresh. The jQuery-style API looks interesting too.</p>
<hr />
<p>That&#8217;s what a week of the web looks like in 2012! Hectic, but creative nonetheless <img src='http://joecritchley.com/articles/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/joecritchley/articles/~4/XWJNnQZJE1Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://joecritchley.com/articles/picks-jan-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://joecritchley.com/articles/picks-jan-2012/</feedburner:origLink></item>
		<item>
		<title>Why circles are inside-out</title>
		<link>http://feedproxy.google.com/~r/joecritchley/articles/~3/pEobG5Yd4JQ/</link>
		<comments>http://joecritchley.com/articles/why-circles-are-inside-out/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 16:04:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://joecritchley.com/articles/?p=115</guid>
		<description><![CDATA[Google seems to be touting the idea of &#8220;circles&#8221; quite a lot recently, and Facebook quickly responded with making its lists more integrated and easier to use. But from the day this concept was announced, I&#8217;ve thought it was flawed. &#8230; <a href="http://joecritchley.com/articles/why-circles-are-inside-out/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Google seems to be touting the idea of &#8220;circles&#8221; quite a lot recently, and Facebook quickly responded with making its lists more integrated and easier to use. But from the day this concept was announced, I&#8217;ve thought it was flawed.</p>
<p><span id="more-115"></span></p>
<p>Admittedly, it&#8217;s useful if you definitely want to *hide* content from certain users. But seriously, how often do you want to do that? It&#8217;s not that often that you want to slag your new boss off… surely?</p>
<p><a href="http://joecritchley.com/articles/wp-content/uploads/2011/12/circle1.png"><img class="alignnone size-full wp-image-117" title="circle1" src="http://joecritchley.com/articles/wp-content/uploads/2011/12/circle1.png" alt="" width="642" height="200" /></a></p>
<hr />
<h2>Circles should be collaborative, subscribable spaces.</h2>
<p><a href="http://joecritchley.com/articles/wp-content/uploads/2011/12/circle2.png"><img class="alignnone size-full wp-image-118" title="circle2" src="http://joecritchley.com/articles/wp-content/uploads/2011/12/circle2.png" alt="" width="642" height="200" /></a></p>
<p>I&#8217;m Joe, and I&#8217;m interested in UI design, inspirational talks and snowboarding; but I can&#8217;t stand that hipster-looking photography that&#8217;s as common as muck. And I really want to follow Dave the Rails developer. The only problem is, he uses Instagram a bit too much.</p>
<p>But what if all our favourite apps out there had a standard format for only subscribing to certain topics (whether it&#8217;s a service, hashtag, etc.) from a particular user? That means I could pick-up all the latest Rails advice; whilst letting him live his hipster lifestyle for a few more months. Everyone&#8217;s a winner.</p>
<hr />
<h2>No more blacklists.</h2>
<p>I know that certain third-party apps, like TweetDeck, let you &#8220;mute&#8221; content from services and hashtags. But that&#8217;s such a negative way of looking at the freedom of content. We all know what we want.</p>
<hr />
<p>I&#8217;ll leave you with this thought, and maybe even you&#8217;ll go off to build the next Twitter. But I&#8217;d rather Twitter and Facebook read this instead, came up with an open standard, and we all lived happily ever after.</p>
<p>Either way &#8211; I&#8217;m off to party on a school night.</p>
<img src="http://feeds.feedburner.com/~r/joecritchley/articles/~4/pEobG5Yd4JQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://joecritchley.com/articles/why-circles-are-inside-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://joecritchley.com/articles/why-circles-are-inside-out/</feedburner:origLink></item>
		<item>
		<title>My state with everyday apps</title>
		<link>http://feedproxy.google.com/~r/joecritchley/articles/~3/AJvBYu96GkE/</link>
		<comments>http://joecritchley.com/articles/my-state-with-everyday-apps/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 17:35:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://joecritchley.com/articles/?p=105</guid>
		<description><![CDATA[.content ul li { list-style: circle; } .content ul li li { list-style: disc; } .content ul { list-style: circle; padding-left: 30px; } .content ul ul { list-style: disc; } I really need to sort my workflow with everyday technology. &#8230; <a href="http://joecritchley.com/articles/my-state-with-everyday-apps/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<style>.content ul li { list-style: circle; } .content ul li li { list-style: disc; } .content ul { list-style: circle;  padding-left: 30px;  } .content ul ul { list-style: disc; }</style>
<p>I really need to sort my workflow with everyday technology. The fact that I’ve even wrote this kind of document assures that I’m going insane with it all. So, I figured I&#8217;d share my notes&#8230;<span id="more-105"></span></p>
<hr />
<p><strong>GTD &amp; Notes</strong></p>
<ul>
<li>Reminders on iOS is absolutely shocking.
<ul>
<li>Things is a lot better. I think I&#8217;ll move back</li>
</ul>
</li>
<li>I often still reside to use the Notes app on iOS. But I feel like these are so enclosed.
<ul>
<li>Yet, EverNote looks a bit heavy.</li>
<li>Need a better, lightweight option.</li>
</ul>
</li>
</ul>
<p><strong>Consuming content</strong></p>
<ul>
<li>Flipboard is absolutely awesome for reading.
<ul>
<li>I need to see if I can get BBC News onto Flipbord</li>
<li>I need a proper newspaper that I can read, but something that can be integrated into Flipboard &#8211; The Guardian?</li>
</ul>
</li>
</ul>
<p><strong>Movies</strong></p>
<ul>
<li>I&#8217;ve recently built up a habit of using IMDB for reviewing films. But I feel like nothing is being done with this data to any extent.</li>
<li>Flixster feels more social, but its UI is extremely amateurish.</li>
<li>Can IFTTT sync both of these services??</li>
</ul>
<p><strong>Social</strong></p>
<ul>
<li>Forrst is ok. Maybe I should just take the RSS feeds and use them for regular use (and then just post to Forrst when I&#8217;ve got something to share)</li>
<li>52Network has potential.</li>
<li>Google+ is just shit (apart from the stuff that Paul Irish puts on it.)
<ul>
<li>Is there any way I can delete this, whilst still retaining my Google Profile?</li>
</ul>
</li>
<li>Massively intrigued by Path , but my network doesn&#8217;t seem to span it. Plus, I quite like the Facebook timeline, and I&#8217;m happy with keeping my Facebook network quite small.</li>
<li>I don&#8217;t have the passion to take pictures, so Instagram really isn&#8217;t for me. But I do like seeing photos that people take sometimes. (As long as they dont use that crap tilt-shift lens)</li>
<li>Twitter is still top priority for inspiration and news
<ul>
<li>Do I need to start following more people?</li>
</ul>
</li>
</ul>
<p><strong>Music</strong></p>
<ul>
<li>I&#8217;ve now got iTunes Match &#8211; will feels pretty good so far.
<ul>
<li>I like the AppleTV integration</li>
<li>The fact that you have to clear your current music sync from any iOS devices if you want it to use Match is ridiculous.</li>
</ul>
</li>
<li>Spotify Premium still rules for me.
<ul>
<li>I just wish you can bookmark albums on it.</li>
</ul>
</li>
<li>It&#8217;s an absolute shame that these two services are two different beings.</li>
</ul>
<p><strong>Bookmarking</strong></p>
<ul>
<li>I need a service for my bookmarks.
<ul>
<li>Pinboard looks a lot better than Delicious these days. This can be then hooked up to TweetBot.</li>
<li>I&#8217;ll just use Chrome Bookmarks for regular use sites.</li>
</ul>
</li>
</ul>
<p><strong>Writing</strong></p>
<ul>
<li>I’ve just come across another major issue.
<ul>
<li>I really enjoy writing in IA Writer. But then I came to share this document.
<ul>
<li>Ended up reformatting the whole thing in Google Docs!!!</li>
<li>And then again for WordPress. (Just because I changed my mind!)</li>
</ul>
</li>
<li>Is there any way to share Markdown documents on the Web? (Without using a static generator)</li>
</ul>
</li>
</ul>
<hr />
<p><strong>As an aside, I think it&#8217;s staggering that we actually use all these services. We must be able to do something about it, and converge these apps into ‘patterns’.</strong></p>
<img src="http://feeds.feedburner.com/~r/joecritchley/articles/~4/AJvBYu96GkE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://joecritchley.com/articles/my-state-with-everyday-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://joecritchley.com/articles/my-state-with-everyday-apps/</feedburner:origLink></item>
		<item>
		<title>Responding to Responsive Web Design</title>
		<link>http://feedproxy.google.com/~r/joecritchley/articles/~3/uyEwnL9gc-4/</link>
		<comments>http://joecritchley.com/articles/responding-to-responsive-design/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 18:06:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://joecritchley.com/articles/?p=102</guid>
		<description><![CDATA[&#8216;Responsive Web Design&#8217; has started to shape the way designers and developers create sites and applications. I&#8217;ve often heard it mentioned in meetings with clients; explaining it as a lever for fundamental design decisions. But I now feel like it&#8217;s &#8230; <a href="http://joecritchley.com/articles/responding-to-responsive-design/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&#8216;Responsive Web Design&#8217; has started to shape the way designers and developers create sites and applications. I&#8217;ve often heard it mentioned in meetings with clients; explaining it as a lever for fundamental design decisions.</p>
<p>But I now feel like it&#8217;s time for it to evolve into something else entirely.</p>
<img src="http://feeds.feedburner.com/~r/joecritchley/articles/~4/uyEwnL9gc-4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://joecritchley.com/articles/responding-to-responsive-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://joecritchley.com/articles/responding-to-responsive-design/</feedburner:origLink></item>
		<item>
		<title>Young people in the digital industry</title>
		<link>http://feedproxy.google.com/~r/joecritchley/articles/~3/2BgUVtizAAs/</link>
		<comments>http://joecritchley.com/articles/young-people-digital-industry/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 18:04:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://joecritchley.com/articles/?p=100</guid>
		<description><![CDATA[Our industry is thriving with young, talented designers &#38; developers at the moment. (By young, I&#8217;m referring to people who are thinking of going into it full-time) The only problem is, I feel like not enough advice is given out &#8230; <a href="http://joecritchley.com/articles/young-people-digital-industry/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Our industry is thriving with young, talented designers &amp; developers at the moment. (By young, I&#8217;m referring to people who are thinking of going into it full-time) The only problem is, I feel like not enough advice is given out these guys, so I&#8217;ve tried to alleviate that…</p>
<img src="http://feeds.feedburner.com/~r/joecritchley/articles/~4/2BgUVtizAAs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://joecritchley.com/articles/young-people-digital-industry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://joecritchley.com/articles/young-people-digital-industry/</feedburner:origLink></item>
		<item>
		<title>CSS Techniques: September Roundup</title>
		<link>http://feedproxy.google.com/~r/joecritchley/articles/~3/fMrjwsdWdrY/</link>
		<comments>http://joecritchley.com/articles/css-techniques/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 13:07:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://joecritchley.com/articles/?p=75</guid>
		<description><![CDATA[As well as settling into my new job in at Made by Many, this month has been about creating some very small CSS tricks (as opposed to any big front-end experiments). Unfortunately, I&#8217;ve posted them in a few different places; &#8230; <a href="http://joecritchley.com/articles/css-techniques/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As well as settling into my new job in at Made by Many, this month has been about creating some very small CSS tricks (as opposed to any big front-end experiments). Unfortunately, I&#8217;ve posted them in a few different places; so I thought I would summarise them, and explain them in a bit more depth.</p>
<p><span id="more-75"></span></p>
<hr />
<h2>Masked dividers</h2>
<p><a target="_blank" href="http://jsfiddle.net/joecritch/NU7pq/"><img src="http://joecritchley.com/articles/wp-content/uploads/2011/09/Screen-shot-2011-09-11-at-13.23.43.png" alt="" title="Screen shot 2011-09-11 at 13.23.43" width="563" height="340" class="alignnone size-full wp-image-78" /><br />
View on JS Fiddle<br />
</a></p>
<p>An extremely common design technique is to make a heading with a mask on a divider. Yet admittedly, I&#8217;ve always struggled to think of how to do this in CSS. Turns out, it&#8217;s actually quite easy, and well supported in browsers.</p>
<p>First of all, the H2 element is displayed as &#8216;inline-block&#8217;, which allows us to center a block-level element, but still have a flexible width. Then, it uses both the :before and :after pseudo elements, to create a border effect, placed on the left:0 and right:0, respectively. Each of these elements is &#8216;stretched&#8217; out as far as possible using a negative margin, and an equal-unit padding.</p>
<p>You could take it even further and use background images, or whatever. </p>
<hr />
<h2>Rolling text effect</h2>
<p><a href="http://cssdesk.com/ZE73H" target="_blank"><img src="http://joecritchley.com/articles/wp-content/uploads/2011/09/Screen-shot-2011-09-11-at-13.27.32.png" alt="" title="Screen shot 2011-09-11 at 13.27.32" width="608" height="338" class="alignnone size-full wp-image-81" /><br />
View on CSS Desk<br />
</a></p>
<p>Something that I&#8217;d always wanted to achieve (but only in a clean fashion), was the rolling effect on text, which was often found on Flash website navigation items. I still think this effect looks awesome, and it&#8217;s now just as fast and effective with CSS3. </p>
<p>This is very much a &#8216;trick&#8217;. It makes use of both the &#8216;top&#8217; and &#8216;margin-top&#8217; property, on the relatively positioned anchors. Here&#8217;s how it works:</p>
<ol>
<li>1. The top margin is transitioned so that the text falls off the navigation. This takes 0.3 seconds</li>
<li>2. When that transition is half-way through (so it&#8217;s only <em>just</em> out of sight, the top property flicks (without a transition duration)  to the text is still out of sight, but on the upper side instead.</li>
<li>3. The top margin transition finishes, so that the text appears to be in the same place as where it started.</li>
<li>4. The transition is only applied to when you mouse-over, so when you mouse-out, it flicks back to its original state. But because this original state looks exactly the same as when the transition ended, the user doesn&#8217;t notice!</li>
</ol>
<p>The finishing touch comes with how fast the transition is, and what kind of easing is used. It wouldn&#8217;t work the same without those settings, in my opinion.</p>
<hr />
<h2>Creating friction with 3D CSS</h2>
<p><a href="/demos/fancy-pants" target="_blank"><img src="http://joecritchley.com/articles/wp-content/uploads/2011/09/Screen-shot-2011-09-11-at-13.45.23.png" alt="" title="Screen shot 2011-09-11 at 13.45.23" width="448" height="361" class="alignnone size-full wp-image-86" /><br />
View demo</a></p>
<p>This one is a bit harder to explain, as it&#8217;s not just CSS3. But it wouldn&#8217;t be possible without 3D transforms. I&#8217;ve recently being looking into basic physics for animation, and one of the most effective ones for &#8216;drag and drop&#8217; is adding friction to your objects. It&#8217;s a simple calculation, but it took me a while to get my head around. </p>
<p>The idea is that you&#8217;re constantly calculating the different of the current &#8216;x&#8217;, and the cursor&#8217;s position. This is now made possible by the supposedly lightweight &#8216;requestAnimationFrame&#8217; function, which in my implementation uses the &#8216;tick&#8217; function as a callback for this. Both the translate AND rotate make use of the delay. So if you move the cursor really fast, the object will look like it&#8217;s being &#8220;dragged&#8221;, as it rotates more than usual.</p>
<p>A few tips when working with 3D CSS transforms:</p>
<ol>
<li>1.  Try and separate your transforms between different elements. As far as I know, it alleviates any browser strain when you&#8217;re translating with the parent, and moving with the child element. I may be wrong, but this is what I&#8217;ve found from my experiences.</li>
<li>2. Rounding a pixel value, using a double bitwise operator (~~), actually smoothens out animation.</li>
<li>3. Applying a subtle box shadow will give the effect of an anti-aliased object. This does have an impact on performance sometimes, so be careful.</li>
</ol>
<hr />
<p>That&#8217;s everything for now. If this has inspired you to produce something else, I would love to hear about it! </p>
<img src="http://feeds.feedburner.com/~r/joecritchley/articles/~4/fMrjwsdWdrY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://joecritchley.com/articles/css-techniques/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://joecritchley.com/articles/css-techniques/</feedburner:origLink></item>
		<item>
		<title>DRY Chaining with jQuery</title>
		<link>http://feedproxy.google.com/~r/joecritchley/articles/~3/L5FjV4TZNXg/</link>
		<comments>http://joecritchley.com/articles/dry-chaining-jquery/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 11:21:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://joecritchley.com/articles/?p=62</guid>
		<description><![CDATA[Here&#8217;s a very quick idea for applying the DRY (Don&#8217;t Repeat Yourself) pattern to jQuery selectors. By no means is it a complex idea, and it might already be possible via another method, but it&#8217;s helping me optimise my JavaScript. &#8230; <a href="http://joecritchley.com/articles/dry-chaining-jquery/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a very quick idea for applying the DRY (Don&#8217;t Repeat Yourself) pattern to jQuery selectors. By no means is it a complex idea, and it might already be possible via another method, but it&#8217;s helping me optimise my JavaScript.</p>
<p><strong style="background-color: yellow;">Update: It turns out that jQuery does have this functionality built-in. When using the &#8216;toggle&#8217; and &#8216;<a href="http://api.jquery.com/toggleClass/">toggleClass</a>&#8216; methods, you can choose to override it with the &#8216;switch&#8217; parameter. Every day is a school day! I still think the principle of this code is one to think about.</strong></p>
<p><span id="more-62"></span></p>
<p>The origin of jQuery&#8217;s beautiful design mostly comes from chaining selectors. Unfortunately, chaining becomes a lot harder to achieve when conditional statements get involved. Here&#8217;s some code that I would often find myself writing:</p>
<p><script src="https://gist.github.com/1117951.js?file=gistfile1.js"></script></p>
<p>This is what I would call &#8216;wet&#8217; code. Everything that&#8217;s important (the selectors and its related methods) is repeated, using a conditional statement. The main problem lies in that jQuery doesn&#8217;t see &#8216;show&#8217; or &#8216;addClass&#8217; as TRUE; not does it see &#8216;hide&#8217; and &#8216;removeClass&#8217; as FALSE.  Luckily, &#8216;showIt&#8217; is a boolean, and we can use this to our advantage. Here&#8217;s two helper plugins I&#8217;ve made to keep your jQuery chaining in shape. </p>
<p><script src="https://gist.github.com/1117959.js?file=gistfile1.js"></script></p>
<p>So with this little bit of extra helper code, we can achieve the following:</p>
<p><script src="https://gist.github.com/1117962.js?file=gistfile1.js"></script></p>
<p>It might not be quite as readable, but I think it&#8217;s important to make jQuery&#8217;s common DOM methods &#8216;boolean&#8217; based.</p>
<img src="http://feeds.feedburner.com/~r/joecritchley/articles/~4/L5FjV4TZNXg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://joecritchley.com/articles/dry-chaining-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://joecritchley.com/articles/dry-chaining-jquery/</feedburner:origLink></item>
	</channel>
</rss>

