<?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>Chris Norton &#187; css</title>
	<atom:link href="http://www.chnorton.com.au/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chnorton.com.au</link>
	<description>A blog about software engineering, web development, education and my otaku interests.</description>
	<lastBuildDate>Wed, 16 Dec 2009 13:51:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Final Browser Updates of 2007</title>
		<link>http://www.chnorton.com.au/2007/12/25/final-browser-updates-of-2007/</link>
		<comments>http://www.chnorton.com.au/2007/12/25/final-browser-updates-of-2007/#comments</comments>
		<pubDate>Mon, 24 Dec 2007 16:21:17 +0000</pubDate>
		<dc:creator>Chris Norton</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ie8]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web browser]]></category>

		<guid isPermaLink="false">http://www.chnorton.com.au/2007/12/25/final-browser-updates-of-2007/</guid>
		<description><![CDATA[Some good news from browser makers today to put a cap on a great year for browser development and innovation.
First, IE8 will drop the use of hasLayout, meaning there should be a bit more consistency in renderings between browsers and less need to resort to conditional comments with IE-specific CSS. (It doesn&#8217;t help with current [...]]]></description>
			<content:encoded><![CDATA[<p>Some good news from browser makers today to put a cap on a great year for browser development and innovation.</p>
<p><span id="more-200"></span>First, IE8 will <a href="http://lists.w3.org/Archives/Public/www-style/2007Dec/0151.html" rel="external nofollow">drop the use of hasLayout</a>, meaning there should be a bit more consistency in renderings between browsers and less need to resort to conditional comments with IE-specific CSS. (<a href="http://msdn2.microsoft.com/en-us/library/bb250481.aspx" rel="external nofollow">It doesn&#8217;t help with current versions however.</a>)</p>
<p>Second, WebKit now includes an implementation of <a href="http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/" rel="external nofollow">getElementsByClassName</a>, joining Firefox 3 and the next Opera version for support for this highly desired function. Benchmarks are given which show the staggering speed increase on this common operation. You can <a href="http://ejohn.org/blog/getelementsbyclassname-speed-comparison/" rel="external nofollow">get some for Firefox 3</a> as well.</p>
<p>The WebKit guys especially seem to be keen to start pushing the limitations of current browsers so I think 2008 will be an exciting year.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chnorton.com.au/2007/12/25/final-browser-updates-of-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First impressions of ExtJS</title>
		<link>http://www.chnorton.com.au/2007/12/20/first-impressions-of-extjs/</link>
		<comments>http://www.chnorton.com.au/2007/12/20/first-impressions-of-extjs/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 08:41:34 +0000</pubDate>
		<dc:creator>Chris Norton</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.chnorton.com.au/2007/12/20/first-impressions-of-extjs/</guid>
		<description><![CDATA[I&#8217;ve recently been developing a web-based application (a RIA one might say) and, after initially trying to get it working right in jQuery, I decided to have a go at using ExtJS, a JavaScript library I&#8217;ve been meaning to try for a while. Basically, it is a JavaScript library that includes a ton of things [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently been developing a web-based application (a <abbr title="rich internet application">RIA</abbr> one might say) and, after initially trying to get it working right in <a href="http://jquery.com/" rel="external nofollow">jQuery</a>, I decided to have a go at using <a href="http://extjs.com/">ExtJS</a>, a JavaScript library I&#8217;ve been meaning to try for a while. Basically, it is a JavaScript library that includes a ton of things for building web application other libraries don&#8217;t &#8211; not surprising considering it started life as an add-on to <a href="http://developer.yahoo.com/yui/" rel="external nofollow">YUI</a>. Here is my initial impressions of it, most of which are direct comparisons to jQuery.</p>
<p><span id="more-197"></span>First of all, getting Ext running is slightly more complicated than getting jQuery running. jQuery is a simple matter of including jquery.js in your HTML and then writing your script. Ext requires first it&#8217;s own <abbr title="cascading style sheets">CSS</abbr> file, then an adapter which uses another library (jQuery, YUI or Prototype) but can also use the newish ext-base.js which doesn&#8217;t depend on external libraries, and finally you include ext.js itself. I went with the pure Ext solution but tried out the jQuery adapter and found it didn&#8217;t work for me &#8211; I&#8217;m sure I was doing something wrong but didn&#8217;t care enough to fix it and went back to Ext.</p>
<p>Secondly, Ext is rather huge. Not surprising considering what it can do but the whole thing (ext.js, ext-base.js and stylesheet) still comes in uncompressed at just over 512KB. Sorry, I should mention that that&#8217;s <em>with</em> Ext&#8217;s default minification &#8211; the debug versions are a bit over 1MB! In comparison, jQuery is roughly 70KB before any minification is applied. So what do you get for all this size? Quite a bit actually.</p>
<p>The customer info area of my application is designed with a list of customers on the left and an area for details on the right. With pure HTML and CSS a nice-looking layout here, similar to a desktop app, is really difficult to achieve. With Ext it&#8217;s almost trivial and you can use a logical declarative style of recursive JavaScript objects to define the layout &#8211; similar to how it would be done in Java Swing, for example. With Ext you can also easily get &#8220;bonus&#8221; features like resizable panes, content areas that adjust to the size of the viewport and a default style that looks pretty damned good (and you have to option of using different themes). Without any trouble I was able to get a simple list working which allows clicking on customer names to load their details asynchronously in the details panel, as well as allowing dynamic updates and the like. </p>
<p>The standard things that I use with jQuery &#8211; selectors and <abbr title="Asynchronous Javascript And XML">AJAX</abbr> support &#8211; are also well supported in Ext, even if they are slightly more verbose. Ext also includes a nifty feature in it&#8217;s simplistic load() method that allows you to set a loading message, something that I believe you have ot do manually in jQuery.</p>
<p>Ext also supports a wide range of widgets and the like out of the box. Data grids are all the rage now and Ext makes it simple to get them up and running. Tree views, buttons, colour pickers, date selectors and a bunch of others are provided as well. If there&#8217;s something missing you might be able to find a plugin for it.</p>
<p>Overall, I&#8217;m really enjoying working with Ext. It makes some fundamental yet complex things ridiculously easy and provides enough of a framework to get almost anything working with a bit of lateral thinking and liberal application of nested layouts and the like.</p>
<p>So I guess the obvious question now is if I prefer Ext or jQuery? Honestly, the two are just aimed at completely different areas. If you&#8217;re making a web site that needs some fancy JavaScript effects, a bit of AJAX and you want it to be light and accessible, then I&#8217;d say jQuery is the way to go. If you want a RIA with lots of advanced functionality and don&#8217;t care about those plebs who don&#8217;t have JavaScript then I&#8217;d say Ext is definitely the preferred option. If I had to pick I&#8217;d say I like jQuery a bit more since I prefer writing enhanced web sites rather than desktop application wannabes but this is really just a personal choice. Both libraries offer the same basic functionality and jQuery can certainly be extended to do pretty much what Ext does so choosing either will probably let you do what you want.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chnorton.com.au/2007/12/20/first-impressions-of-extjs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Site Upgrade: Wordpress 2.3</title>
		<link>http://www.chnorton.com.au/2007/09/25/site-upgrade-wordpress-23/</link>
		<comments>http://www.chnorton.com.au/2007/09/25/site-upgrade-wordpress-23/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 12:12:44 +0000</pubDate>
		<dc:creator>Chris Norton</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[site theme]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.chnorton.com.au/2007/09/25/site-upgrade-wordpress-23/</guid>
		<description><![CDATA[I have just finished upgrading this blog to Wordpress 2.3. As of now I have only completed the actual migration &#8211; I have yet to start taking advantage of any of the new features of version 2.3 (such as tags) so expect those to be slowly rolled out this week.
I have also started work on [...]]]></description>
			<content:encoded><![CDATA[<p>I have just finished upgrading this blog to Wordpress 2.3. As of now I have only completed the actual migration &#8211; I have yet to start taking advantage of any of the new features of version 2.3 (such as tags) so expect those to be slowly rolled out this week.</p>
<p>I have also started work on a completely revised theme for the site which I hope to get finished in the next week or so. I&#8217;m using <a href="http://themasterplan.in/themes/the-morning-after/" rel="external">The Morning After</a> as a base and making some pretty heavy customisations as well as a bunch of cosmetic changes. The interesting thing is that many aspects of the theme are a step backwards for me in some ways, such as the CSS being far more complex than it needs to be and the semantics of the markup being all out of wack. Still, it&#8217;s a good base visually and structurally.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chnorton.com.au/2007/09/25/site-upgrade-wordpress-23/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compressing CSS and JavaScript</title>
		<link>http://www.chnorton.com.au/2007/08/19/compressing-css-and-javascript/</link>
		<comments>http://www.chnorton.com.au/2007/08/19/compressing-css-and-javascript/#comments</comments>
		<pubDate>Sun, 19 Aug 2007 13:57:28 +0000</pubDate>
		<dc:creator>Chris Norton</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.chnorton.com.au/2007/08/19/compressing-css-and-javascript/</guid>
		<description><![CDATA[Stylesheets and script files can often get quite large. Although they will be cached by the browser there is still the time delay (and bandwidth hit) of the first loading, which according to Yahoo! is more often than you think. Here&#8217;s a quick and dirty method of using PHP with gzip compression to send your [...]]]></description>
			<content:encoded><![CDATA[<p>Stylesheets and script files can often get quite large. Although they will be cached by the browser there is still the time delay (and bandwidth hit) of the first loading, which according to Yahoo! is more often than you think. Here&#8217;s a quick and dirty method of using PHP with gzip compression to send your CSS, Javascript and whatever else compressed to browsers.</p>
<p><span id="more-79"></span>Just create a file called <span class="filename">style.css.php</span> (or whatever you prefer) in the same directory as your style file. Then add this code to it:</p>
<p><code><br />
&lt;?php<br />
ob_start("ob_gzhandler");<br />
header("Content-type: text/css; charset: UTF-8");<br />
header("Cache-Control: must-revalidate");<br />
$offset = 60 * 60 ;<br />
$ExpStr = "Expires: " .<br />
gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";<br />
header($ExpStr);</p>
<p>require "style.css";</p>
<p>ob_end_flush();<br />
?&gt;<br />
</code></p>
<p>The main parts are the ob_start and require calls. <a href="http://www.php.net/ob_start" rel="external nofollow">ob_start</a> starts output buffering and tells the buffer to use gzip compression on the output of the script. <a href="http://www.php.net/require" rel="external nofollow">require</a> will load the contents of the file specified. If you want to use this for JavaScript, make sure you change the &#8220;text/css&#8221; on line 3 to &#8220;text/javascript&#8221;.</p>
<p>Now you just need to change the contents of any relevant &lt;link&gt; or &lt;script&gt; tags in your HTML to point to <span class="filename">style.css.php</span> instead of <span class="filename">style.css</span> and you&#8217;re set! Feel free to play around with the expires offset &#8211; you might want to set it to 10 years in the future for long-term caching but make sure you change the name of the file whenever it&#8217;s updated, otherwise the browser might not load the newer version.</p>
<p>If you have multiple CSS or JavaScript files that you want to load then you might like to check out Ed Eliot&#8217;s <a href="http://www.ejeliot.com/blog/72" rel="external">automatic merging and versioning script</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chnorton.com.au/2007/08/19/compressing-css-and-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
