<?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>Barryvan &#187; CSS</title>
	<atom:link href="http://www.barryvan.com.au/category/programming/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.barryvan.com.au</link>
	<description>Music, Programming, Design</description>
	<lastBuildDate>Sun, 08 Jan 2012 08:48:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CSSMin updated</title>
		<link>http://www.barryvan.com.au/2011/01/cssmin-updated/</link>
		<comments>http://www.barryvan.com.au/2011/01/cssmin-updated/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 00:56:53 +0000</pubDate>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Web design]]></category>

		<guid isPermaLink="false">http://www.barryvan.com.au/?p=547</guid>
		<description><![CDATA[I&#8217;ve updated my CSSMin project with a couple of new features and bugfixes. Download or fork it on GitHub! What is it? CSSMin takes your CSS file and strips out everything that&#8217;s not needed &#8212; spaces, extra semicolons, redundant units, and so on. That&#8217;s great, but there are loads of programs that do that. A [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated my CSSMin project with a couple of new features and bugfixes. <a href="https://github.com/barryvan/CSSMin">Download or fork it on GitHub!</a></p>
<h2>What is it?</h2>
<p>CSSMin takes your CSS file and strips out everything that&#8217;s not needed &#8212; spaces, extra semicolons, redundant units, and so on. That&#8217;s great, but there are loads of programs that do that. A shell script could do that! So what makes CSSMin different?</p>
<p>When you deliver content over the web, best practice is to deliver it gzipped. CSSMin takes your CSS file, and optimises it for gzip compression. This means that there&#8217;s a smaller payload delivered over the wire, which results in a faster experience for your users. It does this optimisation by ensuring that the properties inside your selectors are ordered consistently (alphabetically) and in lower case. That way, the gzip algorithm can work at its best.</p>
<p>What this means in practice is that your gzipped CSSMin-ed files are significantly smaller than plain gzipped CSS, and noticeably smaller than files that have been compressed by other means (say, YUI).</p>
<h2>In this update:</h2>
<h3>Nested properties are now fully supported.</h3>
<p>This means that the following CSS:</p>
<pre class="brush: css">@-webkit-keyframes &#039;fadeUp&#039; {
  from { opacity: 0; }
  to { opacity: 1; }
}</pre>
<p>is compressed down to</p>
<pre class="brush: css">@-webkit-keyframes &#039;fadeUp&#039;{from{opacity:0}to{opacity:1}}</pre>
<p>Your nested properties will have their contents compressed with all of the other tricks in system, but their order will be retained.</p>
<p>Thanks to <a href="https://github.com/bloveridge">bloveridge</a> for reporting this bug and verifying the fix.</p>
<h3>Font weights are replaced by their numeric counterparts.</h3>
<pre class="brush: css">.alpha {
  font-weight: bold;
}
.beta {
  font-weight: normal;
}</pre>
<p>becomes</p>
<pre class="brush: css">.alpha{font-weight:700}.beta{font-weight:400}</pre>
<p>Values supported are &#8220;lighter&#8221;, &#8220;normal&#8221;, &#8220;bold&#8221;, and &#8220;bolder&#8221;.</p>
<h3>Quotes are stripped where possible.</h3>
<pre class="brush: css">.alpha {
  background: url(&#039;ponies.png&#039;);
  font-family: &#039;Times New Roman&#039;, &#039;Arial&#039;;
}</pre>
<p>becomes</p>
<pre class="brush: css">.alpha{background:url(ponies.png);font-family:&#039;Times New Roman&#039;,arial}</pre>
<h3>As much text as possible is changed to lower-case.</h3>
<p>Only selectors, quoted strings (such as &#8216;Times New Roman&#8217;) and url() values are left intact.</p>
<p>Note that this means that if you mix the case of your selectors (for example, SPAN and span), your compression will be sub-optimal.</p>
<h3>Thanks</h3>
<p>Some of the ideas for this update were inspired by <a href="http://www.lotterypost.com/css-compress.aspx">Lottery Post&#8217;s CSS Compressor</a>.</p>
<h2>Start using it!</h2>
<h3>Requirements</h3>
<p>You will need a recent version of Java and the Java compiler.</p>
<h3>Download</h3>
<p><a href="https://github.com/barryvan/CSSMin">Download or fork it on GitHub.</a></p>
<h3>Usage</h3>
<ol>
<li>Compile the Java:
<pre class="brush: php"># javac CSSMin.java</pre>
</li>
<li>Run your CSS through it:
<pre class="brush: php"># java CSSMin [input] [output]</pre>
</li>
</ol>
<p>If you don&#8217;t specify an output file, the result will be dumped to stdout. Warnings and errors are written to stderr.</p>
<h2>Results</h2>
<p>These are the results of compressing the main CSS file for one of the webapps I develop at work. Note that many of these compressors only offer an online service, which means that they can&#8217;t easily be used as part of your general build process.</p>
<table class="comparison">
<thead>
<tr>
<td>&nbsp;</td>
<td>Original size (bytes)</td>
<td>Gzipped size (bytes)</td>
</tr>
</thead>
<tbody>
<tr>
<td>Plain</td>
<td>81938</td>
<td>12291</td>
</tr>
<tr>
<td><a href="http://developer.yahoo.com/yui/compressor/">YUI</a></td>
<td>64434</td>
<td>10198</td>
</tr>
<tr>
<td><a href="http://www.lotterypost.com/css-compress.aspx">LotteryPost</a></td>
<td>63609</td>
<td>10165</td>
</tr>
<tr>
<td><a href="http://www.cssdrive.com/compressor/compress_advanced.php">CSS Drive</a></td>
<td>69275</td>
<td>10795</td>
</tr>
<tr>
<td><a href="https://github.com/barryvan/CSSMin">CSSMin</a></td>
<td>63791</td>
<td>9896</td>
</tr>
</tbody>
</table>
<h2>Feedback</h2>
<p>Let me know how you go with it &#8212; bug reports and feature requests are always welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryvan.com.au/2011/01/cssmin-updated/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Theme update (again!)</title>
		<link>http://www.barryvan.com.au/2010/08/theme-update-again/</link>
		<comments>http://www.barryvan.com.au/2010/08/theme-update-again/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 04:12:48 +0000</pubDate>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Web design]]></category>

		<guid isPermaLink="false">http://www.barryvan.com.au/?p=474</guid>
		<description><![CDATA[And so, for the third time this year, I&#8217;ve completely re-themed this site. Taking a very different tack from the last theme, I&#8217;ve tried to keep this one as simple as possible, with just a few subtle touches here and there to add interest. The palette is more subdued, which hopefully means that reading the [...]]]></description>
			<content:encoded><![CDATA[<p>And so, for the third time this year, I&#8217;ve completely re-themed this site. Taking a very different tack from the last theme, I&#8217;ve tried to keep this one as simple as possible, with just a few subtle touches here and there to add interest. The palette is more subdued, which hopefully means that reading the text is a more pleasant experience. I&#8217;ve also done away with the multi-column body text in favour of a fixed-width design.</p>
<p>At the same time, though, I have endeavoured to use some of the new features available in modern web browsers &#8212; gradients, shadows, transitions, generated content, and so on. I&#8217;m fairly happy with the result &#8212; I think it&#8217;s a clean, unobtrusive theme that&#8217;s not too in your face. Feedback and criticism welcome! <img src='http://www.barryvan.com.au/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryvan.com.au/2010/08/theme-update-again/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Full-width text inputs without extraneous markup or scripting</title>
		<link>http://www.barryvan.com.au/2010/01/full-width-text-inputs-without-extraneous-markup-or-scripting/</link>
		<comments>http://www.barryvan.com.au/2010/01/full-width-text-inputs-without-extraneous-markup-or-scripting/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 23:56:34 +0000</pubDate>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web design]]></category>

		<guid isPermaLink="false">http://www.barryvan.com.au/?p=403</guid>
		<description><![CDATA[The problem When styling text &#60;input&#62; elements, it&#8217;s fairly common to run into a serious problem: they don&#8217;t behave like block-level elements. Note: In all of the examples, the container element is filled with blue, and the &#60;input&#62; itself is filled with red and has an opacity of 50% so that you can see it [...]]]></description>
			<content:encoded><![CDATA[<h1>The problem</h1>
<p>When styling text &lt;input&gt; elements, it&#8217;s fairly common to run into a serious problem: they don&#8217;t behave like block-level elements.</p>
<p>Note: In all of the examples, the container element is filled with blue, and the &lt;input&gt; itself is filled with red and has an opacity of 50% so that you can see it under- or over-flowing the container.</p>
<pre class="brush: xhtml">&lt;div  style=&quot;background: blue; width:200px;&quot;&gt;
  &lt;input  style=&quot;display:block; padding:4px; background: red; opacity:0.5; border:0;&quot; type=&quot;text&quot; value=&quot;text input&quot;/&gt;
&lt;/div&gt;</pre>
<div style="background:blue; width:200px;">
<input  style="display:block;padding:4px;background: red; opacity:0.5;border:0;" type="text" value="text input"/>
</div>
<p>You can see how the input doesn&#8217;t automatically flow to full width, as the &#8220;display: block&#8221; style suggests it should. The kneejerk response is to set the width to 100%:</p>
<pre class="brush: xhtml">&lt;div  style=&quot;background: blue; width:200px;&quot;&gt;
  &lt;input  style=&quot;display:block; padding:4px; background: red; opacity:0.5; width:100%; border:0;&quot; type=&quot;text&quot; value=&quot;text input&quot;/&gt;
&lt;/div&gt;</pre>
<div style="background:blue; width:200px;">
<input  style="display:block;padding:4px;background: red; opacity:0.5;width:100%;border:0;" type="text" value="text input"/>
</div>
<p>But notice now how the input overflows its container&#8217;s boundaries because of the left padding. At this point, people may resort to non-semantic markup (removing the padding on the &lt;input&gt; and putting it inside a padded &lt;div&gt;) or JavaScript solutions that set the pixel width whenever the container&#8217;s width changes (by the addition of scrollbars, for example).</p>
<h1>The (semantic) solution</h1>
<p><strong>But wait!</strong> There <strong>is</strong> a way to achieve this effect without resorting to an extra &lt;div&gt; or JavaScript:</p>
<pre class="brush: xhtml">&lt;div  style=&quot;background: blue; width:200px;&quot;&gt;
  &lt;input  style=&quot;display:block; padding:4px 0; background: red; opacity:0.5; width:100%; border:0; text-indent:4px;&quot; type=&quot;text&quot; value=&quot;text input&quot;/&gt;
&lt;/div&gt;</pre>
<div style="background:blue; width:200px;">
<input  style="display:block;padding:4px 0;background: red; opacity:0.5;width:100%;border:0;text-indent:4px;" type="text" value="text input"/>
</div>
<p>Do you see what I did there? I removed the horizontal padding on the &lt;input&gt;, so the 100% width now works correctly, and replaced it with &#8220;text-indent&#8221;. To the user, this looks no different, and it has the advantage of requiring no extraneous markup or tedious scripting.</p>
<h1>Drawbacks</h1>
<ol>
<li>Should the user enter a long string, their text will bump up against the right edge. But I think that that&#8217;s a boundary condition that I can live with.</li>
<li>Any vertical borders on the &lt;input&gt; will cause it to overflow its container. Personally, if I want a full-width &lt;input&gt;, though, I generally don&#8217;t want any borders on its left or right other than those of its container.</li>
]]></content:encoded>
			<wfw:commentRss>http://www.barryvan.com.au/2010/01/full-width-text-inputs-without-extraneous-markup-or-scripting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CSS Columns</title>
		<link>http://www.barryvan.com.au/2009/10/css-columns/</link>
		<comments>http://www.barryvan.com.au/2009/10/css-columns/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 13:01:09 +0000</pubDate>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.barryvan.com.au/?p=295</guid>
		<description><![CDATA[In this post, I will walk through the new columns specification that arrived in CSS 3. I will show you the current implementation state of columns in the four major rendering engines: Gecko (Firefox), Webkit (Safari &#038; Chrome), Trident (Internet Explorer), and Presto (Opera). Before we get on to platform-specific issues and workarounds, though, we&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>In this post, I will walk through the new columns specification that arrived in CSS 3. I will show you the current implementation state of columns in the four major rendering engines: Gecko (Firefox), Webkit (Safari &#038; Chrome), Trident (Internet Explorer), and Presto (Opera).</p>
<p>Before we get on to platform-specific issues and workarounds, though, we&#8217;ll look at the various CSS properties available for working with columns.</p>
<p>For more in-depth information on columns, you should check out the <a href="http://www.w3.org/TR/css3-multicol/">W3C working draft</a> and Mozilla&#8217;s <a href="https://developer.mozilla.org/en/CSS3_Columns">MDC page on columns</a>. The Webkit blog <a href="http://webkit.org/blog/88/css3-multi-column-support/">also has an article</a>, but it&#8217;s not particularly informative.</p>
<h2>Contents</h2>
<ul>
<li>
		<a href="#capabilities">Browser capabilities</a>
	</li>
<li>
		<a href="#bugs">Browser bugs</a></p>
<ul>
<li><a href="#gecko-bugs">Gecko</a></li>
<li><a href="#webkit-bugs">Webkit</a></li>
</ul>
</li>
<li>
		<a href="#properties">Properties</a></p>
<ul>
<li><a href="#column-count">column-count</a></li>
<li><a href="#column-width">column-width</a></li>
<li><a href="#columns">columns</a></li>
<li><a href="#column-gap">column-gap</a></li>
<li><a href="#column-rule-color">column-rule-color</a></li>
<li><a href="#column-rule-style">column-rule-style</a></li>
<li><a href="#column-rule-width">column-rule-width</a></li>
<li><a href="#column-rule">column-rule</a></li>
<li><a href="#column-span">column-span</a></li>
<li><a href="#column-fill">column-fill</a></li>
</ul>
</li>
</ul>
<p>I will add more to this entry as I discover more about columns &#8212; the goal is to make it an easy-to-understand reference.</p>
<h2><a name="capabilities" href="#capabilities">Browser capabilities</a></h2>
<table class="capabilities" cellspacing="0" cellpadding="0">
<thead>
<tr>
<td>Property</td>
<td>Gecko</td>
<td>Webkit</td>
<td>Trident</td>
<td>Presto</td>
</tr>
</thead>
<tbody>
<tr>
<td class="property"><a href="#column-count">column-count</a></td>
<td class="full">-moz-column-count</td>
<td class="full">-webkit-column-count</td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
</tr>
<tr>
<td class="property"><a href="#column-width">column-width</a></td>
<td class="full">-moz-column-width</td>
<td class="full">-webkit-column-width</td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
</tr>
<tr>
<td class="property"><a href="#columns">columns</a></td>
<td class="none">&#10007;</td>
<td class="full">-webkit-columns</td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
</tr>
<tr>
<td class="property"><a href="#column-gap">column-gap</a></td>
<td class="full">-moz-column-gap</td>
<td class="full">-webkit-column-gap</td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
</tr>
<tr>
<td class="property"><a href="#column-rule-color">column-rule-color</a></td>
<td class="partial"><a href="#gecko-bugs">-moz-column-rule-color</a></td>
<td class="full">-webkit-column-rule-color</td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
</tr>
<tr>
<td class="property"><a href="#column-rule-style">column-rule-style</a></td>
<td class="partial"><a href="#gecko-bugs">-moz-column-rule-style</a></td>
<td class="full">-webkit-column-rule-style</td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
</tr>
<tr>
<td class="property"><a href="#column-rule-width">column-rule-width</a></td>
<td class="partial"><a href="#gecko-bugs">-moz-column-rule-width</a></td>
<td class="full">-webkit-column-rule-width</td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
</tr>
<tr>
<td class="property"><a href="#column-rule">column-rule</a></td>
<td class="partial"><a href="#gecko-bugs">-moz-column-rule</a></td>
<td class="full">column-rule</td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
</tr>
<tr>
<td class="property"><a href="#column-span">column-span</a></td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
</tr>
<tr>
<td class="property"><a href="#column-fill">column-fill</a></td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
</tr>
<tr>
<td class="property">break-before</a></td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
</tr>
<tr>
<td class="property">break-inside</a></td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
<td class="none">&#10007;</td>
</tr>
</tbody>
</table>
<p>Browsers used for testing: Firefox 3.5.4 (Windows), Safari 4.0.2 (Windows), Internet Explorer 8.0.6001, Opera 10.00 (Windows)</p>
<p>Please let me know if this table is inaccurate, and I will update it.</p>
<h2><a name="bugs" href="#bugs">Browser bugs</a></h2>
<p>These are the bugs that I have encountered using CSS columns &#8212; if you know of more, please let me know, and I&#8217;ll add them to these lists.</p>
<h3><a name="gecko-bugs" href="#gecko-bugs">Gecko bugs</a></h3>
<ul>
<li>Specifying an &#8220;overflow&#8221; (or &#8220;overflow-x&#8221; or &#8220;overflow-y&#8221;) property on an element with columns prevents the column rule from being rendered at all.</li>
<li>Column rules occasionally don&#8217;t render, regardless of the &#8220;overflow&#8221; property.</li>
<li>There is no way to break columns.</li>
</ul>
<h3><a name="webkit-bugs" href="#webkit-bugs">Webkit bugs</a></h3>
<ul>
<li>Pixel creep: Pixels from a later column can creep back to the bottom of the previous column. This can happen with plain text, but it is much more noticeable when you use a non-layout altering effect like text-shadow or box-shadow.</li>
<li>Text that overflows the column horizontally is chopped off</li>
<li>There is no way to break columns.</li>
</ul>
<h2><a name="properties" href="#properties">Properties</a></h2>
<h3><a name="column-count" href="#column-count">column-count</a></h3>
<p><strong>Value:</strong> <integer> | auto<br />
<strong>Initial value:</strong> auto</p>
<p>If you don&#8217;t set the <a href="#column-width">column-width</a> property, <a href="#column-count">column-count</a> specifies the number of columns into which the content should be flowed.</p>
<p>If you specify <a href="#column-width">column-width</a>, <a href="#column-count">column-count</a> imposes a limit on the maximum number of columns to be rendered if you supply a numeric value.</p>
<h3><a name="column-width" href="#column-width">column-width</a></h3>
<p><strong>Value:</strong> <length> | auto<br />
<strong>Initial value:</strong> auto</p>
<p>This property indicates the <em>optimal</em> column width &#8212; columns may be rendered narrower or wider by the UA, according to the available space.</p>
<p>If <a href="#column-width">column-width</a> has the value &#8220;auto&#8221;, then the width of the columns is determined by other means (for example, <a href="#column-count">column-count</a>).</p>
<h3><a name="columns" href="#columns">columns</a></h3>
<p><strong>Value:</strong> <a href="#column-width">column-width</a> &#038;&#038; <a href="#column-count">column-count</a></p>
<p>The <a href="#columns">columns</a> property is a short-hand property, used to set both <a href="#column-width">column-width</a> and <a href="#column-count">column-count</a> simultaneously.</p>
<h3><a name="column-gap" href="#column-gap">column-gap</a></h3>
<p><strong>Value:</strong> <length> | normal<br />
<strong>Initial value:</strong> normal</p>
<p>Use <a href="#column-gap">column-gap</a> to specify the size of the gutter that lies between columns. Most UAs will render &#8220;normal&#8221; as 1em.</p>
<h3><a name="column-rule-color" href="#column-rule-color">column-rule-color</a></h3>
<p><strong>Value:</strong><br />
<color>
<p>When a <a href="#column-rule">column-rule</a> is specified, you may use <a href="#column-rule-color">column-rule-color</a> to set the colour for the line drawn between columns. This property is approximately equivalent to the various border-(?)-color properties.</p>
<h3><a name="column-rule-style" href="#column-rule-style">column-rule-style</a></h3>
<p><strong>Value:</strong> <border-style></p>
<p>By using <a href="#column-rule-style">column-rule-style</a>, you may determine how the line between columns is to be rendered, if at all. Similar to border-(?)-style.</p>
<h3><a name="column-rule-width" href="#column-rule-width">column-rule-width</a></h3>
<p><strong>Value:</strong> <border-width><br />
<strong>Initial value:</strong> medium</p>
<p><a href="#column-rule-width">column-rule-width</a> sets the width of the line rendered in the gutter between columns. Basically, it&#8217;s the same as the border-(?)-width properties.</p>
<h3><a name="column-rule" href="#column-rule">column-rule</a></h3>
<p><strong>Value:</strong> <a href="#column-rule-width">column-rule-width</a> &#038;&#038; <a href="#column-rule-style">column-rule-style</a> &#038; &#038; <a href="#column-rule-color">column-rule-color</a></p>
<p>Shorthand for setting all three column-rule properties.</p>
<h3><a name="column-span" href="#column-span">column-span</a></h3>
<p><strong>Value:</strong> 1 | all<br />
<strong>Initial value:</strong> 1</p>
<p>By using <a href="#column-span">column-span</a>, you can allow an element to span either the entire set of columns, or none at all.</p>
<p>Note that you cannot set an arbitrary number of columns to span &#8212; this property essentially &#8216;interrupts&#8217; the column flow and restarts it below the spanned element.</p>
<h3><a name="column-fill" href="#column-fill">column-fill</a></h3>
<p><strong>Value:</strong> auto | balance<br />
<strong>Initial value:</strong> balance</p>
<p>If you have set a height for your columnified element, setting <a href="#column-fill">column-fill</a> to &#8216;auto&#8217; will cause the columns to be &#8216;filled&#8217; in turn, rather than have the content balanced equally between them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryvan.com.au/2009/10/css-columns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS minifier and alphabetiser</title>
		<link>http://www.barryvan.com.au/2009/08/css-minifier-and-alphabetiser/</link>
		<comments>http://www.barryvan.com.au/2009/08/css-minifier-and-alphabetiser/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 08:27:30 +0000</pubDate>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Minify]]></category>
		<category><![CDATA[Obfuscate]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.barryvan.com.au/?p=231</guid>
		<description><![CDATA[Update: This project is now hosted on GitHub: http://barryvan.github.com/CSSMin/ There are quite a few CSS minifiers out there, which can bring the raw size of your CSS files down substantially. Very few of them, however, will also optimise your CSS for gzip compression. To that end, I&#8217;ve written a small Java application that will read [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update: This project is now hosted on GitHub: <a href="http://barryvan.github.com/CSSMin/">http://barryvan.github.com/CSSMin/</a></strong></p>
<p>There are quite a few CSS minifiers out there, which can bring the raw size of your CSS files down substantially. Very few of them, however, will also optimise your CSS for gzip compression. To that end, I&#8217;ve written a small Java application that will read in a CSS file and output its contents to stdout or another file in a format that&#8217;s optimised for gzipping.</p>
<h2>The problem</h2>
<p>A file will be most compressed when there are many recurring strings in the file. This means that when writing CSS files, this code:</p>
<pre class="brush: css">.pony {
border: solid red 1px;
font-weight: bold;
}
.lemur {
border: solid red 1px;
font-weight: normal;
}</pre>
<p>will be better-compressed than this:</p>
<pre class="brush: css">.pony {
border: solid red 1px;
font-weight: bold;
}
.lemur {
font-weight: normal;
border: red solid 1px;
}</pre>
<h2>What it does</h2>
<p>Specifically, my CSS minifier will perform the following transformations on the file:</p>
<ul>
<li>All comments are removed.</li>
<li>The properties within all selectors are ordered alphabetically.</li>
<li>The values for all properties are ordered alphabetically.</li>
<li>All unnecessary whitespace is removed.</li>
</ul>
<p>By way of example, the following CSS snippet:</p>
<pre class="brush: css">body {
padding: 8px;
margin: 0;
background-color: blue;
color: white;
font-family: &quot;Trebuchet MS&quot;, sans-serif;
}

h1 {
margin: 0;
padding: 0;
font-size: 200%;
color: #0F0;
font-weight: bold;
}

p {
margin: 0 0 2em;
line-height: 2em;
}</pre>
<p>would be formatted to:</p>
<pre class="brush: css">body{background-color:blue;color:white;font-family:&quot;Trebuchet MS&quot;,sans-serif;margin:0;padding:8px;}h1{color:#0F0;font-size:200%;font-weight:bold;margin:0;padding:0;}p{line-height:2em;margin:0 0 2em;}</pre>
<h2>Compression results</h2>
<p>A (very) large real-world CSS file of 78.2KB has a minified size of 63.7KB, which is a size decrease of nearly 20%. GZipping these two files, the un-minified file is reduced to 13.2KB, whilst the minified file weighs in at just 11.5KB &#8212; nearly 13% smaller.</p>
<p>Clearly, removing unnecessary whitespace and reordering the contents of the CSS selectors can greatly improve the compression of your CSS files, and thus make your pages deliver more quickly.</p>
<h2>Comparison with YUI CSS Compression</h2>
<p>As you can see in the chart below, the <a href="http://yuilibrary.com/downloads/#yuicompressor">YUI compressor</a> manages to make the original file around 1KB smaller than my minifier. However, when the two minified files are gzipped, my compression results in a file that is 11.5KB in size, whilst YUI only reduces down to 11.8KB.<br />
<img src="/projects/cssmin/YUIComparison.png" alt="A chart comparing YUI's CSS compression and mine" title="Original: 78.2, Original/GZ: 13.2; YUI: 62.7, YUI/GZ: 11.9; Mine: 63.7, Mine/GZ: 11.5"/></p>
<h2>Download</h2>
<p>The source for this applet is available freely, and is a single Java file. It&#8217;s not particularly pretty, because I knocked this together in about half an hour.<br />
<a href="/projects/cssmin/CSSMin.java">Download</a><br />
License: Mozilla Public License (In other words, do whatever you like with it. Credit is greatly appreciated, but not required.</p>
<h2>Usage</h2>
<p>First, if you haven&#8217;t done so yet, compile the code:</p>
<pre class="brush: php"># javac CSSMin.java</pre>
<p>Then, you can call the minifier by running</p>
<pre class="brush: php"># java CSSMin in.css [out.css]</pre>
<p>If you do not specify an output file, the resultant CSS will be printed to stdout (and can then be redirected as you wish).</p>
<h2>Contact</h2>
<p>If you have any questions or comments about this app, or if you find a bug or some weird behaviour, just comment on this post, and I&#8217;ll see what I can do.</p>
<p>If you find this utility useful, let me know! If you want to extend it, you&#8217;re free to do whatever you like with it, as it&#8217;s under the MPL. It would be nice, though, if you dropped me a line to let me know what you&#8217;re doing with it. <img src='http://www.barryvan.com.au/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Future work</h2>
<ul>
<li>Replace &#8220;0[px,em,%,etc]&#8221; with &#8220;0&#8243;.</li>
<li>Replace &#8220;0 [0 [0 [0]]]&#8221; with &#8220;0&#8243;.</li>
<li>Replace &#8220;0.6&#8243; with &#8220;.6&#8243; wherever possible.</li>
<li>Replace all &#8220;rgb(64, 64, 64)&#8221; with &#8220;#404040&#8243;.</li>
<li>Shorten colours from #112233 to #123 wherever possible.</li>
<li>Remove all empty rules.</li>
<li>Ordering of property valus according to the CSS spec, not just alphabetically.</li>
<li>A cleaner interface, including the ability to stream and process from stdin.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.barryvan.com.au/2009/08/css-minifier-and-alphabetiser/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>New theme!</title>
		<link>http://www.barryvan.com.au/2009/03/new-theme/</link>
		<comments>http://www.barryvan.com.au/2009/03/new-theme/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 08:35:01 +0000</pubDate>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[themes]]></category>

		<guid isPermaLink="false">http://www.barryvan.com.au/?p=98</guid>
		<description><![CDATA[I&#8217;ve finally got around to replacing the placeholder theme I had on the site. The new theme that I&#8217;ve made is much cleaner, simpler, and fresher. This new theme is built around the Sandbox WordPress theme. Sandbox provides you with a really well marked-up document, with appropriate classes, ids, and so on where you need [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally got around to replacing the placeholder theme I had on the site. The new theme that I&#8217;ve made is much cleaner, simpler, and fresher.</p>
<p>This new theme is built around the Sandbox WordPress theme. Sandbox provides you with a really well marked-up document, with appropriate classes, ids, and so on where you need them &#8212; essentially, it lets you build the entire theme in CSS without having to worry about the markup, and in so doing, encourages you to build a CSS-only design. I&#8217;m proud to say that this design is wholly CSS &#8212; there is no extraneous markup, and there are also no browser-specific hacks or files: everything is contained in a single CSS file and about five images, for a total size of around 40kB.</p>
<p>I should also note once again that Firebug is, perhaps, the best tool for web development, be it design or coding &#8212; about 90% of the styling was tested in the browser using Firebug before being applied in the CSS file itself.</p>
<p>Comments, questions, or criticisms of the new design? Just leave them in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryvan.com.au/2009/03/new-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web developer tools</title>
		<link>http://www.barryvan.com.au/2009/01/web-developer-tools/</link>
		<comments>http://www.barryvan.com.au/2009/01/web-developer-tools/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 19:10:52 +0000</pubDate>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[browsers]]></category>

		<guid isPermaLink="false">http://www.barryvan.com.au/?p=89</guid>
		<description><![CDATA[In this post, I&#8217;ll outline some of the web developer tools available in the major browsers: Firefox, Internet Explorer, Opera and Safari. This is a wholly subjective post, based on my experience as one of two developers on a very large AJAX application at Saron Education. Firefox Firefox has arguably got the best web development [...]]]></description>
			<content:encoded><![CDATA[<p>In this post, I&#8217;ll outline some of the web developer tools available in the major browsers: Firefox, Internet Explorer, Opera and Safari. This is a wholly subjective post, based on my experience as one of two developers on a very large AJAX application at <a title="Saron Education" href="http://www.saroneducation.com/">Saron Education</a>.</p>
<h2>Firefox</h2>
<p>Firefox has arguably got the best web development tools available, all of which can be downloaded from the <a title="Firefox Addons" href="https://addons.mozilla.org/en-US/firefox/">Firefox Addons</a> site. The two which I find most useful are the <a title="Firefox Addon: Web developer toolbar" href="https://addons.mozilla.org/en-US/firefox/addon/60">Web Developer Toolbar</a>, by <a title="Chris Pederick" href="http://chrispederick.com/work/web-developer/">Chris Pederick</a>, and the often-copied <a title="Firefox Addon: Firebug" href="https://addons.mozilla.org/en-US/firefox/addon/1843">Firebug</a> (<a href="http://www.getfirebug.com">official website</a>), which itself sports a variety of addons.</p>
<h3>Web Developer Toolbar</h3>
<p>The web developer toolbar is useful for quickly enabling and disabling features of your site, checking CSS, emulating mobile browser rendering, and controlling Firefox more precisely. Personally, I find its most useful features are the ability to:</p>
<ul>
<li>Disable the browser cache entirely, which removes the need for Control-Refresh or cache-clearing;</li>
<li>Outline deprecated elements, or any particular set of elements in a variety of fashions, which is very useful for updating old sites;</li>
<li>Extract colour information from the current website; and</li>
<li>View the cookie information for the current site.</li>
</ul>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/60">Download the Web Developer Toolbar</a></p>
<h3>Firebug</h3>
<p>I sometimes wonder how I ever managed to develop web applications without Firebug. Firebug allows you to alter CSS styles on the fly, edit the HTML contents of the page on the fly, visually watch the DOM being changed by your scripts, debug your scripts, type and run JavaScript straight from the browser, visualise network activity, inspect XMLHttpRequests, and much much more besides. Firebug is, in my experience, the most mature, stable, and efficient of all the tools in this survey.</p>
<p>The features of Firebug which I find most useful are:</p>
<ul>
<li>The ability to &#8216;inspect&#8217; the DOM visually (by clicking on elements within the page), then alter their attributes, styles, and even their content dynamically;</li>
<li>The ability to watch the effects of DOM alterations by running scripts;</li>
<li>The console, with which you can craft and run JavaScript which is run as though it were part of the page itself;</li>
<li>The network monitor, which allows you to view all the POSTs and GETs your XMLHttpRequests create.</li>
</ul>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/1843">Download Firebug</a></p>
<h2>Internet Explorer</h2>
<p>Until IE 8, the tools available to developers in IE were woeful at best. Fortunately, however, Microsoft has got their act together, and mimicked Firebug for version 8. The features made available in this tool include</p>
<ul>
<li>The ability to interrogate the DOM to view style information about elements (changing attributes and styles hardly ever seems to work in the latest Beta, so viewing them is all you can really achieve);</li>
<li>A console, with which you can craft and run Javascript as though it were embedded in the page;</li>
<li>Javascript debugging.</li>
</ul>
<p>Unfortunately, these tools are still very much in beta, and are very buggy. As I mentioned, altering element attributes and styles hardly has any effect. Also, the CSS inspection system is poorly laid out and often just plain wrong. The console is well-implemented. The entire system is definitely a step in the right direction, but it suffers from bugs and lack of innovation. Also, it seems to slow down and destabilise the entire browser.</p>
<p>Internet Explorer 8&#8242;s developer tools are built in; access them with the F12 key.</p>
<h2>Opera</h2>
<p>Opera&#8217;s developer tools, codenamed &#8216;Dragonfly&#8217;, sit between Firebug and IE in terms of functionality and facility. The DOM inspection and manipulation tools work really well (as well as Firebug), and are more immediately configurable, thanks to a variety of toolbar buttons. Dragonfly doesn&#8217;t have a console; rather, it uses a &#8216;command line&#8217; interface. The difference is that where the console in Firebug and IE has seperate areas for input and output (what you type and what it does), the command line mixes these two together, much like a Unix shell or DOS. Personally, I prefer the console paradigm, but it&#8217;s much of a muchness.</p>
<p>Opera&#8217;s Dragonfly is built in; access it by going to Tools -&gt; Advanced -&gt; Developer tools.</p>
<h2>Safari</h2>
<p>As with most Apple products, the developer tools in Safari are very pretty. There is a console akin to that in Firebug and IE, and you can inspect and manipulate the DOM. Unfortunately, however, the tools are quite buggy, and often fall down. Whilst the tools are very pretty, they don&#8217;t seem to be as stable even as IE 8&#8242;s.</p>
<p>Safari&#8217;s web developer tools are built in; access them enabling the develop menu from the Advanced tab of the config, then choosing the appropriate menu item from the Develop menu.</p>
<h2>Conclusions</h2>
<p>Whilst Firebug is still by far the best tool available for web developers, the widespread development of tools by browser developers means that cross-browser debugging and development is becoming ever easier. Hopefully the tools will foster competition, so that feature sets and stability improve in all the tools.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryvan.com.au/2009/01/web-developer-tools/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Geany IDE: Tango dark colour scheme</title>
		<link>http://www.barryvan.com.au/2009/01/geany-ide-tango-dark-colour-scheme/</link>
		<comments>http://www.barryvan.com.au/2009/01/geany-ide-tango-dark-colour-scheme/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 21:46:22 +0000</pubDate>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[geany]]></category>
		<category><![CDATA[tango]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://barryvan.com.au/wp/?p=16</guid>
		<description><![CDATA[Now on GitHub I&#8217;ve decided to host this theme on GitHub, in the hopes that it will be easier for people to contribute, modify, and extend it. Head over to the GitHub page to download and/or fork the theme! Recent changes Added in batisteo&#8217;s python filetype &#8212; much appreciated! I&#8217;ve updated the scheme slightly, to [...]]]></description>
			<content:encoded><![CDATA[<h3>Now on GitHub</h3>
<p>I&#8217;ve decided to host this theme on GitHub, in the hopes that it will be easier for people to contribute, modify, and extend it. Head over to <a href="https://github.com/barryvan/Geany-Tango-Dark">the GitHub page</a> to download and/or fork the theme!</p>
<h3>Recent changes</h3>
<ul>
<li>Added in batisteo&#8217;s python filetype &#8212; much appreciated!</li>
<li>I&#8217;ve updated the scheme slightly, to better support CSS3 functionality, JavaScript highlighting, and more languages. The list of supported languages below has been updated.</li>
</ul>
<p>Geany is a lightweight IDE for Linux and Windows, and it&#8217;s quickly become my favourite, even going so far as to supplant VIM in many of my day-to-day tasks. I&#8217;ve started putting together a dark Tango-based theme for the Geany IDE. So far, the coloured filetypes include:</p>
<ul>
<li>C</li>
<li>C++</li>
<li>CSS</li>
<li>HTML</li>
<li>Java</li>
<li>Javascript</li>
<li>PHP</li>
<li>SGML</li>
<li>Shell scripts</li>
<li>XHTML</li>
</ul>
<p>The colours are loosely based on the Dark Geany project.</p>
<p><a href="https://github.com/barryvan/Geany-Tango-Dark">Get it from GitHub!</a> (Or <a href="http://www.barryvan.com.au/geany/geany-darkTango.zip">download</a> the original package, which is probably out of date.)</p>
<p><img title="Geany dark Tango colour scheme: Javascript" src="http://www.barryvan.com.au/wp-content/uploads/2009/01/geanydarkscreenshotjavascript.png" alt="Geany dark Tango colour scheme screenshot" style="-moz-box-shadow:2px 2px 4px rgba(0,0,0,0.5); -webkit-box-shadow: 2px 2px 4px rgba(0,0,0,0.5); box-shadow: 2px 2px 4px rgba(0,0,0,0.5);"/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryvan.com.au/2009/01/geany-ide-tango-dark-colour-scheme/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
	</channel>
</rss>

