<?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>Damian Nicholson &#187; CSS</title>
	<atom:link href="http://damiannicholson.com/posts/category/css/feed" rel="self" type="application/rss+xml" />
	<link>http://damiannicholson.com</link>
	<description>Another opinionated web developer sharing his thoughts</description>
	<lastBuildDate>Wed, 14 Apr 2010 21:20:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Internet Explorer Stylesheet Limit</title>
		<link>http://damiannicholson.com/posts/internet-explorer-stylesheet-limit</link>
		<comments>http://damiannicholson.com/posts/internet-explorer-stylesheet-limit#comments</comments>
		<pubDate>Mon, 21 Dec 2009 09:30:11 +0000</pubDate>
		<dc:creator>Damian</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://damiannicholson.com/?p=208</guid>
		<description><![CDATA[Did you know that IE ignores all style tags after the first 30 requests?
This had me scratching my head last week as I couldn&#8217;t fathom out why certain styles weren&#8217;t being applied to a lightbox in Internet Explorer, but were working just fine in all other browsers.
I figure IE  inconsistencies like the double margin bug, [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter size-full wp-image-214" title="Confused Bush" src="http://damiannicholson.com/wp-content/uploads/2009/12/Confused-Bush.jpg" alt="Confused Bush" width="400" height="321" /></p>
<p>Did you know that IE <a href="http://support.microsoft.com/kb/262161" onclick="pageTracker._trackPageview('/outgoing/support.microsoft.com/kb/262161?referer=');">ignores all style tags</a> after the first 30 requests?</p>
<p>This had me scratching my head last week as I couldn&#8217;t fathom out why certain styles weren&#8217;t being applied to a lightbox in Internet Explorer, but were working just fine in all other browsers.</p>
<p>I figure IE  inconsistencies like the <a href="http://www.positioniseverything.net/explorer/doubled-margin.html" onclick="pageTracker._trackPageview('/outgoing/www.positioniseverything.net/explorer/doubled-margin.html?referer=');">double margin bug</a>, <a href="http://24ways.org/2007/supersleight-transparent-png-in-ie6" onclick="pageTracker._trackPageview('/outgoing/24ways.org/2007/supersleight-transparent-png-in-ie6?referer=');">png fix</a> and <a href="http://brenelz.com/2009/02/03/squish-the-internet-explorer-z-index-bug/" onclick="pageTracker._trackPageview('/outgoing/brenelz.com/2009/02/03/squish-the-internet-explorer-z-index-bug/?referer=');">z-index issue</a> all to be common knowledge amongst web developers and designers. But why not this one? Surely the repercussions of this have more of a profound effect on a website?</p>
]]></content:encoded>
			<wfw:commentRss>http://damiannicholson.com/posts/internet-explorer-stylesheet-limit/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TextMate CSS Colour Picker</title>
		<link>http://damiannicholson.com/posts/textmate-css-colour-picker</link>
		<comments>http://damiannicholson.com/posts/textmate-css-colour-picker#comments</comments>
		<pubDate>Sun, 13 Dec 2009 22:25:30 +0000</pubDate>
		<dc:creator>Damian</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://damiannicholson.com/?p=197</guid>
		<description><![CDATA[Being a heavy mac user, I&#8217;m always in my favourite text editor &#8211; TextMate. Here&#8217;s a tip for when working with colour in a CSS file. This shortcut brings up a real handy colour picker.
⌘ + ⇧ + c
Once a colour has been selected, the corresponding hex code is placed at the current cursor position. [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter size-full wp-image-202" title="TextMate CSS Colour Picker" src="http://damiannicholson.com/wp-content/uploads/2009/12/Screen-shot-2009-12-13-at-22.04.07.png" alt="TextMate colour picker" width="358" height="378" /></p>
<p>Being a heavy mac user, I&#8217;m always in my favourite text editor &#8211; <a href="http://macromates.com/" onclick="pageTracker._trackPageview('/outgoing/macromates.com/?referer=');">TextMate</a>. Here&#8217;s a tip for when working with colour in a CSS file. This shortcut brings up a real handy colour picker.</p>
<p style="text-align: center;"><strong>⌘</strong> + <strong>⇧</strong> + <strong>c</strong></p>
<p>Once a colour has been selected, the corresponding hex code is placed at the current cursor position. Definately one worth knowing in my opinion!</p>
]]></content:encoded>
			<wfw:commentRss>http://damiannicholson.com/posts/textmate-css-colour-picker/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Abusing JavaScript Frameworks</title>
		<link>http://damiannicholson.com/posts/abusing-javascript-frameworks</link>
		<comments>http://damiannicholson.com/posts/abusing-javascript-frameworks#comments</comments>
		<pubDate>Thu, 03 Dec 2009 12:30:10 +0000</pubDate>
		<dc:creator>Damian</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://damiannicholson.com/?p=144</guid>
		<description><![CDATA[Tools like jQuery and MooTools make traversing and manipulating the DOM incredibly easy. So easy that you can get carried away with it sometimes. I have fallen down this trap more than once in my career as a web developer.
Here&#8217;s an excerpt from an article I stumbled across entitled Add Icons to External Links with [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.flickr.com/photos/publicenergy/1846375599/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/publicenergy/1846375599/?referer=');"><img class="aligncenter size-full wp-image-156" title="cow" src="http://damiannicholson.com/wp-content/uploads/2009/12/cow.jpg" alt="cow" width="500" height="357" /></a></p>
<p>Tools like <a href="http://jquery.com/" onclick="pageTracker._trackPageview('/outgoing/jquery.com/?referer=');">jQuery</a> and <a href="http://mootools.net/" onclick="pageTracker._trackPageview('/outgoing/mootools.net/?referer=');">MooTools</a> make traversing and manipulating the DOM incredibly easy. So easy that you can get carried away with it sometimes. I have fallen down this trap more than once in my career as a web developer.</p>
<p>Here&#8217;s an excerpt from an article I stumbled across entitled <em><a href="http://pinoytech.org/blog/post/Add-Icons-to-External-Links-with-Mootools-and-CSS" onclick="pageTracker._trackPageview('/outgoing/pinoytech.org/blog/post/Add-Icons-to-External-Links-with-Mootools-and-CSS?referer=');">Add Icons to External Links with Mootools and CSS</a></em>.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">window.<span style="color: #660066;">addEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'domready'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 $$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>link<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>link.<span style="color: #660066;">hostname</span> <span style="color: #339933;">!=</span> window.<span style="color: #660066;">location</span>.<span style="color: #660066;">host</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   link.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'external'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
 <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Pretty basic stuff &#8211; iterating through all the anchors on the page and adding a class if the current link goes to an external site.</p>
<p>Whether this is apparent to the author I don&#8217;t know, but the same effect can be achieved using <strong>only </strong><strong>CSS</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">a<span style="color: #00AA00;">&#91;</span>href<span style="color: #00AA00;">^=</span><span style="color: #ff0000;">'http://'</span><span style="color: #00AA00;">&#93;</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #808080; font-style: italic;">/* styling */</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><strong>Note:</strong> the solution I pointed out here isn&#8217;t anything new. <a href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors" onclick="pageTracker._trackPageview('/outgoing/www.w3.org/TR/CSS21/selector.html_attribute-selectors?referer=');">CSS attribute selectors</a> have been around since CSS2.1, and so are are supported in all major browsers bar <a href="http://www.bringdownie6.com/" onclick="pageTracker._trackPageview('/outgoing/www.bringdownie6.com/?referer=');">one</a>(no prizes for those who get this right).</p>
<p>Whilst this example is low impact, I&#8217;ve come to the conclusion that the underlying principle is one which creeps up on a lot designers and developers who get the JS fever.</p>
<blockquote>
<h3>JavaScript libraries are an easy  fall back for front-end problems which can&#8217;t be solved quickly.</h3>
</blockquote>
<p>My personal opinion to problems I can&#8217;t solve is that the use of JavaScript libraries should be a <em>last resort</em>.</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/torek/2467519466/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/torek/2467519466/?referer=');"><img class="aligncenter size-full wp-image-170" title="lazydog" src="http://damiannicholson.com/wp-content/uploads/2009/12/lazydog.jpg" alt="lazydog" width="450" height="300" /></a></p>
<p>Sometimes people are too lazy to tackle front-end problems head on. In my experience it&#8217;s worth the effort researching a possible solution, as it makes you think about the problem and  define it more clearly. Most of the time you find yourself in one of the following situations, none of which are bad.</p>
<ul>
<li>You&#8217;ve thought about it a bit and realise it&#8217;s very similar to a problem you&#8217;ve faced in the past.</li>
<li>You find an alternative, in which case you&#8217;ve learnt something new.</li>
<li>There isn&#8217;t an alternative, in which case you&#8217;ve picked up some new knowledge along the way and realised that your solution was optimal. Pat yourself on the back.</li>
</ul>
<h3>So what do you think?</h3>
]]></content:encoded>
			<wfw:commentRss>http://damiannicholson.com/posts/abusing-javascript-frameworks/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->