Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated readme with instructions on how to use individual components

  • Loading branch information...
commit d2940edf6ebf49428f785f59e064b6aa1176e90d 1 parent c78625b
@toadkicker authored
Showing with 37 additions and 0 deletions.
  1. +37 −0 README.md
View
37 README.md
@@ -121,6 +121,29 @@ You have to require Bootstrap LESS (bootstrap_and_overrides.css.less) in your ap
/* Your stylesheets goes here... */
```
+To use individual components from bootstrap, your bootstrap_and_overrides.less could look like this:
+
+```css
+@import "twitter/bootstrap/reset.less";
+@import "twitter/bootstrap/variables.less";
+@import "twitter/bootstrap/mixins.less";
+@import "twitter/bootstrap/scaffolding.less";
+@import "twitter/bootstrap/grid.less";
+@import "twitter/bootstrap/layouts.less";
+@import "twitter/bootstrap/type.less";
+@import "twitter/bootstrap/forms.less";
+@import "twitter/bootstrap/wells.less";
+@import "twitter/bootstrap/component-animations.less";
+@import "twitter/bootstrap/buttons.less";
+@import "twitter/bootstrap/close.less";
+@import "twitter/bootstrap/navs.less";
+@import "twitter/bootstrap/navbar.less";
+@import "twitter/bootstrap/labels-badges.less";
+@import "twitter/bootstrap/hero-unit.less";
+@import "twitter/bootstrap/utilities.less";
+@import "twitter/bootstrap/responsive";
+```
+
If you'd like to alter Bootstrap's own variables, or define your LESS
styles inheriting Bootstrap's mixins, you can do so inside bootstrap_and_overrides.css.less:
@@ -141,6 +164,20 @@ $(document).ready(function(){
});
```
+If you want to customize what is loaded, your application.js would look something like this
+
+```js
+#= require jquery
+#= require jquery_ujs
+#= require twitter/bootstrap/bootstrap-transition
+#= require twitter/bootstrap/bootstrap-alert
+#= require twitter/bootstrap/bootstrap-modal
+#= require twitter/bootstrap/bootstrap-button
+#= require twitter/bootstrap/bootstrap-collapse
+```
+
+...and so on for each bootstrap js component.
+
## Using Coffeescript (optionally)
Using Twitter Bootstrap with the CoffeeScript is easy.

1 comment on commit d2940ed

@caarlos0

it should be application.js.coffee :)

:+1:

Please sign in to comment.
Something went wrong with that request. Please try again.