Twbs Sass Rails
Brings Bootstrap and Font Awesome assets into your Rails application. In Less, at the moment.
Quick start
Add the gem to your Gemfile
gem 'twbs_sass_rails'
Run the generator
$ rails g twbs_sass_rails:install
Customization
Variables
Use twbs-variables.css.less to override Bootstrap defaults:
/* New variables */
@flat-ui-emerald: #2ecc71;
@flat-ui-nephritis: #27ae60;
@flat-ui-peter-river: #3498db;
@flat-ui-belize-hole: #2980b9;
/* Overrides */
@brand-primary: @flat-ui-belize-hole;
@brand-success: @flat-ui-nephritis;
NOTE: Remember to import twbs-variables.css.less instead of twbs/bootstrap/variables in any new LESS file.
Icon Font
Twbs Sass Rails defaults with Font Awesome. If you want to switch to Glyphicons, edit your twbs.css.less as the following:
@import "twbs/bootstrap/glyphicons";
//@import "fontawesome/font-awesome";
Bootstrap theme
If you want to use the Bootstrap theme, uncomment //@import "twbs/bootstrap/theme" in your twbs.css.less.
Custom LESS components
If you want to exclude some LESS components, remove @import "twbs/bootstrap"; from your twbs.css.less and add the components you need, e.g.:
// Core variables and mixins
@import "twbs/bootstrap/variables";
@import "twbs/bootstrap/mixins";
// Reset
@import "twbs/bootstrap/normalize";
@import "twbs/bootstrap/print";
/* ... */
Take a look at the whole list of LESS components. Respect the order of the files and remember to edit paths.
Custom Javascript components
If you want to exclude some Javascript components, remove //= require twbs/bootstrap from twbs.js.coffee and add the components you need, e.g:
/* ... */
//= require jquery_ujs
//= require twbs/bootstrap/transition
//= require twbs/bootstrap/alert
//= require twbs/bootstrap/button
//= require turbolinks
/* ... */
Take a look at the whole list of Javascript components. Respect the order of the files and remember to edit paths.
Testing
To launch the tests against Rails 4, run from the root folder of the repository:
BUNDLE_GEMFILE=$PWD/gemfiles/Gemfile.rails-4.0.x rake
For Rails 3.2 run instead:
BUNDLE_GEMFILE=$PWD/gemfiles/Gemfile.rails-3.2.x rake
Versioning
For transparency and insight into our release cycle, and for striving to maintain backward compatibility, Twbs Sass Rails will be maintained under the Semantic Versioning guidelines as much as possible. Twbs Sass Rails will not follow Bootstrap's version number.
Releases will be numbered with the following format:
<major>.<minor>.<patch>
And constructed with the following guidelines:
- Breaking backward compatibility bumps the major (and resets the minor and patch)
- New additions without breaking backward compatibility bumps the minor (and resets the patch)
- Bug fixes and misc changes bumps the patch
For more information on SemVer, please visit http://semver.org/.
Authors
Geremia Taglialatela
Cesidio Di Landa
Copyright and license
Copyright 2013 diowa under the BSD 2-Clause license.
Twitter Bootstrap is licensed under the Apache License, Version 2.0
Font Awesome is licensed under the MIT License
Font Awesome font is licensed under the SIL Open Font License
Font Awesome pictograms are licensed under the CC BY 3.0 License



