Search code examples
csssasscompass-sass

Compile the Sass locally,


I’ve just got to grips with SASS and Compass and have been using it locally. Is there a simpler way of uploading the files online though? My natural instinct is to edit live files but it just doesn’t work with SASS.

How do people go about updating their live css files?


Solution

  • In my opinion, the best set-up for doing Sass changes is to have a local environment that mimics your production environment. With a local environment you can keep Compass running as you make Sass changes, and you just need to refresh your local to see changes.

    When you're happy with your changes, upload your compiled CSS to the server.

    I'm sure there are ways to write and compile Sass on the server, but at that you're also introducing an easy way to blow up your site if you get a compiling error.

    Depending on what your live environment is (static HTML pages, WordPress, Magento, etc.) there are different local environments that work best.

    Static pages - You should be able to just work out of the browser with a set of files

    WordPress - I prefer using Brad Parbs' Variable VVV

    Magento - I prefer setting up Magento through MAMP