SASS version of the CSS toolkit from Twitter for Rails 3.1+ asset pipeline.
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 2 commits ahead, 12 commits behind sh-ft:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Sass Rails Bootstrap

Bootstrap is Twitter's toolkit for kickstarting CSS for websites, apps, and more. It includes base CSS styles for typography, forms, buttons, tables, grids, navigation, alerts, and more.

To get started -- checkout!

This gem provides the version of the toolkit with LESS stylesheets converted into SASS for use in Rails 3.1+ projects.


This library requires the sass-rails gem to work. So make sure that you have something like this in your Gemfile:

group :assets do
  gem 'sass-rails', '~> 3.2.3'

Then include the following line in your Gemfile and you're all set:

gem 'sass-rails-bootstrap'



The easiest way to use Bootstrap stylesheets is to import "twitter/bootstrap" in your application.css.sass file:

@import "twitter/bootstrap"

Alternatively, you can import each file individually, which allows for some customization. You'll be able to replace some of the imported files with your own (variables.css.sass would be a good candidate for this), or include just a selected few files for you to use.

Let's say that you want to use just the variables and mixins that come with Twitter Bootstrap. You can accomplish this by including the following lines in your .css.sass file:

@import "twitter/bootstrap/variables"
@import "twitter/bootstrap/mixins"

As per the Bootstrap project, twitter/bootstrap doesn't include the responsive styles. You'd have to import the file manually to get them:

@import "twitter/bootstrap-responsive"


As with the stylesheets, you have two options. You can include all of the scripts with a single directive that goes into your application.js file:

//= require twitter/bootstrap

Alternatively, you could include only the files you need:

//= require twitter/bootstrap/alert
//= require twitter/bootstrap/button
//= require twitter/bootstrap/scrollspy


This gem will directly track the semantic versioning releases of the Twitter Bootstrap project. Our major and minor versions will always match to theirs.

Currently, this gem reflects the Bootstrap version 2.1.0 up to the commit:

Copyright and license

Twitter Bootstrap Project:

Copyright 2012 Twitter, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.