bootstrap-sass 3.1.1.1 → 3.2.0.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bootstrap-sass might be problematic. Click here for more details.

Files changed (143) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.travis.yml +6 -2
  4. data/CHANGELOG.md +19 -0
  5. data/Gemfile +5 -10
  6. data/README.md +140 -75
  7. data/Rakefile +4 -5
  8. data/{vendor/assets → assets}/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  9. data/{vendor/assets → assets}/fonts/bootstrap/glyphicons-halflings-regular.svg +0 -0
  10. data/{vendor/assets → assets}/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  11. data/{vendor/assets → assets}/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  12. data/assets/images/.keep +0 -0
  13. data/assets/javascripts/bootstrap-sprockets.js +12 -0
  14. data/assets/javascripts/bootstrap.js +2107 -0
  15. data/{vendor/assets → assets}/javascripts/bootstrap/affix.js +18 -11
  16. data/{vendor/assets → assets}/javascripts/bootstrap/alert.js +10 -6
  17. data/{vendor/assets → assets}/javascripts/bootstrap/button.js +11 -8
  18. data/{vendor/assets → assets}/javascripts/bootstrap/carousel.js +49 -31
  19. data/{vendor/assets → assets}/javascripts/bootstrap/collapse.js +19 -24
  20. data/{vendor/assets → assets}/javascripts/bootstrap/dropdown.js +9 -5
  21. data/{vendor/assets → assets}/javascripts/bootstrap/modal.js +25 -16
  22. data/{vendor/assets → assets}/javascripts/bootstrap/popover.js +9 -6
  23. data/{vendor/assets → assets}/javascripts/bootstrap/scrollspy.js +37 -21
  24. data/{vendor/assets → assets}/javascripts/bootstrap/tab.js +11 -8
  25. data/{vendor/assets → assets}/javascripts/bootstrap/tooltip.js +52 -17
  26. data/{vendor/assets → assets}/javascripts/bootstrap/transition.js +14 -3
  27. data/assets/stylesheets/_bootstrap-compass.scss +7 -0
  28. data/{vendor/assets → assets}/stylesheets/_bootstrap-mincer.scss +0 -0
  29. data/assets/stylesheets/_bootstrap-sprockets.scss +7 -0
  30. data/{vendor/assets/stylesheets/bootstrap.scss → assets/stylesheets/_bootstrap.scss} +0 -0
  31. data/{vendor/assets → assets}/stylesheets/bootstrap/_alerts.scss +4 -3
  32. data/{vendor/assets → assets}/stylesheets/bootstrap/_badges.scss +0 -0
  33. data/{vendor/assets → assets}/stylesheets/bootstrap/_breadcrumbs.scss +0 -0
  34. data/{vendor/assets → assets}/stylesheets/bootstrap/_button-groups.scss +5 -1
  35. data/{vendor/assets → assets}/stylesheets/bootstrap/_buttons.scss +0 -2
  36. data/{vendor/assets → assets}/stylesheets/bootstrap/_carousel.scss +3 -1
  37. data/{vendor/assets → assets}/stylesheets/bootstrap/_close.scss +0 -0
  38. data/{vendor/assets → assets}/stylesheets/bootstrap/_code.scss +6 -0
  39. data/{vendor/assets → assets}/stylesheets/bootstrap/_component-animations.scss +0 -0
  40. data/{vendor/assets → assets}/stylesheets/bootstrap/_dropdowns.scss +1 -0
  41. data/{vendor/assets → assets}/stylesheets/bootstrap/_forms.scss +82 -22
  42. data/{vendor/assets → assets}/stylesheets/bootstrap/_glyphicons.scss +4 -4
  43. data/{vendor/assets → assets}/stylesheets/bootstrap/_grid.scss +0 -0
  44. data/{vendor/assets → assets}/stylesheets/bootstrap/_input-groups.scss +6 -2
  45. data/{vendor/assets → assets}/stylesheets/bootstrap/_jumbotron.scss +0 -0
  46. data/{vendor/assets → assets}/stylesheets/bootstrap/_labels.scss +0 -0
  47. data/{vendor/assets → assets}/stylesheets/bootstrap/_list-group.scss +3 -1
  48. data/{vendor/assets → assets}/stylesheets/bootstrap/_media.scss +0 -0
  49. data/{vendor/assets → assets}/stylesheets/bootstrap/_mixins.scss +0 -0
  50. data/{vendor/assets → assets}/stylesheets/bootstrap/_modals.scss +7 -4
  51. data/{vendor/assets → assets}/stylesheets/bootstrap/_navbar.scss +1 -0
  52. data/{vendor/assets → assets}/stylesheets/bootstrap/_navs.scss +1 -1
  53. data/{vendor/assets → assets}/stylesheets/bootstrap/_normalize.scss +0 -0
  54. data/{vendor/assets → assets}/stylesheets/bootstrap/_pager.scss +0 -0
  55. data/{vendor/assets → assets}/stylesheets/bootstrap/_pagination.scss +0 -0
  56. data/{vendor/assets → assets}/stylesheets/bootstrap/_panels.scss +6 -3
  57. data/{vendor/assets → assets}/stylesheets/bootstrap/_popovers.scss +0 -0
  58. data/{vendor/assets → assets}/stylesheets/bootstrap/_print.scss +0 -0
  59. data/{vendor/assets → assets}/stylesheets/bootstrap/_progress-bars.scss +18 -2
  60. data/{vendor/assets → assets}/stylesheets/bootstrap/_responsive-embed.scss +0 -0
  61. data/{vendor/assets → assets}/stylesheets/bootstrap/_responsive-utilities.scss +2 -1
  62. data/{vendor/assets → assets}/stylesheets/bootstrap/_scaffolding.scss +1 -1
  63. data/{vendor/assets → assets}/stylesheets/bootstrap/_tables.scss +2 -2
  64. data/{vendor/assets → assets}/stylesheets/bootstrap/_theme.scss +11 -0
  65. data/{vendor/assets → assets}/stylesheets/bootstrap/_thumbnails.scss +0 -0
  66. data/{vendor/assets → assets}/stylesheets/bootstrap/_tooltip.scss +0 -0
  67. data/{vendor/assets → assets}/stylesheets/bootstrap/_type.scss +16 -6
  68. data/{vendor/assets → assets}/stylesheets/bootstrap/_utilities.scss +1 -0
  69. data/{vendor/assets → assets}/stylesheets/bootstrap/_variables.scss +25 -20
  70. data/{vendor/assets → assets}/stylesheets/bootstrap/_wells.scss +0 -0
  71. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_alerts.scss +0 -0
  72. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_background-variant.scss +0 -0
  73. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_border-radius.scss +0 -0
  74. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_buttons.scss +0 -0
  75. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_center-block.scss +0 -0
  76. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_clearfix.scss +0 -0
  77. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_forms.scss +0 -0
  78. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_gradients.scss +1 -1
  79. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_grid-framework.scss +2 -8
  80. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_grid.scss +3 -3
  81. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_hide-text.scss +0 -0
  82. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_image.scss +1 -0
  83. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_labels.scss +0 -0
  84. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_list-group.scss +0 -0
  85. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -0
  86. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +0 -0
  87. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_opacity.scss +0 -0
  88. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_pagination.scss +0 -0
  89. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_panels.scss +4 -0
  90. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_progress-bar.scss +2 -0
  91. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_reset-filter.scss +0 -0
  92. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_resize.scss +1 -1
  93. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_responsive-visibility.scss +0 -0
  94. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_size.scss +0 -0
  95. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_tab-focus.scss +0 -0
  96. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_table-row.scss +0 -0
  97. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -0
  98. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_text-overflow.scss +0 -0
  99. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +5 -10
  100. data/bootstrap-sass.gemspec +11 -6
  101. data/bower.json +22 -90
  102. data/composer.json +1 -1
  103. data/lib/bootstrap-sass.rb +3 -2
  104. data/lib/bootstrap-sass/engine.rb +4 -1
  105. data/lib/bootstrap-sass/version.rb +2 -2
  106. data/package.json +6 -1
  107. data/sache.json +5 -0
  108. data/tasks/bower.rake +6 -5
  109. data/tasks/converter.rb +3 -3
  110. data/tasks/converter/js_conversion.rb +11 -5
  111. data/tasks/converter/less_conversion.rb +30 -21
  112. data/tasks/converter/logger.rb +1 -0
  113. data/tasks/converter/network.rb +14 -16
  114. data/templates/project/{_variables.sass.erb → _bootstrap-variables.sass.erb} +0 -2
  115. data/templates/project/manifest.rb +17 -16
  116. data/templates/project/styles.sass +2 -2
  117. data/test/compass_test.rb +5 -4
  118. data/test/compilation_test.rb +10 -9
  119. data/test/dummy_node_mincer/manifest.js +2 -2
  120. data/test/dummy_rails/README.rdoc +1 -1
  121. data/test/dummy_rails/app/assets/javascripts/application.js +1 -1
  122. data/test/dummy_rails/app/assets/stylesheets/application.css.sass +2 -1
  123. data/test/dummy_rails/app/views/pages/root.html.slim +1 -1
  124. data/test/dummy_rails/config/application.rb +19 -3
  125. data/test/dummy_sass_only/compile.rb +4 -4
  126. data/test/gemfiles/sass_3_2.gemfile +1 -11
  127. data/test/gemfiles/sass_3_3.gemfile +2 -13
  128. data/test/gemfiles/sass_3_4.gemfile +7 -0
  129. data/test/gemfiles/sass_head.gemfile +2 -13
  130. data/test/node_mincer_test.rb +6 -5
  131. data/test/node_sass_test.rb +7 -6
  132. data/test/pages_test.rb +3 -3
  133. data/test/sass_test.rb +9 -6
  134. data/test/sprockets_rails_test.rb +11 -5
  135. data/test/support/dummy_rails_integration.rb +22 -0
  136. data/test/support/integration_test.rb +4 -11
  137. data/test/support/reporting.rb +17 -0
  138. data/test/test_helper.rb +22 -18
  139. data/test/test_helper_rails.rb +6 -0
  140. metadata +231 -151
  141. data/lib/bootstrap-sass/sass_functions.rb +0 -50
  142. data/vendor/assets/javascripts/bootstrap.js +0 -12
  143. data/vendor/assets/stylesheets/bootstrap/bootstrap.scss +0 -50
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d3f1fad60e55fbb88ef5e8a50535ccd5a05a20a4
4
- data.tar.gz: e574370f0aa62a710bb5f382a7a7582f5bb01afd
2
+ SHA256:
3
+ metadata.gz: 6050eccd4daf64b5e5d72bca8ac1292f271cf035c73b3e5eff62f385816fa2f3
4
+ data.tar.gz: 387b67ca35856109dc25957a2eb2da470dc65a6cd53d5facdeb10d12c9f943d6
5
5
  SHA512:
