<?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>Sam Hooker &#187; CSS</title>
	<atom:link href="http://www.samhooker.net/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.samhooker.net</link>
	<description>Sam Hooker</description>
	<lastBuildDate>Mon, 12 Mar 2012 19:34:42 +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>Using DotLESS with ASP.Net/MVC3</title>
		<link>http://www.samhooker.net/2012/02/03/using-dotless-with-asp-netmvc3/</link>
		<comments>http://www.samhooker.net/2012/02/03/using-dotless-with-asp-netmvc3/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 20:41:38 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.samhooker.net/?p=311</guid>
		<description><![CDATA[I&#8217;ve fought with this for a couple of days, mostly because I&#8217;m not a programmer &#8212; I&#8217;m a markup jockey.  I&#8217;ve been using LessCSS for a few months, ever since I heard about it at HTML5.tx.  If you&#8217;re unfamiliar with it, it&#8217;s a tool that adds things like variables and mixins to CSS.  It makes [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve fought with this for a couple of days, mostly because I&#8217;m not a programmer &#8212; I&#8217;m a markup jockey.  I&#8217;ve been using <a href="http://lesscss.org">LessCSS</a> for a few months, ever since I heard about it at <a href="http://html5tx.com">HTML5.tx</a>.  If you&#8217;re unfamiliar with it, it&#8217;s a tool that adds things like variables and mixins to CSS.  It makes theme development and modification a lot easier, and I really love it.</p>
<h2>The Problem</h2>
<p>The easy way to get started using LessCSS is to use the JavaScript implementation.  This turns a lot of people (me) off, because the thought of forcing a mission-critical resource like CSS to rely on Javascript &#8212; which may or may not be available &#8212; is horrific.</p>
<p>The second implementation that they offer is based on <a href="http://nodejs.org">Node.js</a>, which I&#8217;d sincerely love to get into someday; but it&#8217;s largely C-based, which is beyond my standard skillset.  I don&#8217;t want to have to implement a web server every time I want to sling a little style around!</p>
<h2>The .Net Curveball</h2>
<p>At <a href="http://frogslayer.com">FrogSlayer</a>, we&#8217;re a .Net development shop.  If I want the wizards with whom I work to be able to add some horsepower to the back-end of the pretty sites I make, it means I need to work with ASP.Net.  Enter <a href="http://www.dotlesscss.org">DotLESS</a>.</p>
<p>DotLESS is a .Net implementation of LessCSS.  There&#8217;s some very simple instructions available on their website that will have a programmer churning out .less stylesheets in no time flat.</p>
<p>FLAW: Programmers don&#8217;t (usually) write stylesheets.  Designers do, and we&#8217;re the ones who are desperately trying to get this technology working!  The assumptions made in all of the documentation I&#8217;ve seen &#8212; essentially everything about .Net that programmers know and designers don&#8217;t &#8212; stopped me dead in my tracks.</p>
<h2>The Solution</h2>
<p>I beat my head against this for a couple of days, drank several whiskeys and even cried a little bit &#8212; but I finally put together a quickie set of instructions for getting DotLESS working with a new ASP.Net w/ MVC3 web application.  Here are my steps, recorded primarily so I can remember them.  This assumes you have Visual Studio 2010 and MVC3 installed.</p>
<ol>
<li>Acquire DotLESS</li>
<ul>
<li>Go to <a href="https://github.com/dotless/dotless/downloads">https://github.com/dotless/dotless/downloads</a></li>
<li>If you don&#8217;t want to use Git to download the source and build it yourself, just download the ZIP file containing the latest release.</li>
<li>The only thing you really need is the <strong>dotless.Core.dll</strong> file in the ZIP file; extract it to your desktop.</li>
</ul>
<li>Open Visual Studio and create a new ASP.Net/MVC3 Web Application (I used the <em>Internet Application</em> template).</li>
<ul>
<li>Add the dotless.Core.dll file to the project (wherever you like; I usually add a root-level <em>Resources</em> directory for things like this).</li>
<li>Make a reference in the project to the dotless.Core.dll file.</li>
</ul>
<li>In the Content directory, rename <em>Site.css</em> to <em>Site.less</em></li>
<li>In Views\Shared\_Layout.cshtml, change the stylesheet &lt;link&gt; tag from .css to .less</li>
<li>Right-click Content directory</li>
<ul>
<li><em>Add &gt; New Item&#8230; &gt; Web Configuration File </em></li>
<li>Replace the pre-generated contents with the following:</li>
</ul>
</ol>
<pre>&lt;?xml version="1.0"?&gt;
&lt;configuration&gt;
&lt;configSections&gt;
&lt;section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler,dotless.Core" /&gt;
&lt;/configSections&gt;
&lt;system.web&gt;
&lt;httpHandlers&gt;
&lt;add verb="*" path="*.less" validate="false" type="dotless.Core.LessCssHttpHandler" /&gt;
&lt;/httpHandlers&gt;
&lt;/system.web&gt;
&lt;/configuration&gt;</pre>
<p>That&#8217;s it!  Build and run the project, and you should be able to start rolling LessCSS into the Site.less file (or replace it altogether).  Happy styling!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.samhooker.net/2012/02/03/using-dotless-with-asp-netmvc3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New FrogSlayer site launched</title>
		<link>http://www.samhooker.net/2011/02/24/new-frogslayer-site-launched/</link>
		<comments>http://www.samhooker.net/2011/02/24/new-frogslayer-site-launched/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 21:31:44 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.samhooker.net/?p=215</guid>
		<description><![CDATA[I&#8217;ve been stepping up my WordPress development skills, and I&#8217;ve put up a new FrogSlayer.com today that&#8217;s far better-looking than its predecessor. I&#8217;m working on a few other WordPress themes at the moment, and I&#8217;m trying to decide if I like Microsoft WebMatrix.  I&#8217;m sure it will come in handy for deploying some CMSes with [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been stepping up my WordPress development skills, and I&#8217;ve put up a new <a title="FrogSlayer Software Development" href="http://frogslayer.com" target="_blank">FrogSlayer.com</a> today that&#8217;s far better-looking than its predecessor.</p>
<p><a href="http://frogslayer.com"><img class="alignnone" title="FrogSlayer Software Development" src="http://www.samhooker.net/wp-content/themes/samhooker/images/frogslayer.jpg" alt="FrogSlayer Software Development" width="200" height="200" /></a></p>
<p>I&#8217;m working on a few other WordPress themes at the moment, and I&#8217;m trying to decide if I like <a title="WebMatrix" href="http://http://www.microsoft.com/web/webmatrix/" target="_blank">Microsoft WebMatrix</a>.  I&#8217;m sure it will come in handy for deploying some CMSes with which I&#8217;m less familiar, but it&#8217;s actually easier to deploy WordPress without it (using XAMPP instead).  The <em>Visual Studio-esque</em> file editor is nice, but get this &#8212; <strong>it lags.</strong> Seriously.  Both of my laptops have dual-core processors and 4 GB of RAM, and neither one should lag on text entry.</p>
<p>I think I&#8217;ll stick with <a title="Notepad++" href="http://notepad-plus-plus.org/" target="_blank">Notepad++</a>, thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.samhooker.net/2011/02/24/new-frogslayer-site-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inconsistent CSS: DIV widths in IE and FireFox</title>
		<link>http://www.samhooker.net/2010/05/09/inconsistent-css-div-widths-in-ie-and-firefox/</link>
		<comments>http://www.samhooker.net/2010/05/09/inconsistent-css-div-widths-in-ie-and-firefox/#comments</comments>
		<pubDate>Mon, 10 May 2010 03:25:01 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Standards]]></category>

		<guid isPermaLink="false">http://samhooker.net/?p=144</guid>
		<description><![CDATA[If you&#8217;ve ever tested your pages in more than one browser (and you always should), you&#8217;ve probably run into a situation where Internet Explorer and Firefox rendered the width of one of your &#60;div&#62;s differently. Fix it in one, and the other is wrong. What&#8217;s going on? This is typically referred to as the box [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever tested your pages in more than one browser (and you always should), you&#8217;ve probably run into a situation where Internet Explorer and Firefox rendered the width of one of your &lt;div&gt;s differently.  Fix it in one, and the other is wrong.</p>
<p>What&#8217;s going on?</p>
<p>This is typically referred to as the <strong>box model problem</strong>.  IE and FF interpret the <em>padding</em> element differently.  Chances are you&#8217;ve pulled up this article in a teeth-grinding search to correct the problem, so I&#8217;ll just make with the solution:</p>
<p><strong>Add another &lt;div&gt; for your padding.</strong></p>
<blockquote><p><em>&lt;div class=&#8221;TheStuffYouAlreadyHave&#8221;&gt;<br />
&nbsp;&nbsp;&lt;div class=&#8221;ThePaddingYouSeparated&#8221;&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Content<br />
&nbsp;&nbsp;&lt;/div&gt;<br />
&lt;/div&gt;</em>
</p></blockquote>
<p>Support web standards!  Go to <a href="http://webstandards.org target="_blank">WebStandards.org</a>, educate yourself, and prevent articles like this from being necessary!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.samhooker.net/2010/05/09/inconsistent-css-div-widths-in-ie-and-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

