Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables,mixins, selector inheritance, and more. It’s translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.
Sass for Visual Studio is a Visual Studio Add-in that compiles scss code into css for you. After you install the add-in, you’ll be able to right click on a project and click on a menu item (“Convert SCSS to CSS”) that will scan every scss file in the project and create respective css files for each of those (in the same folder) and also continuously “watch” the scss files for changes, meaning, as soon as you save a change to an scss file, it’ll immediately update the corresponding css file.
Sound good? Ready to set it up? Ok, let’s get started.
Go to RubyInstaller.org and install the latest version of Ruby (if you don’t already have it). I downloaded the Ruby 1.9.2-p136 package.
Make sure you check “Add Ruby executables to your path” (as shown below) during the installation.
If you don’t know what Haml is, don’ t worry. All you need to know is that Sass is bundled with Haml, which means you need to get Haml to get Sass. And that’s what we’ll do next.
Close all command prompts if you have any open. Open a new command prompt window and run the following command.
gem install haml
If things went ok, here’s what it should look like.
Now it’s time to install Sass for Visual Studio Add-in. Here are setup files – Download
Just do the regular setup. Should be straight forward.
Let’s test the add-in now. Close all instances of Visual Studio 2010. Open a new instance and create an empty web application.
I renamed the project to Test. But it doesn’t make any difference what you name it. I just didn’t want you guys to be confused by the following screenshots in which the project says “Test”.
Again, name of the CSS file doesn’t matter because we are about to rename it.
Change it from stylesheet1.css to base.scss. Note the extra *s* in the file extension. S stands for Sassy (not kidding).
Now add the following code to the file. (Also note that this is not plain css. Look at the nesting.)
#navbar {
width: 80%;
height: 20px;
ul { list-style-type: none; }
li {
float: left;
a { font-weight: bold; }
}
}
Right click on the project and click “Convert SCSS to CSS”
A new file named base.css should have been created. Include that file in the project and open it to make sure it has the following code.
#navbar {
width: 80%;
height: 30px; }
#navbar ul {
list-style-type: none; }
#navbar li {
float: left; }
#navbar li a {
font-weight: bold; }
The above code is regular css that was rendered from the code in base.scss by the ruby script.

Make a change to base.scss and watch base.css get updated instantly (No need to click on the add-in menu item again). The red arrows in the image below point to the change made in the scss file and the pop up tells you that base.css got updated.
Do it the old-school way. Go to Control Panel > Programs > Uninstall a program and remove it from there.
Restart Visual Studio.
Open a solution and right click on a project. If the menu item is still there, click on it and Visual Studio will prompt you to remove it.
So please forgive any bugs. And if you really care, send me a tweet @appoosa for quicker response or shoot me an email - girish@giri.sh
UPDATE:: I’ve opened up this project to the open-source community. You can find it here – https://github.com/appoosa/Sass-For-Visual-Studio
SECOND UPDATE::Based on the feedback, it looks like SASS is a separate install now. So after Step 2 above, run the following command.
gem install sass
And then proceed with Step 3 and continue the process as mentioned above.