Compass

[vagrant@localhost sass]$ compass -v
Compass 1.0.3 (Polaris)
Copyright (c) 2008-2016 Chris Eppstein
Released under the MIT License.
Compass is charityware.
Please make a tax deductable donation for a worthy cause: http://umdf.org/compass
[vagrant@localhost sass]$ compass create
directory sass/
directory stylesheets/
   create config.rb
   create sass/screen.scss
   create sass/print.scss
   create sass/ie.scss
    write stylesheets/ie.css
    write stylesheets/print.css
    write stylesheets/screen.css

*********************************************************************
Congratulations! Your compass project has been created.

You may now add and edit sass stylesheets in the sass subdirectory of your project.

Sass files beginning with an underscore are called partials and won't be
compiled to CSS, but they can be imported into other sass stylesheets.

You can configure your project by editing the config.rb configuration file.

You must compile your sass stylesheets into CSS when they change.
This can be done in one of the following ways:
  1. To compile on demand:
     compass compile [path/to/project]
  2. To monitor your project for changes and automatically recompile:
     compass watch [path/to/project]

More Resources:
  * Website: http://compass-style.org/
  * Sass: http://sass-lang.com
  * Community: http://groups.google.com/group/compass-users/
@import "compass";

.sample {
  @include border-radius();
}
[vagrant@localhost sass]$ compass watch
@import "compass";

.sample {
  // @include border-radius(3px);
  // @include opacity(0.5);
  @include box-shadow(0 0 1px #ccc);
}
@import "compass";

.sample {
  // @include border-radius(3px);
  // @include opacity(0.5);
  // @include box-shadow(0 0 1px #ccc);
  @include rotate();
  @include clearfix;
}

画像

@import "compass";

$padding: 10px;

.sample {
  width: image-width("baby.jpg") + ($padding * 2);
}

sprites

@import "compass";

@import "icons/*.png";
@include all-icons-sprites;