views:

833

answers:

1

Has anyone done any development of Compass for CSS/SASS in a standard C# ASP.NET environment (Windows XP, VS2008)?

Is there a single distribution I can just download that's ready to go for Windows or do I need install every piece of the equation and build compass myself?

Are there any plugins that make developing with Compass friendlier with VS2008 such as automagical handling of Compass/SASS in builds, syntax highlighting, and/or intellisense support?

If there aren't any VS2008 IDE plugins what are the best options for a standalone text editor for handling coding in Compass?

+1  A: 

Getting started with Compass,

First yes I have to install Ruby and the compass source and compile up my version of compass I followed the instructions on Compass's Wiki Getting Started.

After getting Compass and all it's dependencies installed and built I created my first project.

compass -f blueprint project-name

Which creates a default project with compass for the blueprint css framework, currently there's a bug in compass with the creation of the grid.png file in the images directory for compass so you need to copy the original grid.png from the source folder

C:\Ruby\lib\ruby\gems\1.8\gems\chriseppstein-compass-0.8.10
    \frameworks\blueprint\templates\project

Or similarly located file depending on where you installed everything. One of the most important changes IMO for working with compass on asp.net is to change the SASS CACHE directive of compass. The SASS CACHE creates a bunch of temporary folders in your project directory which probably would have poor outcomes if they ended under source control. So open up config.rb and add this line

sass_options = {:cache_location => 
    "#{Compass.configuration.project_path}\\tmp\\sass-cache"}

Make sure to note the escaped backslashs.

After this I modified the names of the folders that compass uses for how I wanted them named inside the config.rb and started getting to it with SASS and Compass. I recommend watching the hour long introduction to compass video it's very helpful and I learned alot from it: Watch the screen cast.

One of the things which this showed me was how to set compass to watch for file system changes and automagic compile the sass to css. By using

compass -w

This is working real well for me, just make sure you keep your css files checked out or turn them off read only if they're under source control if your project doesn't support concurrent checkouts.

For editing I'm using SciTE that's included with Ruby by default for the config.rb files or just the editor window in VS2008. For Sass I came across a big list on the HAML website. jEdit with highlighting syntax file for SASS was what I ended up using after trying a few. I'd still like to find a VS plugin for syntax highlighting so I don't need to use another editor but jEdit is definitely getting the job done.

Chris Marisic