<?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>www.huedesigner.com</title>
	<atom:link href="http://huedesigner.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://huedesigner.com</link>
	<description>Free Resources For Designers and Developers</description>
	<lastBuildDate>Tue, 27 Mar 2012 09:04:53 +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>SASS, COMPASS AND SOME CLARITY</title>
		<link>http://huedesigner.com/?p=55</link>
		<comments>http://huedesigner.com/?p=55#comments</comments>
		<pubDate>Tue, 27 Mar 2012 09:04:53 +0000</pubDate>
		<dc:creator>Huedesigner</dc:creator>
				<category><![CDATA[Compass and Sass]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://huedesigner.com/?p=55</guid>
		<description><![CDATA[Having recently read HOW TO: Get Started With the COMPASS CSS Framework, I realised there is still a lot of confusion about SASS and Compass and why developers should be using them. The Mashable article is very brief and the comments below it highlight show some of the confusion surrounding the tools. My issue with the article is that it<a href="http://huedesigner.com/?p=55">&#160;&#160;[ Read More ]</a>]]></description>
			<content:encoded><![CDATA[<p>Having recently read <a href="http://mashable.com/2011/06/14/compass-css-guide/">HOW TO: Get Started With the COMPASS CSS Framework</a>, I realised there is still a lot of confusion about <a href="http://sass-lang.com/">SASS</a> and <a href="http://compass-style.org/">Compass</a> and why developers should be using them. The Mashable article is very brief and the comments below it highlight show some of the confusion surrounding the tools.</p>
<p>My issue with the article is that it really talks about SASS and not Compass, it doesn&#8217;t even show one example of the CSS3 features and it doesn&#8217;t explain the separation between the two and the benefits of using them.</p>
<p>Hopefully in this post I want to try and clear up what SASS is, what Compass is, and why, as a developer, you should let them into your life. This post won&#8217;t go into detail about each tool, but will hopefully just give you enough of a push to investigate further. The post will also try and deal with some of the common misconceptions I&#8217;ve heard and read from other developers.</p>
<p>&nbsp;</p>
<h4>WHAT IS SASS</h4>
<p>SASS is simply an extension to existing CSS features. Some of the main features include:</p>
<ul>
<li>Variables</li>
<li>Mixins</li>
<li>Nesting</li>
<li>Selector Inheritance</li>
</ul>
<p>Some of features are so useful that they are being proposed to the CSS Working Group -<a href="http://www.xanthir.com/blog/b49w0">CSSOM, Vars, Mixins, Nesting, and Modules</a>.</p>
<p>Other useful features include:</p>
<ul>
<li><a href="http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#control_directives">Control Directives</a> (if, for, each, while)</li>
<li><a href="http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#color_operations">Colour operators</a></li>
<li><a href="http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html">Colour functions</a> (incredibly useful for tweaking your colour palette)</li>
</ul>
<p>Some developers originally ignored SASS because it used a different syntax to CSS, but a while ago this all changed with the release of the SCSS format. SCSS uses the exact same formatting as standard CSS, so if you can write CSS, you can write SCSS.</p>
<p>SASS isn&#8217;t the only tool that extends the capability of CSS, however once you add in the power of Compass it should be clear why developers should be choosing SASS above the other tools.</p>
<h3>WHAT IS COMPASS</h3>
<p><a href="http://compass-style.org/">Compass</a> is an open source CSS authoring framework that makes a developer&#8217;s life much easier.</p>
<p>If you want a simpler way to maintain your grid layouts, an easier way to remember all the variations in CSS3 syntax, and a way to reuse lots of standard CSS patterns quickly, then Compass is for you.</p>
<p>Compass is built on top of SASS, so you get all the benefits of SASS as well.</p>
<p>At it&#8217;s most simplistic level, Compass provides a huge amount of mixins that developers can use of to reduce the maintenance of their CSS.</p>
<p>Some of the main features of Compass include:</p>
<ul>
<li><a href="http://compass-style.org/reference/compass/css3/">Cross browser CSS3 mixins</a> (stop trying to remember all those CSS3 browser variations)</li>
<li><a href="http://compass-style.org/reference/compass/typography/">Common typography patterns</a></li>
<li><a href="http://compass-style.org/reference/compass/utilities/">Common styling patterns</a></li>
<li><a href="http://compass-style.org/help/tutorials/spriting/">Built in spriting capabilities</a></li>
<li><a href="http://compass-style.org/reference/blueprint/">Blueprint module</a></li>
</ul>
<p>Compass also has a number of plugins that can be added to the core features to give you even more to simplify your CSS. Some of the plugins are <a href="https://github.com/chriseppstein/compass/wiki/compass-plugins">listed here</a>, however doing a quick search on github will reveal quite a few more.</p>
<p>&nbsp;</p>
<h3>MISCONCEPTIONS</h3>
<h4>&#8220;BUT I DON&#8217;T WANT TO USE RAILS&#8221;</h4>
<p>This is a pretty common argument for not using SASS or Compass. Yes, SASS and Compass rely on Ruby, but you don&#8217;t have to be using Ruby on Rails to use them. They are completely stand-alone tools and I&#8217;ve even used them when developing simple static pages. The only thing you do need is Ruby, as they are Ruby gems. The <a href="http://sass-lang.com/download.html">download page</a> of the SASS site explains how to do that.</p>
<p>&nbsp;</p>
<h4>&#8220;BUT I DON&#8217;T WANT TO INSTALL RUBY ON MY SERVER&#8221;</h4>
<p>Don&#8217;t then. Yes, you do need Ruby on your development machine, but that&#8217;s as far as you need to go. SASS compiles down to bog standard CSS so all you actually need to put onto your server is the generated CSS files.</p>
<h4>&#8220;I DON&#8217;T LIKE SASS, I PREFER LESS&#8221;</h4>
<p>In the Mashable article, one of the comments compares LESS and Compass. They are two completely different things. Sure compare LESS and SASS, but LESS and Compass are not comparable.</p>
<h4>&#8220;BUT I CAN WRITE PROPER CSS FROM SCRATCH, I DON&#8217;T NEED SOMETHING TO DO THAT FOR ME&#8221;</h4>
<p>As web developers we can all do that, but the point is that SASS and Compass offer us a way of writing more manageable code. I can guarantee you that when using these tools, you will be writing less code, changes will be quicker and easier, and therefore cheaper.</p>
<h3>ADDITIONAL READING</h3>
<p>This blog post deliberately doesn&#8217;t show many code examples, as there is just too much to cover. If you want to see some more specific examples, here are some useful references.</p>
<ul>
<li><a href="http://www.slideshare.net/chriseppstein/sass-compass-senchaconf">SASS and Compass</a></li>
<li><a href="http://awardwinningfjords.com/2010/07/30/style-guides-using-sass-extend.html">Style Guides Using Sass @extend</a></li>
<li><a href="http://chriseppstein.github.com/blog/2010/08/02/sass-extend-challenge/">SASS selector inheritance</a></li>
<li><a href="http://theled.co.uk/blog/archive/2010/06/18/semantic-960-gs-using-sass-and-compass/">Cleaner 960.gs using SASS and Compass</a></li>
</ul>
<h3>FINISHING UP</h3>
<p>So in short, SASS and Compass are here to make CSS creation and maintenance simpler and quicker, leaving you with time to do other things to make your sites even better.</p>
<p>This post doesn&#8217;t even scratch the surface of the capabilities of SASS and Compass, but hopefully it explains what they are and gives you a hint as to why you be using them as part of your development stack.</p>
<p>&nbsp;</p>
<p>The big question is do you want to be maintaining code that looks like this?</p>
<pre><code> .box-shadow-example div { width: 40px; height: 40px; background: #eeeeee; margin: 20px; float: left; } #box-shadow-default { -moz-box-shadow: 0px 0px 5px #333333; -webkit-box-shadow: 0px 0px 5px #333333; -o-box-shadow: 0px 0px 5px #333333; box-shadow: 0px 0px 5px #333333; } #box-shadow-custom { -moz-box-shadow: red 2px 2px 10px; -webkit-box-shadow: red 2px 2px 10px; -o-box-shadow: red 2px 2px 10px; box-shadow: red 2px 2px 10px; } #box-shadow-custom-multiple { -moz-box-shadow: rgba(0, 0, 255, 0.4) 0 0 25px, rgba(0, 128, 0, 0.2) 0 0 3px 1px inset; -webkit-box-shadow: rgba(0, 0, 255, 0.4) 0 0 25px, rgba(0, 128, 0, 0.2) 0 0 3px 1px inset; -o-box-shadow: rgba(0, 0, 255, 0.4) 0 0 25px, rgba(0, 128, 0, 0.2) 0 0 3px 1px inset; box-shadow: rgba(0, 0, 255, 0.4) 0 0 25px, rgba(0, 128, 0, 0.2) 0 0 3px 1px inset; } </code></pre>
<p>Or like this?</p>
<pre><code> @import "compass/css3"; .box-shadow-example div { width: 40px; height: 40px; background: #eeeeee; margin: 20px; float: left; } // Default single box shadow #box-shadow-default { @include single-box-shadow; } // Box shadow with custom settings #box-shadow-custom { @include box-shadow(red 2px 2px 10px); } #box-shadow-custom-multiple { @include box-shadow(rgba(blue, 0.4) 0 0 25px, rgba(green, 0.2) 0 0 3px 1px inset); }</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://huedesigner.com/?feed=rss2&#038;p=55</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to Compass &amp; Sass</title>
		<link>http://huedesigner.com/?p=52</link>
		<comments>http://huedesigner.com/?p=52#comments</comments>
		<pubDate>Tue, 27 Mar 2012 09:00:20 +0000</pubDate>
		<dc:creator>Huedesigner</dc:creator>
				<category><![CDATA[Compass and Sass]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://huedesigner.com/?p=52</guid>
		<description><![CDATA[What are CSS Preprocessors? What is Sass? What is Compass? Why should I use Sass and/or Compass? How should I use Sass and/or Compass? How do I get up and running with Sass/Compass? How do I make Compass autogenerate sprites for me? These questions and more will be answered in this presentation. Repo with slides<a href="http://huedesigner.com/?p=52">&#160;&#160;[ Read More ]</a>]]></description>
			<content:encoded><![CDATA[<div></div>
<ul>
<li>What are CSS Preprocessors?</li>
<li>What is Sass?</li>
<li>What is Compass?</li>
<li>Why should I use Sass and/or Compass?</li>
<li>How should I use Sass and/or Compass?</li>
<li>How do I get up and running with Sass/Compass?</li>
<li>How do I make Compass autogenerate sprites for me?</li>
</ul>
<p>These questions and more will be answered in this presentation.</p>
<p><a href="https://github.com/geekyMoa/DrupalCamp-2011-SASS-Demo">Repo with slides and the demo site</a></p>
<p><a href="https://github.com/emattias/sassy-base">Repo with our base mixins</a></p>
<div>
<h2></h2>
<div></div>
</div>
<div>
<div>Video:</div>
<div>
<div>
<div>
<div id="media-vimeo-1"><iframe src="http://player.vimeo.com/video/32150679?fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;autoplay=0" width="425" height="350"></iframe></div>
</div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://huedesigner.com/?feed=rss2&#038;p=52</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Compass and Sass for CSS in your Next Project</title>
		<link>http://huedesigner.com/?p=34</link>
		<comments>http://huedesigner.com/?p=34#comments</comments>
		<pubDate>Tue, 27 Mar 2012 07:11:35 +0000</pubDate>
		<dc:creator>Huedesigner</dc:creator>
				<category><![CDATA[Compass and Sass]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://huedesigner.com/?p=34</guid>
		<description><![CDATA[What is Sass? Sass is simply a different way to work with CSS. It allows you to keep your CSS code very simple and helps increase readability. It takes something like this: And turns it into: You can check out Sass at http://sass-lang.com/ What is Compass? Compass makes working with Sass even easier. The author, Chris Eppstein,<a href="http://huedesigner.com/?p=34">&#160;&#160;[ Read More ]</a>]]></description>
			<content:encoded><![CDATA[<h3>What is Sass?</h3>
<p>Sass is simply a different way to work with CSS. It allows you to keep your CSS code very simple and helps increase readability. It takes something like this:</p>
<div><img src="http://d2o0t5hpnwv4c1.cloudfront.net/421_sass/1.png" alt="" border="0" /></div>
<p>And turns it into:</p>
<div><img src="http://d2o0t5hpnwv4c1.cloudfront.net/421_sass/2.png" alt="" border="0" /></div>
<p>You can check out Sass at <a href="http://sass-lang.com/">http://sass-lang.com/</a></p>
<h3>What is Compass?</h3>
<p><a href="http://compass-style.org/">Compass</a> makes working with Sass even easier. The author, Chris Eppstein, has also included some converted frameworks such as Blueprint, YUI, and 960.gs. It also easily integrates with Ruby based projects, but is just as easy to add to any other project. Compass is open-source and is extremely well documented. Check out the <a href="http://github.com/chriseppstein/compass/tree/master">source</a> and <a href="http://wiki.github.com/chriseppstein/compass/">documentation</a>.</p>
<div><img src="http://d2o0t5hpnwv4c1.cloudfront.net/421_sass/3.png" alt="" border="0" /></div>
<h3>Installation</h3>
<p>Both Sass (which is part of the Haml Project) and Compass are installed through RubyGems. If you dont have any clue what I am talking about, check out &#8220;Step 1 – Installing Ruby on Rails&#8221; of my previous article<a href="http://net.tutsplus.com/tutorials/ruby/ruby-on-rails-for-designers/">Ruby on Rails for Designers</a>, and follow the steps down until you hit the section named &#8220;Installing Rails&#8221;.</p>
<p>To install both of these gems, we can just run a single command:</p>
<div>
<ol start="1">
<li>(sudo) gem install haml chriseppstein-compass</li>
</ol>
</div>
<div><img src="http://d2o0t5hpnwv4c1.cloudfront.net/421_sass/4.png" alt="" border="0" /></div>
<p>As long as it says that it successfully installed both gems, you are good to go!</p>
<h3>Project Setup</h3>
<p>If you are working with a Ruby-based project then check out the documentation as it will explain how to get it working with your specific framework, but I’ll assume we are working with a simple HTML or the like project.</p>
<p>The compass command has a lot of options, and if you run compass –help, you might see:</p>
<div><img src="http://d2o0t5hpnwv4c1.cloudfront.net/421_sass/5.png" alt="" border="0" /></div>
<p><small>FYI: The next to top line that says &#8220;Loading haml-edge gem.&#8221; is because I use the latest version, so you don’t need to worry about it if yours says something different.</small></p>
<p>Now we are going to start our Compass project. To create run the following command (including the trailing period, that tells compass where we want to make our project!)</p>
<div>
<div>
<div><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">view plain</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">print</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">?</a></div>
</div>
<ol start="1">
<li>compass  &#8211;sass-dir=sass .</li>
</ol>
</div>
<p>And you should see:</p>
<div><img src="http://d2o0t5hpnwv4c1.cloudfront.net/421_sass/6.png" alt="" border="0" /></div>
<p>Where initializing, Compass would normally default to having the Sass in a folder name src, but I wanted to change that so I added the option. If you look at the folder, you should see a file named config.rb and two other folders.</p>
<div><img src="http://d2o0t5hpnwv4c1.cloudfront.net/421_sass/7.png" alt="" border="0" /></div>
<p>The config.rb is the configuration that Compass looks at, but most of the time you wont need to mess with this. Also, like the output from the creation command says, we have three ways of updating our CSS from our Sass:</p>
<ul>
<li><code>compass</code> – using this option, you would have to be in the correct directory, and then Compass would compile your Sass once.</li>
<li><code>compass -u path/to/project</code> – this is about the same as the command as above, but you do not have to be in the project directory, and rather pass in it with the command.</li>
<li><code>compass --watch [path/to/project]</code> – this command is pretty awesome in that it watches for any changes to your Sass files and will automatically recompile them whenever a change is detected.</li>
</ul>
<p>Now that you know how to setup a project, I’ll explain some of the &#8220;rules&#8221; of working with Sass</p>
<h3>Sass Syntax</h3>
<p>Normally when writing CSS, you would write something like:</p>
<div>
<div>
<div><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">view plain</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">print</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">?</a></div>
</div>
<ol start="1">
<li>#header {width: 900px; background:#111;}</li>
<li>#header a {color:#000; text-decoration:none;}</li>
</ol>
</div>
<p>One of the problems with that is that you are repeating the same name many times. Lets make this into Sass. I am going to be working in the screen.sass file, so delete everything and your Sass would like:</p>
<div>
<div>
<div><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">view plain</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">print</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">?</a></div>
</div>
<ol start="1">
<li>#header</li>
<li>  :width 900px</li>
<li>  :background #111</li>
<li>  a</li>
<li>    :color #000</li>
<li>    :text-decoration none</li>
</ol>
</div>
<div><img src="http://d2o0t5hpnwv4c1.cloudfront.net/421_sass/8.png" alt="" border="0" /></div>
<p>Personally, that it much easier to read and write this way, no curly braces or semicolons. The way that Sass understand the nesting is through indentation.</p>
<p>The first selector is not indented at all so the final CSS with start with that. Also, all properties, (so color, height width, etc) begin with a colon. So for the properties for #header they are indented. It does not matter if you use tabs or spaces, but you must remain consistent, otherwise you will see an error (which I’ll show in just a minute).</p>
<p>So now that you have your properties, we have our next selector. Since this is indented to the same as the properties, the CSS output will be <code>#header a ...</code></p>
<p>Now that we are this far, lets try compiling: (in your project directory)</p>
<div>
<ol start="1">
<li>compass</li>
</ol>
</div>
<div><img src="http://d2o0t5hpnwv4c1.cloudfront.net/421_sass/9.png" alt="" border="0" /></div>
<p><img src="http://d2o0t5hpnwv4c1.cloudfront.net/421_sass/10.png" alt="" border="0" /></p>
<p>Let’s say that you didn’t indent everything the same, Compass would error:</p>
<div><img src="http://d2o0t5hpnwv4c1.cloudfront.net/421_sass/11.png" alt="" border="0" /></div>
<p>Now, once you know CSS, Sass wont be very much of a learning curve, as the main difference when getting started is the different formatting rules. Next, we will get working with some of the more advanced (but cooler!) parts of Sass.</p>
<h3>Features of Sass</h3>
<h4>Variables</h4>
<p>One awesome feature of Sass is it’s ability to use variables. An example:</p>
<div>
<div>
<div><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">view plain</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">print</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">?</a></div>
</div>
<ol start="1">
<li>!link_color = #fff</li>
<li>#header</li>
<li>  :width 900px</li>
<li>  :background #111</li>
<li>  a</li>
<li>    :color = !link_color</li>
<li>    :text-decoration none</li>
</ol>
</div>
<p>Compiling this, would give you:</p>
<div><img src="http://d2o0t5hpnwv4c1.cloudfront.net/421_sass/12.png" alt="" border="0" /></div>
<h4>Math</h4>
<p>You may be laughing at this title, but its true, you can do math in Sass! For this demonstration, we will be using Sass’s interactive mode, so run:</p>
<div>
<ol start="1">
<li>sass -i</li>
</ol>
</div>
<p>And a little messing around would give you:</p>
<div><img src="http://d2o0t5hpnwv4c1.cloudfront.net/421_sass/13.png" alt="" border="0" /></div>
<p>Or a more visual approach:</p>
<p>#111 – #999 = #000</p>
<div></div>
<p>#111 + #999 = #aaa</p>
<div></div>
<p>#398191 + #111 = #4a92a2</p>
<div></div>
<p>#398191 – #111 = #287080</p>
<div></div>
<p>Apart from addition and subtraction, you can also multiply and divide:</p>
<p>#398191 / 2 = #1c4048</p>
<div></div>
<p>#398191 * 2 = #72ffff</p>
<div></div>
<p><small>To exit the Sass interactive mode, keypress Control-C, and then type &#8220;end&#8221;, and press enter.</small></p>
<h4>Mixins</h4>
<p>If you have ever heard of keeping your code DRY, DRY means &#8220;don&#8217;t repeat yourself.&#8221; Mixins allow you to do just that. For example, with the gaining popularity of rounded corners, you may want to create a mixin to handle that, so somewhere, (not under a selector) you would add:</p>
<div>
<div>
<div><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">view plain</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">print</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">?</a></div>
</div>
<ol start="1">
<li>=rounded</li>
<li>  :border-radius 4px</li>
<li>  :-moz-border-radius 4px</li>
<li>  :-webkit-border-radius 4px</li>
</ol>
</div>
<p>And to use, you would do something like:</p>
<div>
<div>
<div><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">view plain</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">print</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">?</a></div>
</div>
<ol start="1">
<li>#header</li>
<li>  :width 900px</li>
<li>  :background #111</li>
<li>  +rounded</li>
</ol>
</div>
<p>And when compiled:</p>
<div><img src="http://d2o0t5hpnwv4c1.cloudfront.net/421_sass/14.png" alt="" border="0" /></div>
<p>Lets say though, you may want the border radius to be variable – well you can have a mixin expect to be passed some values. Changing our mixin, it would look like:</p>
<div>
<div>
<div><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">view plain</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">print</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">?</a></div>
</div>
<ol start="1">
<li>=rounded(!radius = 4px)</li>
<li>  :border-radius = !radius</li>
<li>  :-moz-border-radius = !radius</li>
<li>  :-webkit-border-radius = !radius</li>
</ol>
</div>
<p>And then to use you could use what we did before, and then the value would default to 4px, otherwise:</p>
<div>
<div>
<div><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">view plain</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">print</a><a href="http://net.tutsplus.com/tutorials/html-css-techniques/using-compass-and-sass-for-css-in-your-next-project/#">?</a></div>
</div>
<ol start="1">
<li>#header</li>
<li>  :width 900px</li>
<li>  :background #111</li>
<li>  +rounded(8px)</li>
</ol>
</div>
<h4>Importing</h4>
<p>Sass also has the ability to import other Sass files, so lets say you wanted to import a file (in the same as this sass file), you would add:</p>
<div>
<ol start="1">
<li>@import reset.sass</li>
</ol>
</div>
<p>This feature is really nice in giving you the ability the keep extraneous styles outside your main file. For example, you could also keep a mixins sass file that you copied around projects and then a simple import would add that code it – no copy and paste.</p>
<h3>Conclusion</h3>
<p>I hope you understand the basics of using Sass and Compass and will possibly use it in your next project! Now, if you are like I was when I found Sass, and said &#8220;I don’t need this!&#8221;, give it a try. I’ve switched over to it for all of my recent projects and I really enjoy working with it.</p>
<p>Source: <a href="http://net.tutsplus.com/">http://net.tutsplus.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://huedesigner.com/?feed=rss2&#038;p=34</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

