<?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>Adam Koch's Blog</title>
	<atom:link href="http://www.adamkoch.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adamkoch.com</link>
	<description>Adam Koch is a software developer, husband, and father of two. This is his blog.</description>
	<lastBuildDate>Wed, 30 Jun 2010 04:38:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Kind Joel</title>
		<link>http://www.adamkoch.com/2010/06/29/kind-joel/</link>
		<comments>http://www.adamkoch.com/2010/06/29/kind-joel/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 04:38:44 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Alyssa]]></category>
		<category><![CDATA[Joel]]></category>

		<guid isPermaLink="false">http://www.adamkoch.com/?p=1877</guid>
		<description><![CDATA[Tonight Joel went to be with Owen, a stuffed puppy. Alyssa came out of her room and said that she couldn't sleep without Owen, so I went in Joel's room and asked if she could have Owen. He said no and Alyssa started bawling. After a couple of minutes, Joel called out to me and [...]]]></description>
			<content:encoded><![CDATA[<p>Tonight Joel went to be with Owen, a stuffed puppy. Alyssa came out of her room and said that she couldn't sleep without Owen, so I went in Joel's room and asked if she could have Owen. He said no and Alyssa started bawling. After a couple of minutes, Joel called out to me and gave me Owen, saying that Alyssa could have him. What a wonderful gesture from a 3 year old.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamkoch.com/2010/06/29/kind-joel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anything</title>
		<link>http://www.adamkoch.com/2010/04/21/anything/</link>
		<comments>http://www.adamkoch.com/2010/04/21/anything/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 15:09:05 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.adamkoch.com/?p=1866</guid>
		<description><![CDATA[(via email)
Mom: If you could have anything for your birthday, what would you pick?
Me: ... it would be to wake up in the morning rested and jumping out of bed  instead of dreading getting up and cursing life.
Mom: (no response yet)
]]></description>
			<content:encoded><![CDATA[<p>(via email)</p>
<p>Mom: If you could have anything for your birthday, what would you pick?</p>
<p>Me: ... it would be to wake up in the morning rested and jumping out of bed  instead of dreading getting up and cursing life.</p>
<p>Mom: (no response yet)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamkoch.com/2010/04/21/anything/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Home Phone</title>
		<link>http://www.adamkoch.com/2010/04/19/new-home-phone/</link>
		<comments>http://www.adamkoch.com/2010/04/19/new-home-phone/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 23:03:19 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.adamkoch.com/?p=1861</guid>
		<description><![CDATA[We bought a new home phone system from Costco over the weekend. It's pretty sweet because it connects to our cell phones via Bluetooth. Now, if we want to make a free long-distance using our cell phone, we can pick up one of our home phones to do it. Also, if someone calls one of [...]]]></description>
			<content:encoded><![CDATA[<p>We bought a new home phone system from Costco over the weekend. It's pretty sweet because it connects to our cell phones via Bluetooth. Now, if we want to make a free long-distance using our cell phone, we can pick up one of our home phones to do it. Also, if someone calls one of our cell phones, it will ring on our home phone. Cool, huh?!</p>
<p>Updated: added link.</p>
<p><a href="http://www.amazon.com/gp/product/B002UQ4EZO?ie=UTF8&amp;tag=myrantsite-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B002UQ4EZO"><img title="Vtech Expandable 4-Handset Cordless Phone with Digital Answering System and Cellular Bluetooth Connection" src="http://ecx.images-amazon.com/images/I/51CM-HY615L._SL160_.jpg" alt="Vtech Expandable 4-Handset Cordless Phone with Digital Answering System and Cellular Bluetooth Connection" width="160" height="131" /></a></p>
<p><img class=" wpinrsldtnmgcmfscnsf wpinrsldtnmgcmfscnsf wpinrsldtnmgcmfscnsf wpinrsldtnmgcmfscnsf wpinrsldtnmgcmfscnsf wpinrsldtnmgcmfscnsf" style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=myrantsite-20&amp;l=as2&amp;o=1&amp;a=B002UQ4EZO" border="0" alt="" width="1" height="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamkoch.com/2010/04/19/new-home-phone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iContact</title>
		<link>http://www.adamkoch.com/2010/03/05/icontact/</link>
		<comments>http://www.adamkoch.com/2010/03/05/icontact/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 03:23:43 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[icontact]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.adamkoch.com/?p=1855</guid>
		<description><![CDATA[I have the tendency to use different emails for different things I sign up for. For example, I signed up with the Postsecret newsletter with the email of postsecret@&#60;domain&#62;.org. This way if I ever start getting spam from them I can easily turn off that email.
Well, today I received a virus addressed to that email! [...]]]></description>
			<content:encoded><![CDATA[<p>I have the tendency to use different emails for different things I sign up for. For example, I signed up with the <a href="http://postsecret.blogspot.com/">Postsecret</a> newsletter with the email of postsecret@&lt;domain&gt;.org. This way if I ever start getting spam from them I can easily turn off that email.</p>
<p>Well, today I received a virus addressed to that email! My email was sold, leaked, stolen or otherwise somehow acquired by a spammer. The company that maintains the Postsecret list is <a href="http://www.icontact.com/">iContact</a>. So, if I were you, I would stay away from them!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamkoch.com/2010/03/05/icontact/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command Prompt Shortcut</title>
		<link>http://www.adamkoch.com/2010/02/22/command-prompt-shortcut/</link>
		<comments>http://www.adamkoch.com/2010/02/22/command-prompt-shortcut/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 20:07:20 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Professional]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[command prompt]]></category>
		<category><![CDATA[DOS]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shortcut]]></category>

		<guid isPermaLink="false">http://www.adamkoch.com/?p=1852</guid>
		<description><![CDATA[I found this to work pretty well as a command prompt shortcut. You can copy the file to any directory and it will open the command prompt in that directory while also running a script to set the environment.
Target: %COMSPEC% /K [script name]
Start in: %CD%
]]></description>
			<content:encoded><![CDATA[<p>I found this to work pretty well as a command prompt shortcut. You can copy the file to any directory and it will open the command prompt in that directory while also running a script to set the environment.</p>
<p>Target: %COMSPEC% /K [script name]<br />
Start in: %CD%</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamkoch.com/2010/02/22/command-prompt-shortcut/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>navigator.appVersion</title>
		<link>http://www.adamkoch.com/2010/02/05/navigator-appversion/</link>
		<comments>http://www.adamkoch.com/2010/02/05/navigator-appversion/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 20:24:53 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Professional]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.adamkoch.com/?p=1844</guid>
		<description><![CDATA[Wow. This is messed up. Here is a table of the browsers I have at my disposal and the returned value from the JavaScript variable "navigator.appVersion".


Browser
navigator.appVersion


Chrome 5.0
5.0


Opera 10.00
9.80


IE 8.0
4.0


IE 7.0
4.0


IE 6.0
4.0


Safari 4.0
5.0


Safari 3.2
5.0


Firefox 3.6
5.0


Firefox 3.5
5.0


Firefox 2.0
5.0


Ok browser makers. Let's start over. I don't think any site is using the navigator.appVersion anymore so now is as [...]]]></description>
			<content:encoded><![CDATA[<p>Wow. This is messed up. Here is a table of the browsers I have at my disposal and the returned value from the JavaScript variable "navigator.appVersion".</p>
<table>
<tr>
<th>Browser</th>
<th>navigator.appVersion</th>
</tr>
<tr>
<td>Chrome 5.0</td>
<td>5.0</td>
</tr>
<tr>
<td>Opera 10.00</td>
<td>9.80</td>
</tr>
<tr>
<td>IE 8.0</td>
<td>4.0</td>
</tr>
<tr>
<td>IE 7.0</td>
<td>4.0</td>
</tr>
<tr>
<td>IE 6.0</td>
<td>4.0</td>
</tr>
<tr>
<td>Safari 4.0</td>
<td>5.0</td>
</tr>
<tr>
<td>Safari 3.2</td>
<td>5.0</td>
</tr>
<tr>
<td>Firefox 3.6</td>
<td>5.0</td>
</tr>
<tr>
<td>Firefox 3.5</td>
<td>5.0</td>
</tr>
<tr>
<td>Firefox 2.0</td>
<td>5.0</td>
</tr>
</table>
<p>Ok browser makers. Let's start over. I don't think any site is using the navigator.appVersion anymore so now is as good of time as ever to start fresh. What do you say?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamkoch.com/2010/02/05/navigator-appversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protected: Joel&#8217;s Birthday</title>
		<link>http://www.adamkoch.com/2010/02/04/joels-bday/</link>
		<comments>http://www.adamkoch.com/2010/02/04/joels-bday/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 00:32:15 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[birthday]]></category>
		<category><![CDATA[Bret]]></category>
		<category><![CDATA[Joel]]></category>
		<category><![CDATA[Sophie]]></category>

		<guid isPermaLink="false">http://www.adamkoch.com/?p=1836</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
			<content:encoded><![CDATA[<form action="http://www.adamkoch.com/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-1836">Password:<br />
<input name="post_password" id="pwbox-1836" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://www.adamkoch.com/2010/02/04/joels-bday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Results of Lexi&#8217;s Lump</title>
		<link>http://www.adamkoch.com/2010/02/04/results-of-lexis-lump/</link>
		<comments>http://www.adamkoch.com/2010/02/04/results-of-lexis-lump/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 20:29:34 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Lexi]]></category>
		<category><![CDATA[lump]]></category>
		<category><![CDATA[mass]]></category>
		<category><![CDATA[tumor]]></category>

		<guid isPermaLink="false">http://www.adamkoch.com/?p=1829</guid>
		<description><![CDATA[The vet called last night and said that the lump on Lexi's underbelly was malignant but only a level one which means it hasn't spread to the rest of the body. But the fax they sent me from the lab says it's at a level 2 and "deep invasion". :rolleyes: Dogs with this level usually [...]]]></description>
			<content:encoded><![CDATA[<p>The vet called last night and said that the lump on Lexi's underbelly was malignant but only a level one which means it hasn't spread to the rest of the body. But the fax they sent me from the lab says it's at a level 2 and "deep invasion". :rolleyes: Dogs with this level usually live for another 70 months (about 6 years). I guess the fact that there was "no lymphatic invasion" is a good thing.</p>
<div id="attachment_1828" class="wp-caption alignnone" style="width: 250px"><a href="http://www.adamkoch.com/wp-content/uploads/2010/02/Lexi-report-7138-10.gif"><img class="size-medium wp-image-1828" title="Lexi-report-7138-10" src="http://www.adamkoch.com/wp-content/uploads/2010/02/Lexi-report-7138-10-240x300.gif" alt="Report on Lexi's &quot;mass&quot;" width="240" height="300" /></a><p class="wp-caption-text">Report on Lexi&#39;s &quot;mass&quot;</p></div>
<p>Some text from the report: Although the tumor cells were well-differentiated the deep invasion warrants a grade II category based on the scheme of patnaik. Current literature suggest grade II mast cell tumors with low mitatic rates as seen in this case have a median survival time of 70 months.</p>
<p>Hrm.... that's the first place "tumor" has shown up. <img src='http://www.adamkoch.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamkoch.com/2010/02/04/results-of-lexis-lump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lexi&#8217;s Surgery</title>
		<link>http://www.adamkoch.com/2010/01/28/lexis-surgery/</link>
		<comments>http://www.adamkoch.com/2010/01/28/lexis-surgery/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 02:12:01 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Lexi]]></category>
		<category><![CDATA[surgery]]></category>

		<guid isPermaLink="false">http://www.adamkoch.com/?p=1816</guid>
		<description><![CDATA[Lexi's surgery went fine. They cleaned her teeth while she was under, too. And she got a vaccination. We won't know what the lump was for at least another week.
]]></description>
			<content:encoded><![CDATA[<p>Lexi's surgery went fine. They cleaned her teeth while she was under, too. And she got a vaccination. We won't know what the lump was for at least another week.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamkoch.com/2010/01/28/lexis-surgery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comparison of 10 CSS Compressors</title>
		<link>http://www.adamkoch.com/2010/01/28/comparison-of-10-css-compressors/</link>
		<comments>http://www.adamkoch.com/2010/01/28/comparison-of-10-css-compressors/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 02:05:00 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Professional]]></category>
		<category><![CDATA[compressor]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.adamkoch.com/?p=1730</guid>
		<description><![CDATA[

h2 {
    margin-top: 20px;
}
h2:first-child {
    margin-top: 0px;
}
h3 {
    margin-top: 25px;
    margin-bottom: -10px;
}
.fail {
    background-color: red;
}
.some {
    background-color: #ff0;
}
.pass {
    background-color: green;
}
.almost {
    background-color: #990;
}
.fail, .some, .pass, .almost {
    [...]]]></description>
			<content:encoded><![CDATA[<p>
<style type="text/css">
h2 {
    margin-top: 20px;
}
h2:first-child {
    margin-top: 0px;
}
h3 {
    margin-top: 25px;
    margin-bottom: -10px;
}
.fail {
    background-color: red;
}
.some {
    background-color: #ff0;
}
.pass {
    background-color: green;
}
.almost {
    background-color: #990;
}
.fail, .some, .pass, .almost {
    color: black;
}
th {
    vertical-align: bottom;
}
#a td, #a th {
    border: solid #000 1px;
    border-width: 1px 0;
}
#a tr:first-child td, #a tr:first-child th {
    border: none;
    border-right: solid #000 1px;
}
#a tr:first-child td {
    border: none;
    border-left: solid #000 1px;
}
</style>

<p>I decided to evaluate different CSS compressors to see which one was &quot;the best&quot;. I really didn't expect it to take a week to put this together. Along the way I discovered more ways of compression: some from the tools I evaluated and some I thought of along the way.</p>
<p>I began my research by taking the list of 10 compressors from <a href="http://designshack.co.uk/">Design Shack's</a> <a href="http://designshack.co.uk/articles/css/18-css-compression-tools-and-techniques">18 CSS Compression Tools and Techniques article</a> by <a title="Posts by Joshua Johnson" href="http://designshack.co.uk/author/joshuajohnson/">Joshua Johnson</a>. I replaced one with the tool I currently use, <a href="http://developer.yahoo.com/yui/compressor/">YUI compressor</a>. <a href="http://developer.yahoo.com/yui/compressor/">YUI compressor</a> is the only tool that can be downloaded and added to the build process. I also consulted the wonderful resource found at <a href="http://www.lotterypost.com/css-compress.aspx">Lottery Post</a>. The next step was to create a <a href="/10csscompressors/simple.css">CSS file</a>, feed it to each of the compressors and compared them. I was going to use the color name "ForestGreen" but because it wouldn't pass <a href="http://jigsaw.w3.org/css-validator/">CSS validation</a> I used the CSS-compliant color name "fuchsia". The original file has a size of 4.01KB. Keeping the CSS file simple was difficult. Compressors were thrown off I placed comments in strange places, but in the end I left those fringe cases out.</p>

<h2>Compressors</h2>
<p>Here are the compressors, listed alphabetically.</p>
<ul>
	<li><a href="#arantius">Arantius CSS Compressor</a></li>
	<li><a href="#cleancss">CleanCSS</a></li>
	<li><a href="#csscompressor">CSS Compressor</a></li>
	<li><a href="#cssdrive">CSS Drive</a></li>
	<li><a href="#cssoptimiser">CSS Optimiser</a></li>
	<li><a href="#lotterypost">Lottery Post</a></li>
	<li><a href="#phpinsider">PHP Insider</a></li>
	<li><a href="#pingates">Pingates</a></li>
	<li><a href="#sevenforty">Seven-forty</a></li>
	<li><a href="#yui">YUI compressor</a></li>
</ul>

<h2>Compression Techniques</h2>
<p>The compression techniques that I was looking for spanned from &quot;simple and expected&quot; to &quot;difficult and potentially behavior-changing&quot;. <a href="http://www.lotterypost.com/css-compress.aspx">Lottery Post</a> does a good job explaining some advanced compression techniques and why they are dangerous. I decided to break up the compression techniques into categories.</p>
<ol>
	<li>Safe</li>
	<li>Unconventional</li>
	<li>Dangerous</li>
</ol>

<h3>Safe</h3>
<ol>
	<li>Removes comments</li>
	<li>Removes whitespace</li>
	<li>Removes empty blocks</li>
	<li>Removes decimals</li>
	<li>Removes units from zero values&sup1</li>
	<li>Removes quotes from URIs</li>
	<li>Reduces margin, padding, border-width</li>
    <li>Compresses hex colors</li>
    <li>Compresses colors by hex or name, whichever is shorter</li>
    <li>Converts RGB to hex</li>
</ol>
<p>The &quot;safe&quot; techniques I expected to see from most compressors, although some did surprise me. These should have no ill effects, such as removing quotes around URIs&sup2;.</p>

<h3>Unconventional</h3>
<ol>
	<li>Removes duplicate rules</li>
	<li>Removes overwritten rules</li>
	<li>Compresses font weight</li>
	<li>Changes color names to lowercase</li>
	<li>Changes color hex values to lowercase</li>
</ol>
<p>These techniques shouldn't affect the behavior of the page and were either not very common or I hadn't seen them before -- especially compressing the font weight. Only two compressors did this -- <a href="http://www.csscompressor.com/">CSS Compressor</a> and <a href="http://www.cleancss.com/">CleanCSS</a>. You might wonder why changing the colors to lowercase would help. Well, using lowercase letters helps when you GZIP your files&sup3;. In a simple test, using lowercase RBG hex values saved me two bytes after GZIP compression.</p>


<h3>Dangerous</h3>
<ol>
	<li>Converts tag names to lowercase</li>
	<li>Combines styles for the same element</li>
	<li>Combines font styles</li>
	<li>Combines margins, paddings, borders</li>
	<li>Combines same styles from different elements</li>
</ol>
<p>Techniques 2-5 match up to the ones <a href="http://www.lotterypost.com/css-compress.aspx">Lottery Post</a> won't perform because of the possibility of changing the behavior. I often don't use the &quot;Cascading&quot; part of &quot;Cascading Style Sheets&quot; so I don't think it would affect any of my CSS. Again, changing the case where you can will help GZIP compression. Beware, though. This is safe for HTML, but not safe for XML<sup>4</sup>. In a simple test, changing &quot;DIV&quot; to &quot;div&quot; did save one byte after GZIP compression. (I know, &quot;1 byte&quot;. But we're talking about <a href="http://twitter.com/zachleat/status/6902476988">micro-optimizations</a>.) Since none of the compressors changed the tags' case, I didn't include it in the summary table.</p>


<h2>Commonalities</h2>
<p>All compressors removed some comments and most whitespace. Most compressors tried to compress hex color values. But besides this, there were very little that all compressors shared.</p>


<h2>Compressor Results</h2>

<h3><a name="arantius" id="arantius" href="http://tools.arantius.com/css-compressor">Arantius CSS Compressor</a></h3>
<p>I wasn't too impressed with the Arantius compressor. It removed spaces and single line comments, but not multi-line ones. The compressor removed all possible semicolons, minus the extra one in the "removesExtraSemicolons" class.  Everything else was unchanged. 
<a href="/10csscompressors/arantius.css">Output CSS</a> - 1.95KB</p>


<h3><a name="cleancss" id="cleancss" href="http://www.cleancss.com/">CleanCSS</a></h3>
<p>CleanCSS applied most techniques, but did miss 2 &quot;safe&quot; ones (removing the decimals and removing quotes around URLs) and one &quot;dangerous&quot; technique of combining font styles. Otherwise, it was one of the better compressors. It was one of only two that compressed the font-weight and was smart enough to remove overwritten and duplicate rules. It combined individual margins and paddings when all four sides were present and grouped classes with the same style. It tied for second place in smallest file size.<br/>
<a href="/10csscompressors/cleancss.css">Output CSS</a> - 1.51KB</p>


<h3><a name="csscompressor" id="csscompressor" href="http://www.csscompressor.com/">CSS Compressor</a></h3>
<p>CSS Compressor had some options and I tried to use the most aggresive ones. Here is the setup I used: &quot;Highest&quot; compression mode, checked &quot;Remove last ;&quot; and unchecked &quot;Only safe optimisations&quot;<br />
This compressor was the best. It removed all possible spaces and semicolons. CSS compressor also compressed the font-weight and did a remarkable job of combining rules, even combining the "removesURLSingleQuotes" and "removesURLDoubleQuotes" which some other compressors missed. CSS Compressor had the smallest compressed file size.
<br/><a href="/10csscompressors/csscompressor.css">Output CSS</a> - 1.50KB</p>


<h3><a name="cssdrive" id="cssdrive" href="http://www.cssdrive.com/index.php/main/csscompressor/">CSS Drive</a></h3>
<p>CSS drive didn't do a very good job. It did a mediocre job removing spaces. It didn't remove any empty blocks or change RGB colors. It had the second to largest file size.<br/>
<a href="/10csscompressors/cssdrive.css">Output CSS</a> - 1.94KB</p>



<h3><a name="cssoptimiser" id="cssoptimiser" href="http://www.cssoptimiser.com/index.php">CSS Optimiser</a></h3>
<p>This compressor did an adequate job compressing styles. Some quirks though: it took my one class of &quot;removesDuplicateRules&quot; and declared it twice. <br/>
<code style="display:inline">.removesDuplicateRules,.removesDuplicateRules{width:4%}</code>
<br/>
It removed zero value pixel units, but not percentages or <code style="display:inline">em</code>s. It did simple hex color compression, but didn't touch the RGB colors. It was one of two that compressed my font styles into one font declaration. It tried to reduce the size of the margin classes, but because of the length of the class name, actually increased the size of the file. (".combineIndividualMargins3" is larger than "margin-left:2px".)
<br/>
<a href="/10csscompressors/cssoptimiser.css">Output CSS</a> - 1.57KB</p>


<h3><a name="lotterypost" id="lotterypost" href="http://www.lotterypost.com/css-compress.aspx">Lottery Post</a></h3>
<p>Lottery Post is a very good CSS compressor for what it says it will do. <del datetime="2010-01-29T19:01:00-06:00">Except for removing decimals</del> it used all the <del datetime="2010-01-29T19:01:00-06:00">other</del> &quot;easy&quot; techniques. It doesn't try the &quot;unconventional&quot; or &quot;dangerous&quot; techniques and gives good reason not to. Lottery Post also boasts that it is the only compressor to fix a CSS bug in IE6 pertaining to &quot;:first-line&quot; and &quot;:first-letter&quot;.
I was disappointed to see my decimal RGB colors incorrectly converted. &quot;rgb(250, 150, 50)&quot; should have changed to &quot;#fa9632&quot; but instead was &quot;#FAFAFA&quot;. And both RGB percentages were converted to &quot;#FFF&quot; If those two issues were fixed I would confidentally call this one a very good &quot;safe&quot; compressor.<br/>
<a href="/10csscompressors/lotterypost.css">Output CSS</a> - 1.75KB</p>


<h3><a name="phpinsider" id="phpinsider" href="http://www.phpinsider.com/compress_css.php">PHP Insider</a></h3>
<p>This compressor removed new lines, tabs and comments. And that's it. It had the largest compressed file size.<br/>
<a href="/10csscompressors/phpinsider.css">Output CSS</a> - 2.00KB</p>


<h3><a name="pingates" id="pingates" href="http://tools.pingates.com/">Pingates</a></h3>
<p>The good: Pingates did a good job of removing spaces and combining styles. It removed duplicate and overwritten rules. It was one of only two to compress the font styles and the only one to change color values to lowercase.<br/>
The bad: RGB colors were incorrectly changed. URL quotes values were escaped instead of removed.<br/>
The ugly: It replaced my class name &quot;removesAllWhiteSpace&quot; to &quot;removesAll#ffffffSpace&quot;.<br/>
<a href="/10csscompressors/pingates.css">Output CSS</a> - 1.51KB</p>


<h3><a name="sevenforty" id="sevenforty" href="http://www.sevenforty.com/tools/csscompressor">Seven-forty</a></h3>
<p>A light compressor, it only tried the &quot;easy&quot; compression techniques and then, not real well. Whitespace was removed, but it didn't remove trailing semicolons, something I've come to expect. It incorrectly changed my &quot;background-color: rgb(255, 0, 0)&quot; to &quot;#ff00&quot;.<br/>
<a href="/10csscompressors/sevenforty.css">Output CSS</a> - 1.86KB</p>


<h3><a name="yui" id="yui" href="http://developer.yahoo.com/yui/compressor/">YUI compressor</a></h3>
<p>&quot;Ah. Saving the best for last,&quot; I thought. I thought wrong. I was surprised when the YUI compressor didn't even remove trailing semicolons! Yikes! Because it is open-source, you can download it and change what you want to. And because it is packaged as a jar file, it can be easily integrated into an Ant build process. But as far as removing bits, it lacked, settling only on trying the &quot;safe&quot; techniques.<br/>
<a href="/10csscompressors/yui.css">Output CSS</a> - 1.84KB</p>

<h2>Conclusion</h2>
<p>The conclusion I came to is no compressor does it all. And as for my development, I should probably look for something other than YUI compressor. I might have to develop my own compressor that I can plug into my build process.</p>


<table cellspacing="2" cellpadding="2" id="a" style="border-spacing: 2px;">
<tbody>
<tr>
<th></th>
<td><a href="http://tools.arantius.com/css-compressor">Arantius CSS Compressor</a></td>
<td><a href="http://www.cleancss.com/">CleanCSS</a></td>
<td><a href="http://www.csscompressor.com/">CSS Compressor</a></td>
<td><a href="http://www.cssdrive.com/index.php/main/csscompressor/">CSS Drive</a></td>
<td><a href="http://www.cssoptimiser.com/index.php">CSS Optimizer/ Optimiser</a></td>
<td><a href="http://www.lotterypost.com/css-compress.aspx">Lottery Post</a></td>
<td><a href="http://www.phpinsider.com/compress_css.php">PHP Insider</a></td>
<td><a href="http://tools.pingates.com/css_compress.php">Pingates <!-- broke the css by adding a colon in one spot and escaping quotes and backslashes --></a></td>
<td><a href="http://www.sevenforty.com/tools/csscompressor">Seven- forty</a></td>
<td><a href="http://developer.yahoo.com/yui/compressor/">YUI compressor</a></td>
</tr>
<tr>
<th>Removes trailing semi-colons</th>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="some">Some</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
</tr>
<tr>
<th>Removes empty blocks</th>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="some">Some</td>
<td class="pass">Yes</td>
</tr>
<tr>
<th>Removes decimals</th>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
</tr>
<tr>
<th>Removes units on zero lengths/widths/size</th>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="some">Only for &quot;px&quot;</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
</tr>
<tr>
<th>Removes quotes from url() values</th>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">Escapes them instead</td>
<td class="fail">No</td>
<td class="fail">No</td>
</tr>
<tr>
<th>Reduces the number of sides specified for margin, padding, and border-width</th>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="some">Not border-width</td>
<td class="fail">No</td>
<td class="fail">No</td>
</tr>
<tr>
<th>Compresses 6-digit hex colors to 3-digits</th>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
</tr>
<tr>
<th>Reduces colors by color name or hex</th>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="fail">No</td>
</tr>
<tr>
<th>Changes rgb() values</th>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">Error</td>
<td class="some">Not %<!--percentages--></td>
</tr>
<tr>
<th>Removes duplicate rules</th>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
</tr>
<tr>
<th>Removes overwritten styles</th>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
</tr>
<tr>
<th>Uses lowercase color names/hex values</th>
<td class="fail">No</td>
<td class="pass">Yes<!--but won't change hex values, only when making it's own replacements--></td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
</tr>
<tr>
<th>Combines styles for the same element<!-- that are specified in different style blocks--></th>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="pass">Yes<!--but reordered--></td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
</tr>
<tr>
<th>Combines individual font styles</th>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
</tr>
<tr>
<th>Combines individual margin, padding, or border styles</th>
<td class="fail">No</td>
<td class="some">One case<!--Only on all four--></td>
<td class="some">One case<!--Only on all four--></td>
<td class="fail">No</td>
<td class="fail">Error<!--Incorrectly combined elements--></td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="some">Once case<!--Only on all four--></td>
<td class="fail">No</td>
<td class="fail">No</td>
</tr>
<tr>
<th>Combines styles for multiple elements<!-- that share the same style definition--></th>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
<td class="pass">Yes</td>
<td class="fail">No</td>
<td class="fail">No</td>
</tr>
</tbody>
</table>

<h2>References:</h2>

<a name="one" id="one">&sup1;</a> &quot;After a zero length, the unit identifier is optional.&quot; - <cite>http://www.w3.org/TR/CSS2/syndata.html#length-units</cite>
<br />

<a name="two" id="two">&sup2;</a> &quot;The format of a URI value is 'url(' followed by optional white space followed by an optional single quote (') or double quote (&quot;) character followed by the URI itself, followed by an optional single quote (') or double quote (&quot;) character followed by optional white space followed by ')'. The two quote characters must be the same.&quot; - <cite>http://www.w3.org/TR/CSS2/syndata.html#uri</cite>
<br/>

<a name="three" id="three">&sup3;</a> <cite>http://www.julienlecomte.net/yuicompressor/CHANGELOG</cite>
<br/>

<a name="four" id="four"><sup>4</sup></a> &quot;The case-sensitivity of document language element names in selectors depends on the document language. For example, in HTML, element names are case-insensitive, but in XML they are case-sensitive.&quot; - <cite>http://www.w3.org/TR/CSS2/selector.html</cite>
<br />
<br />

<p><ins datetime="2010-01-29T19:09:00-06:00"><strong>Friday, January 29 at 7:09 PM: Updated</strong> table to reflect that <a name="lotterypost" id="lotterypost" href="http://www.lotterypost.com/css-compress.aspx">Lottery Post's compressor</a> does remove decimals and therefore uses <em>all</em> "safe" compressions (including two I forgot!). Thanks to <a href="http://www.lotterypost.com/">Todd</a> for pointing that out.</ins></p>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamkoch.com/2010/01/28/comparison-of-10-css-compressors/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