6
- metadata.gz: 73d37a1223e4b25fd3ecd6cab281255f9994afe8410982de4e13942f9168b967b5ec1d4f6ff8268a1bbf69194907f9f38d1e04725efbcea3a5bc8d2a83c5be03
7
- data.tar.gz: 68ff6488249a052a596ec8cdfa0af5753ac9b2f55c16d3b3812651df5da63d2688c5674c548b5c898d6774697936680dbf2a1ef50e1b287bf99fe4eca433fe9f
6
+ metadata.gz: 41456d7bbd25cc93328e1ae7038636f54200fbc021b841fb52882226a527b5aa8da37a2311df2c189eb8c5e25c9c78f75fa475c664b4a7147f21f332081191aa
7
+ data.tar.gz: '0732993db77d14da653cf64d5d1cca86cb948c4337bda6ee9f256fbedcaf03f55fce53b5eedb0abcbc042ff443c9efccfb2fc88a0e0dad504f78f2fa366ce1d9'
data/.gitignore CHANGED
@@ -3,6 +3,7 @@
3
3
  bootstrap.css
4
4
  bootstrap-responsive.css
5
5
  Gemfile.lock
6
+ *.gemfile.lock
6
7
  .rvmrc
7
8
  .rbenv-version
8
9
 
@@ -3,13 +3,17 @@ rvm:
3
3
  - 2.1.1
