Read more

Use Sass without Rails

Henning Koch
September 17, 2010Software engineer at makandra GmbH

You don't need a Rails application to use Sass. Even when you're working on a static site you can generate your CSS through Sass.

  • Install Sass with sudo gem install haml
  • Create a folder sass in the folder, that stores your stylesheets, e.g. mkdir css/sass
  • In a separate terminal window, run sass --watch css/sass:css. This will watch your sass files for changes and rewrite stylesheets as required.
Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

This even works on Windows.

Note about your .gitignore

You might want to change our typical .gitignore to not exclude public/stylesheets/*.css, since stylesheets aren't being generated automatically without Rails (this would bite you after a deploy). Instead exclude .sass-cache, which will be created in whatever folder you run sass --watch in.

Posted by Henning Koch to makandra dev (2010-09-17 14:43)