<?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>Traversal &#187; General</title>
	<atom:link href="http://traversal.com.au/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://traversal.com.au</link>
	<description></description>
	<lastBuildDate>Fri, 18 May 2012 07:46:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>TextMate Math Bundle and the Box Model</title>
		<link>http://traversal.com.au/blog/2007/09/14/textmate-math-bundle-and-the-box-model/</link>
		<comments>http://traversal.com.au/blog/2007/09/14/textmate-math-bundle-and-the-box-model/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 03:25:50 +0000</pubDate>
		<dc:creator>Travis Hensgen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://mondea.com.au/blog/?p=5</guid>
		<description><![CDATA[TextMate has plenty of great bundles that support HTML and CSS development, but perhaps less obvious is the Math bundle, which can help you brainlessly calculate the correct width value for your layouts.]]></description>
			<content:encoded><![CDATA[<p>I love <a href="http://macromates.com">TextMate</a>, oh yes I do. One thing I&#8217;ve found incredibly useful lately is the Math Bundle, which you can install yourself by pasting <a href="http://netcetera.org/cgi-bin/tmbundles.cgi?bundle=Math">the script listed here</a> into a Terminal window.</p>
<p>So, you know how in the CSS box model padding is NOT regarded as part of the width of the box, and you always have to rack your brain to subtract out the padding from the marquee you&#8217;ve measured in your graphics app? Well, not any more!</p>
<p>The Math bundle, among other things, lets you evaluate arithmetic expressions in your text documents. So let&#8217;s say I&#8217;ve got a div (#column_1) that has horizontal padding of 26 pixels, but a total width of 228 pixels as in the image below:</p>
<p><img src="http://traversal.com.au/images/tm_math_01.png" alt="" /></p>
<p>All those CSS experts out there know that I really need the width set to 228 &#8211; 26*2 pixels to take the padding into account, so let&#8217;s type that out:</p>
<p><img src="http://traversal.com.au/images/tm_math_02.png" alt="" /></p>
<p>Now, before I grab that sheet of paper and/or caffeine to do the sums, I just highlight the expression, press Shift-Ctrl-C and I get this:</p>
<p><img src="http://traversal.com.au/images/tm_math_03.png" alt="" /></p>
<p>Now I hit 2 to <strong>replace</strong> the expression (since my browser surely won&#8217;t understand my advanced mathematics), and voila! Instant box-model love:</p>
<p><img src="http://traversal.com.au/images/tm_math_04.png" alt="" /></p>
<p>Like I said, you gotta love TextMate! Makes me wonder why I even bothered studying maths up to a university level&#8230; </p>
]]></content:encoded>
			<wfw:commentRss>http://traversal.com.au/blog/2007/09/14/textmate-math-bundle-and-the-box-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>


<!-- W3 Total Cache: Page cache debug info:
Engine:             disk (enhanced)
Key:                category/general/feed/_index.html
Caching:            enabled
Status:             not cached
Creation Time:      0.254s
Header info:
X-Pingback:         http://traversal.com.au/xmlrpc.php
ETag:               "a5f57dbb29bdbd536820c6486321e873"
X-Powered-By:       W3 Total Cache/0.9.1.3
Content-Type:       text/xml; charset=UTF-8
Last-Modified:      Sat, 19 May 2012 16:39:55 GMT
Vary:               Accept-Encoding, Cookie
Content-Encoding:   gzip
-->
