<?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>tactile &#187; Tools</title>
	<atom:link href="http://tactile.co.za/blog/category/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://tactile.co.za/blog</link>
	<description>- thoughts on CSS, UIs and UX.</description>
	<lastBuildDate>Sun, 18 Sep 2011 14:43:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>LESSCSS</title>
		<link>http://tactile.co.za/blog/2010/lesscss/</link>
		<comments>http://tactile.co.za/blog/2010/lesscss/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 14:08:30 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://tactile.co.za/blog/?p=7</guid>
		<description><![CDATA[After 2 weeks of using LESS.app, I thought I'd share my thoughts on this nifty little CSS authoring timesaver.]]></description>
			<content:encoded><![CDATA[<p>2 weeks ago, <a href="http://vhata.net/">Jonathan</a> dropped me an <acronym title="Instant Message">IM</acronym> concerning a nifty little Mac OSX app called <a href="http://incident57.com/less/">LESS</a>. Essentially, LESS.app is a fancy GUI for a Ruby gem called <a href="http://lesscss.org/">LESSCSS</a>, a CSS parsing and authoring tool designed to speed up CSS development.</p>
<p><a href="http://incident57.com/less/"><img class="alignnone size-full wp-image-21" title="LESS.app" src="http://tactile.co.za/blog/wp-content/uploads/2010/02/less_logo.png" alt="" width="314" height="124" /></a><br />
I&#8217;m not going to go into detail about it&#8217;s function, but what I will do is give a review, highlight its pros and cons and maybe even offer some mixins you can use.<br />
<span id="more-7"></span></p>
<h3>Setting up</h3>
<p>Installing LESS.app was a breeze, and being familiar with installing Ruby Gems, the command-line app LESSCSS was also swiftly installed.<br />
My initial reasons for using LESS was to use the Mixin functionality, and create a library of common mixins I tend to use on each project.  I was hoping that I could store this &#8216;common library&#8217; in a central place and reference it from all my projects &#8211; this was not the case, as all LESS imports have to be sourced from the same folder.</p>
<h3>Pros and Cons</h3>
<p>In these 2 weeks of using LESS, I&#8217;ve noticed a few limitations &#8211; they&#8217;re not deal-breakers, but then I haven&#8217;t used LESS in a team-environment yet.</p>
<h4>Pros:</h4>
<ul>
<li>LESS Syntax is very similar to CSS, which makes it easier to use than SASS.</li>
<li>Storing your common mixins in a separate file speeds up development on subsequent projects</li>
<li>Non-invasive file monitoring means your LESS files are compiled as you save them.  No need for compiling manually.</li>
</ul>
<h4>Cons:</h4>
<ul>
<li>No support as yet for some dynamic mixins that use proprietary properties such as Microsoft&#8217;s <code>alpha(opacity)</code> property</li>
<li>Multiple comma-separated ancestral selectors are converted into multiple selectors, dropping the comma in the selector and repeating the rule each time over.</li>
<li>Larger, more numerous imports and more complex LESS files take longer to compile.  I find I&#8217;m often refreshing my browser twice because I refreshed before the CSS was compiled.</li>
</ul>
<p>Talking of a team-environment&#8230; everyone who touches the CSS would have to use LESS, else there&#8217;ll be some crazy merging going on when someone updates the CSS and not the source LESS files.</p>
<p>All that said, I&#8217;d recommend using LESS to anyone who&#8217;s working on their CSS independently.</p>
<h3>Further exploration</h3>
<p>The compiling side of LESS CSS must  surely be able to minify the output!  At the moment it dumps each property on a new line, leading to horrendously long CSS files with lots of whitespace.  (I&#8217;m a big fan of multiple properties per line for each selector)  I&#8217;ll see what I can find in terms of <code>lessc</code> options, but for now it&#8217;s not a big issue.</p>
<h3>Momentum</h3>
<p>After I subscribed to the <a href="http://groups.google.com/group/lesscss">LESSCSS Google Group</a> and read through a few of the discussions, I noticed that there seems to be some momentum in the project, but not a lot.  There are plenty of new users asking questions, but not a lot of active developer feedback. (Probably because <a href="http://twitter.com/cloudhead">cloudhead</a> is working on <a href="http://github.com/cloudhead/less.js">LESS.js</a> at the moment)  Maybe that&#8217;s a call for more community involvement in the app.  If you&#8217;ve done work on Ruby gems before, why not <a href="http://github.com/cloudhead/less/tree">get involved with LESS on GitHub</a>?</p>
<h3>As promised&#8230;</h3>
<p>&#8230;some mixins I use already:</p>
<p>Cross-browser border-radius, still no IE support though</p>
<pre class="brush: css; title: ; notranslate">
.border-radius (@radius:5px) {border-radius:@radius; -moz-border-radius:@radius; -webkit-border-radius:@radius;}
.border-radius-top-left (@radius:5px) {border-radius-top-left:@radius; -moz-border-radius-topleft:@radius; -webkit-border-top-left-radius:@radius; }
.border-radius-top-right (@radius:5px) {border-radius-top-right:@radius; -moz-border-radius-topright:@radius; -webkit-border-top-right-radius:@radius;}
.border-radius-bottom-left (@radius:5px) {border-radius-bottom-left:@radius; -moz-border-radius-bottomleft:@radius; -webkit-border-bottom-left-radius:@radius;}
.border-radius-bottom-right (@radius:5px) {border-radius-bottom-right:@radius; -moz-border-radius-bottomright:@radius; -webkit-border-bottom-right-radius:@radius;}
</pre>
<p>IE 6 &amp; 7 hack to support min-height</p>
<pre class="brush: css; title: ; notranslate">
.ie_min-height (@height:300px) {height:auto !important; height:@height;}
</pre>
<p>Malarkey Image Replacement</p>
<pre class="brush: css; title: ; notranslate">
.mir () {text-indent:-1000em; letter-spacing:-1000em; overflow:hidden;}
</pre>
<p>&#8216;Off-left&#8217; screen-reader supporting layer hiding</p>
<pre class="brush: css; title: ; notranslate">
.off_left () {display:block; position:absolute; top:0; left:-9999em;}
</pre>
<p>Cross-browser Opacity &#8211; Missing IE filters: not supported in LESS yet.</p>
<pre class="brush: css; title: ; notranslate">
.opacity (@opacity_percent:50) {-moz-opacity:@opacity_percent / 100; opacity:@opacity_percent / 100;}
</pre>
<p>Self-clearing for Non-IE browsers: Apply to :after the float container</p>
<pre class="brush: css; title: ; notranslate">
.self_clearing () {content:&quot;.&quot;; display:block; clear:left; visibility:hidden; height:0; width:0;}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tactile.co.za/blog/2010/lesscss/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

