Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

compass-rails

> 编程语言
Open source

compass rails integration

585 stars0 likes1 views
WebsiteGitHub

About

compass rails integration

END OF LIFE - compass-rails

Don't use compass, it is no longer supported, see the compass statement 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 5.2 and 6.x releases.

Installation

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

ruby
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.:

scss
@import "compass";

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

or

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

css
/*
 *= 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

For example, if you want to use susy.

ruby
# 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:

ruby
config.compass.require "susy"

to your application.rb configuration file.

Contributing

  1. This project is EOL. No more changes will be accepted.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言