Skip to content
compass rails integration
Branch: master
Clone or download
Latest commit be1f751 Apr 27, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gemfiles
lib
test
.gitignore
.travis.yml
Appraisals
CHANGELOG.md Update changelog Feb 7, 2016
Gemfile
Guardfile
LICENSE inital Dec 16, 2011
README.md
Rakefile
compass-rails.gemspec
sache.json

README.md

compass-rails

Don't start new projects with compass, it is no longer supported, see the compass statement

We Take Pull Requests!

Build Status Code Climate Gem Version Coverage Status

Compass rails is an adapter for the Compass Stylesheet Authoring Framework for Ruby on Rails.

Since Compass v0.12.0, this is the only way to use compass with your rails application.

Supports Rails 3.2, 4.x and 5.x releases.

Installation

Add the compass-rails gem line to your application's Gemfile

gem 'sass-rails'
gem 'compass-rails'

If you are using any Compass extensions, add them to this group in your Gemfile.

And then execute:

$ bundle

Usage

Change your application.css to application.css.scss or application.css.sass and then @import compass and your own stylesheets to your hearts content. E.g.:

@import "compass";

@import "your_project/mixins";
@import "your_project/base";

or

Use application.css to require files that use compass features. Ex:

/*
 *= require styleguide_full_of_compass_stuff
 */

Don't use *= require something within your SCSS or SASS files. You're gonna have a bad time.

Configuration

Compass-rails is configured out of the box to work with Rails.

Advanced users can choose to add a config/compass.rb and take advantage of the Compass configuration reference as is.

Installing Compass extensions

Step 1: Add it to your Gemfile and run the bundle command to install it.

Step 2: Install the extension's assets: bundle exec compass install <extension/template>

For example, if you want to use susy.

# Gemfile
gem 'compass-rails'
gem 'susy'

then run:

$ bundle
$ bundle exec compass install susy

if you are using the rails configuration files you should add:

config.compass.require "susy"

to your application.rb configuration file.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
You can’t perform that action at this time.