4
4
  - 2.0.0
5
5
  - jruby
6
- - rbx
6
+ - rbx-2
7
7
  gemfile:
8
8
  - test/gemfiles/sass_3_2.gemfile
9
9
  - test/gemfiles/sass_3_3.gemfile
10
10
  - test/gemfiles/sass_head.gemfile
11
11
  before_install:
12
- - "npm install node-sass mincer ejs"
12
+ - "npm install"
13
13
  matrix:
14
14
  allow_failures:
15
+ # rbx has issues https://github.com/rubinius/rubinius/issues/3060
16
+ - rvm: rbx-2
15
17
  - gemfile: test/gemfiles/sass_head.gemfile
18
+ notifications:
19
+ slack: heybb:3n88HHilXn76ji9vV4gL819Y
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.2.0.2
4
+
5
+ Fixed a number of bugs. [Issues closed in v3.2.0.2](https://github.com/twbs/bootstrap-sass/issues?q=is%3Aissue+is%3Aclosed+milestone%3Av3.2.0.2).
6
+
7
+ ## 3.2.0.1
8
+
9
+ Fixed a number of bugs: [Issues closed in v3.2.0.1](https://github.com/twbs/bootstrap-sass/issues?q=is%3Aissue+is%3Aclosed+milestone%3Av3.2.0.1).
10
+
11
+ ## 3.2.0.0
12
+
13
+ - Assets (Sass, JS, fonts) moved from `vendor/assets` to `assets`. `bootstrap.js` now contains concatenated JS.
14
+ - Compass generator now copies JS and fonts, and provides a better default `styles.sass`.
15
+ - Compass, Sprockets, and Mincer asset path helpers are now provided in pure Sass: `bootstrap-compass`, `bootstrap-sprockets`, and `bootstrap-mincer`.
16
+ Asset path helpers must be imported before `bootstrap`, more in Readme.
17
+ - Sprockets / Mincer JS manifest has been moved to `bootstrap-sprockets.js`.
18
+ It can be required without adding Bootstrap JS directory to load path, as it now uses relative paths.
19
+ - Sprockets: `depend_on_asset` (`glyphicons.scss`) has been changed to `depend_on` to work around an issue with `depend_on_asset`.
20
+ [More information](https://github.com/twbs/bootstrap-sass/issues/592#issuecomment-46570286).
21
+
3
22
  ## 3.1.1.0
4
23
 
5
24
  - Updated Bower docs
data/Gemfile CHANGED
@@ -1,15 +1,10 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- platform :rbx do
6
- gem 'rubysl', '~> 2.0'
7
- gem 'json', '>= 1.8.1'
8
- gem 'rubysl-test-unit', '~> 2.0'
9
- gem 'racc'
10
- end
5
+ # Compass for the dummy app
6
+ gem 'compass', require: false
11
7
 
12
- platform :jruby do
13
- gem 'test-unit'
8
+ group :development do
9
+ gem 'byebug', platform: :mri_21, require: false
14
10
  end
15
-
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Bootstrap for Sass [![Build Status](http://img.shields.io/travis/twbs/bootstrap-sass.svg)](http://travis-ci.org/twbs/bootstrap-sass)
1
+ # Bootstrap for Sass [![Gem Version](https://badge.fury.io/rb/bootstrap-sass.svg)](http://badge.fury.io/rb/bootstrap-sass) [![Bower Version](https://badge.fury.io/bo/bootstrap-sass-official.svg)](http://badge.fury.io/bo/bootstrap-sass-official) [![Build Status](http://img.shields.io/travis/twbs/bootstrap-sass.svg)](http://travis-ci.org/twbs/bootstrap-sass)
2
2
 
3
3
  `bootstrap-sass` is a Sass-powered version of [Bootstrap](http://github.com/twbs/bootstrap), ready to drop right into your Sass powered applications.
4
4
 
@@ -6,6 +6,10 @@
6
6
 
7
7
  Please see the appropriate guide for your environment of choice:
8
8
 
9
+ * [Ruby on Rails](#a-ruby-on-rails).
10
+ * [Compass](#b-compass-without-rails) not on Rails.
11
+ * [Bower](#c-bower).
12
+
9
13
  ### a. Ruby on Rails
10
14
 
11
15
  `bootstrap-sass` is easy to drop into Rails with the asset pipeline.
@@ -13,18 +17,66 @@ Please see the appropriate guide for your environment of choice:
13
17
  In your Gemfile you need to add the `bootstrap-sass` gem, and ensure that the `sass-rails` gem is present - it is added to new Rails applications by default.
14
18
 
15
19
  ```ruby
20
+ gem 'bootstrap-sass', '~> 3.2.0'
16
21
  gem 'sass-rails', '>= 3.2'
17
- gem 'bootstrap-sass', '~> 3.1.1'
22
+ ```
23
+
24
+ It is also recommended to use [Autoprefixer](https://github.com/ai/autoprefixer-rails) with Bootstrap
25
+ to add browser vendor prefixes automatically. Simply add the gem:
26
+
27
+ ```ruby
28
+ gem 'autoprefixer-rails'
18
29
  ```
19
30
 
20
31
  `bundle install` and restart your server to make the files available through the pipeline.
21
32
 
33
+ Import Bootstrap styles in `app/assets/stylesheets/application.css.scss`:
34
+
35
+ ```scss
36
+ @import "bootstrap-sprockets";
37
+ @import "bootstrap";
38
+ ```
39
+
40
+ Make sure the file has `.css.scss` extension (or `.css.sass` for Sass syntax). If you have just generated a new Rails app,
41
+ it may come with a `.css` file instead. If this file exists, it will be served instead of Sass, so remove it:
42
+
43
+ ```console
44
+ $ rm app/assets/stylesheets/application.css
45
+ ```
46
+
47
+ Do not use `//= require` in Sass or your other stylesheets will not be [able to access][antirequire] the Bootstrap mixins or variables.
48
+
49
+ Require Bootstrap Javascripts in `app/assets/javascripts/application.js`:
50
+
51
+ ```js
52
+ //= require jquery
53
+ //= require bootstrap-sprockets
54
+ ```
55
+
56
+ #### Bower with Rails
57
+
58
+ When using [bootstrap-sass Bower package](#c-bower) in Rails, ensure [minimum Sass number precision](#sass-number-precision):
59
+
60
+ ```ruby
61
+ # e.g. config/initializers/sass.rb
62
+ ::Sass::Script::Number.precision = [10, ::Sass::Script::Number.precision].max
63
+ ```
64
+
65
+ `bootstrap-sprockets` must be imported before `bootstrap` for the icon fonts to work.
22
66
 
23
67
  #### Rails 3.2.x
24
68
 
25
- For Rails 3.2.x, make sure bootstrap-sass is moved out of the `:assets` group.
26
- This is because, by default, assets group gems are not required in `production`.
27
- However, for pre-compilation to succeed in production, `bootstrap-sass` gem must be required.
69
+ Rails 3.2 is [no longer maintained for bugfixes](http://guides.rubyonrails.org/maintenance_policy.html), and you should upgrade as soon as possible.
70
+
71
+ Starting with bootstrap-sass v3.1.1.1, due to the structural changes from upstream you will need these
72
+ backported asset pipeline gems on Rails 3.2. There is more on why this is necessary in
73
+ https://github.com/twbs/bootstrap-sass/issues/523 and https://github.com/twbs/bootstrap-sass/issues/578.
74
+
75
+ ```ruby
76
+ gem 'sprockets-rails', '=2.0.0.backport1'
77
+ gem 'sprockets', '=2.2.2.backport2'
78
+ gem 'sass-rails', github: 'guilleiguaran/sass-rails', branch: 'backport'
79
+ ```
28
80
 
29
81
  ### b. Compass without Rails
30
82
 
@@ -41,52 +93,49 @@ require 'bootstrap-sass'
41
93
  ```
42
94
 
43
95
  ```console
44
- bundle exec compass install bootstrap
96
+ $ bundle exec compass install bootstrap
45
97
  ```
46
98
 
47
99
  If you are creating a new Compass project, you can generate it with bootstrap-sass support:
48
100
 
49
101
  ```console
50
- bundle exec compass create my-new-project -r bootstrap-sass --using bootstrap
102
+ $ bundle exec compass create my-new-project -r bootstrap-sass --using bootstrap
51
103
  ```
52
104
 
53
105
  or, alternatively, if you're not using a Gemfile for your dependencies:
54
106
 
55
107
  ```console
56
- compass create my-new-project -r bootstrap-sass --using bootstrap
108
+ $ compass create my-new-project -r bootstrap-sass --using bootstrap
57
109
  ```
58
110
 
59
111
  This will create a new Compass project with the following files in it:
60
112
 
61
- * [_variables.scss](/templates/project/_variables.sass.erb) - all of bootstrap variables (override them here).
62
- * [styles.scss](/templates/project/styles.sass) - main project SCSS file, import `variables` and `bootstrap`.
113
+ * [styles.sass](/templates/project/styles.sass) - main project Sass file, imports Bootstrap and variables.
114
+ * [_bootstrap-variables.sass](/templates/project/_bootstrap-variables.sass.erb) - all of Bootstrap variables, override them here.
63
115
 
64
116
  Some bootstrap-sass mixins may conflict with the Compass ones.
65
117
  If this happens, change the import order so that Compass mixins are loaded later.
66
118
 
67
- ### c. Ruby without Compass / Rails
68
-
69
- Require the gem, and load paths and Sass helpers will be configured automatically:
70
-
71
- ```ruby
72
- require 'bootstrap-sass'
73
- ```
74
-
75
- ### d. Node.js / Bower
119
+ ### c. Bower
76
120
 
77
121
  Using bootstrap-sass as a Bower package is still being tested. It is compatible with node-sass 0.8.3+. You can install it with:
78
122
 
79
- ```bash
80
- bower install bootstrap-sass-official
123
+ ```console
124
+ $ bower install bootstrap-sass-official
81
125
  ```
82
126
 
83
127
  `bootstrap-sass` is taken so make sure you use the command above.
84
128
 
85
- Sass, JS, and all other assets are located at [vendor/assets](/vendor/assets).
129
+ Sass, JS, and all other assets are located at [assets](/assets).
130
+
131
+ By default, `bower.json` main field list only the main `bootstrap.scss` and all the static assets (fonts and JS).
132
+ This is compatible by default with asset managers such as [wiredep](https://github.com/taptapship/wiredep).
86
133
 
87
- #### Mincer
134
+ #### Node.js Mincer
88
135
 
89
- If you use [mincer][mincer] with node-sass, import bootstrap into a `.css.ejs.scss` file like so:
136
+ If you use [mincer][mincer] with node-sass, import bootstrap into like so:
137
+
138
+ In `application.css.ejs.scss` (NB **.css.ejs.css**):
90
139
 
91
140
  ```scss
92
141
  // Import mincer asset paths helper integration
@@ -94,47 +143,95 @@ If you use [mincer][mincer] with node-sass, import bootstrap into a `.css.ejs.sc
94
143
  @import "bootstrap";
95
144
  ```
96
145
 
146
+ In `application.js`:
147
+
148
+ ```js
149
+ //= require bootstrap-sprockets
150
+ ```
151
+
97
152
  See also this [example manifest.js](/test/dummy_node_mincer/manifest.js) for mincer.
98
153
 
99
- #### Number precision
154
+
155
+ ### Configuration
156
+
157
+ #### Sass
158
+
159
+ By default all of Bootstrap is imported.
160
+
161
+ You can also import components explicitly. To start with a full list of modules copy
162
+ [`bootstrap.scss`](assets/stylesheets/bootstrap.scss) file into your assets as `bootstrap-custom.scss`.
163
+ Then comment out components you do not want from `bootstrap-custom`.
164
+ In the application Sass file, replace `@import 'bootstrap'` with:
165
+
166
+ ```scss
167
+ @import 'bootstrap-custom';
168
+ ```
169
+
170
+ #### Sass: Number Precision
100
171
 
101
172
  bootstrap-sass [requires](https://github.com/twbs/bootstrap-sass/issues/409) minimum [Sass number precision][sass-precision] of 10 (default is 5).
102
173
 
103
- When using ruby Sass compiler with the bower version you can enforce the limit with:
174
+ Precision is set for Rails and Compass automatically.
175
+ When using ruby Sass compiler standalone or with the Bower version you can set it with:
104
176
 
105
177
  ```ruby
106
178
  ::Sass::Script::Number.precision = [10, ::Sass::Script::Number.precision].max
107
179
  ```
108
180
 
109
- Precision option is now available in libsass, but it has not made into node-sass yet.
181
+ Note that libsass and node-sass do not currently support the precision option, due to an open bug ([bug #364](https://github.com/sass/libsass/issues/364)) in libsass.
182
+
183
+
184
+ #### Sass: Autoprefixer
185
+
186
+ Using [Autoprefixer][autoprefixer] with Bootstrap is recommended.
187
+ [Autoprefixer][autoprefixer] adds vendor prefixes to CSS rules using values from [Can I Use](http://caniuse.com/).
188
+
189
+ #### JavaScript
190
+
191
+ [`assets/javascripts/bootstrap.js`](/assets/javascripts/bootstrap.js) contains all of Bootstrap JavaScript,
192
+ concatenated in the [correct order](/assets/javascripts/bootstrap-sprockets.js).
193
+
194
+
195
+ #### JavaScript with Sprockets or Mincer
196
+
197
+ If you use Sprockets or Mincer, you can require `bootstrap-sprockets` instead to load the individual modules:
198
+
199
+ ```js
200
+ // Load all Bootstrap JavaScript
201
+ //= require bootstrap-sprockets
202
+ ```
203
+
204
+ You can also load individual modules, provided you also require any dependencies.
205
+ You can check dependencies in the [Bootstrap JS documentation][jsdocs].
110
206
 
111
- #### JS and fonts
207
+ ```js
208
+ //= require bootstrap/scrollspy
209
+ //= require bootstrap/modal
210
+ //= require bootstrap/dropdown
211
+ ```
112
212
 
113
- Assets are discovered automatically on Rails, Sprockets, Compass, and Node + Mincer, using native asset path helpers.
213
+ #### Fonts
114
214
 
115
- Otherwise the fonts are referenced as:
215
+ The fonts are referenced as:
116
216
 
117
- ```sass
217
+ ```scss
118
218
  "#{$icon-font-path}#{$icon-font-name}.eot"
119
219
  ```
120
220
 
121
- `$icon-font-path` defaults to `bootstrap/`.
221
+ `$icon-font-path` defaults to `bootstrap/` if asset path helpers are used, and `../fonts/bootstrap/` otherwise.
122
222
 
123
- When not using an asset pipeline, you can copy fonts and JS from bootstrap-sass, they are located at [vendor/assets](/vendor/assets):
223
+ When using bootstrap-sass with Compass, Sprockets, or Mincer, you **must** import the relevant path helpers before Bootstrap itself, for example:
124
224
 
125
- ```bash
126
- mkdir public/fonts
127
- cp -r $(bundle show bootstrap-sass)/vendor/assets/fonts/ public/fonts/
128
- mkdir public/javascripts
129
- cp -r $(bundle show bootstrap-sass)/vendor/assets/javascripts/ public/javascripts/
225
+ ```scss
226
+ @import "bootstrap-compass";
227
+ @import "bootstrap";
130
228
  ```
131
229
 
132
230
  ## Usage
133
231
 
134
232
  ### Sass
135
233
 
136
- Import Bootstrap into a Sass file (for example, `application.css.scss`) to get all of Bootstrap's styles, mixins and variables!
137
- We recommend against using `//= require` directives, since none of your other stylesheets will be [able to access][antirequire] the Bootstrap mixins or variables.
234
+ Import Bootstrap into a Sass file (for example, application.css.scss) to get all of Bootstrap's styles, mixins and variables!
138
235
 
139
236
  ```scss
140
237
  @import "bootstrap";
@@ -156,38 +253,6 @@ $navbar-default-color: $light-orange;
156
253
  @import "bootstrap";
157
254
  ```
158
255
 
159
- You can also import components explicitly. To start with a full list of modules copy this file from the gem:
160
-
161
- ```bash
162
- cp $(bundle show bootstrap-sass)/vendor/assets/stylesheets/bootstrap.scss \
163
- app/assets/stylesheets/bootstrap-custom.scss
164
- ```
165
- Comment out components you do not want from `bootstrap-custom`.
166
-
167
- In `application.sass`, replace `@import 'bootstrap'` with:
168
-
169
- ```scss
170
- @import 'bootstrap-custom';
171
- ```
172
-
173
- ### Javascript
174
-
175
- We have a helper that includes all Bootstrap javascripts. If you use Rails (or Sprockets separately),
176
- put this in your Javascript manifest (usually in `application.js`) to load the files in the [correct order](/vendor/assets/javascripts/bootstrap.js):
177
-
178
- ```js
179
- // Loads all Bootstrap javascripts
180
- //= require bootstrap
181
- ```
182
-
183
- You can also load individual modules, provided you also require any dependencies. You can check dependencies in the [Bootstrap JS documentation][jsdocs].
184
-
185
- ```js
186
- //= require bootstrap/scrollspy
187
- //= require bootstrap/modal
188
- //= require bootstrap/dropdown
189
- ```
190
-
191
256
  ---
192
257
 
193
258
  ## Development and Contributing
@@ -214,9 +279,8 @@ To convert a specific branch or version, pass the branch name or the commit hash
214
279
  The latest converter script is located [here][converter] and does the following:
215
280
 
216
281
  * Converts upstream bootstrap LESS files to its matching SCSS file.
217
- * Copies all upstream JavaScript into `vendor/assets/javascripts/bootstrap`
218
- * Generates a javascript manifest at `vendor/assets/javascripts/bootstrap.js`
219
- * Copies all upstream font files into `vendor/assets/fonts/bootstrap`
282
+ * Copies all upstream JavaScript into `assets/javascripts/bootstrap`, an Sprockets manifest at `assets/javascripts/bootstrap-sprockets.js`, and a concatenation at `assets/javascripts/bootstrap.js`.
283
+ * Copies all upstream font files into `assets/fonts/bootstrap`.
220
284
  * Sets `Bootstrap::BOOTSTRAP_SHA` in [version.rb][version] to the branch sha.
221
285
 
222
286
  This converter fully converts original LESS to SCSS. Conversion is automatic but requires instructions for certain transformations (see converter output).
@@ -247,3 +311,4 @@ Michael Hartl's [Rails Tutorial](http://railstutorial.org/), [gitlabhq](http://g
247
311
  [jsdocs]: http://getbootstrap.com/javascript/#transitions
248
312
  [sass-precision]: http://sass-lang.com/documentation/Sass/Script/Number.html#precision-class_method
249
313
  [mincer]: https://github.com/nodeca/mincer
314
+ [autoprefixer]: https://github.com/ai/autoprefixer
data/Rakefile CHANGED
@@ -1,3 +1,6 @@
1
+ lib_path = File.join(File.dirname(__FILE__), 'lib')
2
+ $:.unshift(lib_path) unless $:.include?(lib_path)
3
+
1
4
  load './tasks/bower.rake'
2
5
 
3
6
  require 'rake/testtask'
@@ -10,7 +13,6 @@ end
10
13
  desc 'Dumps output to a CSS file for testing'
11
14
  task :debug do
12
15
  require 'sass'
13
- require './lib/bootstrap-sass/sass_functions'
14
16
  path = Bootstrap.stylesheets_path
15
17
  %w(bootstrap).each do |file|
16
18
  engine = Sass::Engine.for_file("#{path}/#{file}.scss", syntax: :scss, load_paths: [path])
@@ -32,13 +34,10 @@ end
32
34
 
33
35
  desc 'Compile bootstrap-sass to tmp/ (or first arg)'
34
36
  task :compile, :css_path do |t, args|
35
- lib_path = File.join(File.dirname(__FILE__), 'lib')
36
- $:.unshift(lib_path) unless $:.include?(lib_path)
37
37
  require 'sass'
38
- require 'bootstrap-sass/sass_functions'
39
38
  require 'term/ansicolor'
40
39
 
41
- path = 'vendor/assets/stylesheets'
40
+ path = 'assets/stylesheets'
42
41
  css_path = args.with_defaults(css_path: 'tmp')[:css_path]
43
42
  puts Term::ANSIColor.bold "Compiling SCSS in #{path}"
44
43
  Dir.mkdir(css_path) unless File.directory?(css_path)
File without changes