Bootstrap is Twitter's toolkit for kickstarting your site or app's CSS. It includes base styles for typography, forms, buttons, tables, grid layout, navigation, alerts, and more. To get started -- check out the Bootstrap docs.
- Assets are namespaced in twitter/bootstrap to avoid asset conflicts.
jquery-rails gem. Finally, add
less-rails-bootstrap and run
# Gemfile gem 'therubyracer' # If using Ruby gem 'therubyrhino' # If using JRuby gem 'jquery-rails' # If using Bootstrap's JS plugins. gem 'less-rails-bootstrap', '~> 3.0.0.wip', github: 'sinfin/less-rails-bootstrap-3'
Basic CSS Use
Get the full Bootstrap stylesheet with a single line in your
/* *= require twitter/bootstrap */
Please see the less-rails-bootstrap-test repo for examples that customize the CSS output by using LESS. The "CSS Tests Suites" section of the README and code is what you want to focus on. Also, check out the LESS syntax.
application.js, require jQuery first. Now you can add all the Bootstrap plugins with a single line.
//= require jquery //= require jquery_ujs //= require twitter/bootstrap
Or include plugins individually.
//= require jquery //= require jquery_ujs //= require twitter/bootstrap/modal //= require twitter/bootstrap/alert
This gem will directly track the semantic versioning of the Twitter Bootstrap project. Our major and minor versions will always match to theirs, though we may have tiny patch level releases specific to this gem.
Simple! Just clone the repo, then run
bundle install and
bundle exec rake. The tests will begin to run. We also use Travis CI to run our tests. The current build status is:
We also have a test rails project setup using all the examples documented above. If you make a github issue and complain about something, I will likely forward you to this project.
Here are the steps to update the version of twitter bootstrap used.
- Clone this repository.
- Run the
./scripts/update_bootstrap.shscript with bootstrap repo version tag argument. For example
- RUN THE TESTS!
Twitter Bootstrap Project: http://twitter.github.com/bootstrap
Copyright 2011 Twitter, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License 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.
Less::Rails is Copyright (c) 2011 Ken Collins, email@example.com and is distributed under the MIT license.