O'Reilly logo

Sass and Compass in Action by Wynn Netherland, Nathan Weizenbaum, Chris Eppstein, and Brandon Mathis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. Getting started with Compass

B.1. Create a new project

To start using Compass in a new project, open up your terminal and run the following:

$ compass create my-project

This will create the my-project directory if it doesn’t already exist and fill it with the following files:

my-project/
  config.rb
  - sass/
    - ie.scss
    - print.scss
    - screen.scss
  - stylesheets/
    - ie.css
    - print.css
    - screen.css

If you don’t pass a directory to the compass create command, it’ll use your current directory.

In config.rb, you’ll make changes to Compass configurations like asset locations and compression level (more on that in a moment). The sass directory contains some starter stylesheets that you can edit, rename, or toss out completely, but this is where ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required