bootstrap-sass 3.3.6 → 3.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.travis.yml +4 -10
  4. data/CHANGELOG.md +15 -4
  5. data/Gemfile +1 -4
  6. data/LICENSE +2 -1
  7. data/README.md +71 -69
  8. data/Rakefile +12 -8
  9. data/assets/javascripts/bootstrap/affix.js +7 -5
  10. data/assets/javascripts/bootstrap/alert.js +6 -5
  11. data/assets/javascripts/bootstrap/button.js +14 -9
  12. data/assets/javascripts/bootstrap/carousel.js +16 -7
  13. data/assets/javascripts/bootstrap/collapse.js +7 -6
  14. data/assets/javascripts/bootstrap/dropdown.js +5 -5
  15. data/assets/javascripts/bootstrap/modal.js +44 -23
  16. data/assets/javascripts/bootstrap/popover.js +25 -10
  17. data/assets/javascripts/bootstrap/scrollspy.js +4 -4
  18. data/assets/javascripts/bootstrap/tab.js +10 -10
  19. data/assets/javascripts/bootstrap/tooltip.js +177 -14
  20. data/assets/javascripts/bootstrap/transition.js +5 -5
  21. data/assets/javascripts/bootstrap.js +324 -107
  22. data/assets/javascripts/bootstrap.min.js +3 -4
  23. data/assets/stylesheets/_bootstrap.scss +2 -2
  24. data/assets/stylesheets/bootstrap/_alerts.scss +3 -3
  25. data/assets/stylesheets/bootstrap/_badges.scss +3 -3
  26. data/assets/stylesheets/bootstrap/_breadcrumbs.scss +2 -2
  27. data/assets/stylesheets/bootstrap/_button-groups.scss +6 -6
  28. data/assets/stylesheets/bootstrap/_buttons.scss +4 -4
  29. data/assets/stylesheets/bootstrap/_carousel.scss +26 -25
  30. data/assets/stylesheets/bootstrap/_close.scss +1 -0
  31. data/assets/stylesheets/bootstrap/_code.scss +3 -3
  32. data/assets/stylesheets/bootstrap/_component-animations.scss +1 -0
  33. data/assets/stylesheets/bootstrap/_dropdowns.scss +20 -23
  34. data/assets/stylesheets/bootstrap/_forms.scss +48 -58
  35. data/assets/stylesheets/bootstrap/_glyphicons.scss +9 -9
  36. data/assets/stylesheets/bootstrap/_grid.scss +10 -0
  37. data/assets/stylesheets/bootstrap/_input-groups.scss +3 -3
  38. data/assets/stylesheets/bootstrap/_jumbotron.scss +5 -5
  39. data/assets/stylesheets/bootstrap/_labels.scss +1 -1
  40. data/assets/stylesheets/bootstrap/_list-group.scss +30 -32
  41. data/assets/stylesheets/bootstrap/_media.scss +1 -1
  42. data/assets/stylesheets/bootstrap/_modals.scss +7 -7
  43. data/assets/stylesheets/bootstrap/_navbar.scss +75 -81
  44. data/assets/stylesheets/bootstrap/_navs.scss +4 -4
  45. data/assets/stylesheets/bootstrap/_normalize.scss +5 -2
  46. data/assets/stylesheets/bootstrap/_pager.scss +2 -2
  47. data/assets/stylesheets/bootstrap/_pagination.scss +12 -15
  48. data/assets/stylesheets/bootstrap/_panels.scss +5 -5
  49. data/assets/stylesheets/bootstrap/_popovers.scss +47 -52
  50. data/assets/stylesheets/bootstrap/_print.scss +90 -92
  51. data/assets/stylesheets/bootstrap/_progress-bars.scss +3 -3
  52. data/assets/stylesheets/bootstrap/_responsive-embed.scss +2 -2
  53. data/assets/stylesheets/bootstrap/_responsive-utilities.scss +3 -3
  54. data/assets/stylesheets/bootstrap/_scaffolding.scss +7 -7
  55. data/assets/stylesheets/bootstrap/_tables.scss +23 -23
  56. data/assets/stylesheets/bootstrap/_theme.scss +21 -17
  57. data/assets/stylesheets/bootstrap/_thumbnails.scss +1 -1
  58. data/assets/stylesheets/bootstrap/_tooltip.scss +38 -27
  59. data/assets/stylesheets/bootstrap/_type.scss +10 -10
  60. data/assets/stylesheets/bootstrap/_variables.scss +7 -7
  61. data/assets/stylesheets/bootstrap/_wells.scss +2 -2
  62. data/assets/stylesheets/bootstrap/mixins/_alerts.scss +2 -1
  63. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +4 -4
  64. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +6 -10
  65. data/assets/stylesheets/bootstrap/mixins/_center-block.scss +1 -1
  66. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +1 -1
  67. data/assets/stylesheets/bootstrap/mixins/_forms.scss +4 -4
  68. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +6 -8
  69. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +1 -1
  70. data/assets/stylesheets/bootstrap/mixins/_grid.scss +7 -7
  71. data/assets/stylesheets/bootstrap/mixins/_image.scss +5 -10
  72. data/assets/stylesheets/bootstrap/mixins/_opacity.scss +2 -3
  73. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +4 -4
  74. data/assets/stylesheets/bootstrap/mixins/_resize.scss +1 -1
  75. data/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +0 -4
  76. data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +3 -3
  77. data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +1 -1
  78. data/bootstrap-sass.gemspec +5 -4
  79. data/bower.json +2 -2
  80. data/composer.json +1 -1
  81. data/eyeglass-exports.js +7 -0
  82. data/lib/bootstrap-sass/version.rb +2 -2
  83. data/lib/bootstrap-sass.rb +13 -16
  84. data/package-lock.json +1611 -0
  85. data/package.json +19 -5
  86. data/tasks/converter/less_conversion.rb +7 -8
  87. data/tasks/converter/network.rb +2 -2
  88. data/templates/project/_bootstrap-variables.sass +8 -8
  89. data/test/compilation_test.rb +24 -12
  90. data/test/dummy_rails/config/application.rb +1 -0
  91. data/test/dummy_rails/config/boot.rb +1 -1
  92. data/test/dummy_sass_only/Gemfile +1 -1
  93. data/test/dummy_sass_only/compile.rb +14 -7
  94. data/test/dummy_sass_only/import_all.scss +2 -0
  95. data/test/gemfiles/default.gemfile +3 -0
  96. data/test/node_sass_compile_test.sh +4 -3
  97. data/test/sass_test.rb +10 -7
  98. data/test/sprockets_rails_test.rb +12 -8
  99. data/test/support/dummy_rails_integration.rb +1 -1
  100. data/test/test_helper.rb +2 -1
  101. metadata +34 -26
  102. data/test/compass_test.rb +0 -9
  103. data/test/dummy_sass_only/import_all.sass +0 -2
  104. data/test/gemfiles/rails_head.gemfile +0 -17
  105. data/test/gemfiles/sass_3_3.gemfile +0 -6
  106. data/test/gemfiles/sass_3_4.gemfile +0 -7
  107. data/test/gemfiles/sass_head.gemfile +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 55139f6cb78bf3543a9bfa371598eafbecfc743d
4
- data.tar.gz: ab0260cc09e54be379f9c7f1c1b93f490d85c7ef
2
+ SHA256:
3
+ metadata.gz: 58feea8410ac26aa16a8887d49c39915f01053fac4d547549f22ad09cca903a2
4
+ data.tar.gz: ab2888314daa99c23c67034bb52e89cab7ad5c80fc94cafa2aa000964e6ac4a6
5
5
  SHA512:
6
- metadata.gz: e4284b5dbb1561011e953993a4264d12cc373e0aa94a0bb1221714d842819073bd2755b78134094b961344d12275237eded8424eff05f8b3d0d3de910e82386c
7
- data.tar.gz: 25ca22cf946b3f8b286cef43a9d71d851f57268fd44fb72c4463e4938861a48498912a98cfccece688572966e4fe5ca4edee0e18355e53ae3c0c3630e41e32f9
6
+ metadata.gz: 524b345c929bbd2013145b9d0efff1e9a9ae40dd92bf10084bbed4d00f1cd4a629258d337d497131be7d386badf3a512951a82670a6e6e1fc82ff34a1d6002ca
7
+ data.tar.gz: cf05215a71378dcd0f25293cd32095d947b7b748113c3e89c1d65c6f5030dc50ad6b5ecc2817695f8d530ba0ec7ef388e819c4b232c68ad2d03a564718896051
data/.gitignore CHANGED
@@ -17,3 +17,4 @@ test/dummy_rails/log/*.log
17
17
  test/dummy_rails/public/assets/
18
18
  .DS_Store
19
19
  node_modules
20
+ /.idea
data/.travis.yml CHANGED
@@ -1,25 +1,19 @@
1
+ dist: xenial
1
2
  language: ruby
2
3
  cache: bundler
3
4
  bundler_args: --path ../../vendor/bundle --without debug
4
5
  rvm:
5
- - 2.2.3
6
+ - 2.5.1
6
7
  gemfile:
7
- - test/gemfiles/rails_head.gemfile
8
- - test/gemfiles/sass_3_3.gemfile
9
- - test/gemfiles/sass_3_4.gemfile
10
- - test/gemfiles/sass_head.gemfile
8
+ - test/gemfiles/default.gemfile
11
9
  before_install:
12
10
  - "nvm install stable"
13
11
  - "npm install"
14
- matrix:
15
- allow_failures:
16
- - gemfile: test/gemfiles/rails_head.gemfile
17
- - gemfile: test/gemfiles/sass_head.gemfile
18
12
  notifications:
19
13
  slack: heybb:3n88HHilXn76ji9vV4gL819Y
20
14
  env:
21
15
  global:
22
16
  - VERBOSE=1
23
17
  script:
24
- bundle exec rake && sh test/*.sh
18
+ bundle exec rake && bash test/*.sh
25
19
  sudo: false
data/CHANGELOG.md CHANGED
@@ -1,11 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.4.0
4
+
5
+ * Bootstrap rubygem now depends on SassC instead of Sass.
6
+ * Compass no longer supported.
7
+
8
+ ## 3.3.7
9
+
10
+ * Allows jQuery 3.x in bower.json. [#1048](https://github.com/twbs/bootstrap-sass/issues/1048)
11
+ * Adds the `style` and `sass` fields to package.json. [#1045](https://github.com/twbs/bootstrap-sass/issues/1045)
12
+ * Adds Eyeglass support. [#1007](https://github.com/twbs/bootstrap-sass/pull/1007)
13
+
3
14
  ## 3.3.6
4
15
 
5
- Bumps Sass dependency to 3.3.4+ to avoid compatibility issues with @at-root.
6
- Bumps node-sass dependency to ~3.4.2 for Node.js v5 compatibility. [#986](https://github.com/twbs/bootstrap-sass/issues/986)
7
- Fixes breadcrumb content issues on libsass. [#919](https://github.com/twbs/bootstrap-sass/issues/919)
8
- Fixes a Rails 5 compatibility issue. [#965](https://github.com/twbs/bootstrap-sass/pull/965)
16
+ * Bumps Sass dependency to 3.3.4+ to avoid compatibility issues with @at-root.
17
+ * Bumps node-sass dependency to ~3.4.2 for Node.js v5 compatibility. [#986](https://github.com/twbs/bootstrap-sass/issues/986)
18
+ * Fixes breadcrumb content issues on libsass. [#919](https://github.com/twbs/bootstrap-sass/issues/919)
19
+ * Fixes a Rails 5 compatibility issue. [#965](https://github.com/twbs/bootstrap-sass/pull/965)
9
20
 
10
21
  Framework version: Bootstrap **v3.3.6**
11
22
 
data/Gemfile CHANGED
@@ -2,9 +2,6 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- # Compass for the dummy app
6
- gem 'compass', require: false
7
-
8
5
  group :development do
9
- gem 'byebug', platforms: [:mri_21, :mri_22], require: false
6
+ gem 'byebug', platform: :mri, require: false
10
7
  end
data/LICENSE CHANGED
@@ -1,6 +1,7 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2013-2015 Twitter, Inc
3
+ Copyright (c) 2011-2016 Twitter, Inc
4
+ Copyright (c) 2011-2016 The Bootstrap Authors
4
5
 
5
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
7
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Bootstrap for Sass
1
+ # Bootstrap 3 for Sass
2
2
  [![Gem Version](https://badge.fury.io/rb/bootstrap-sass.svg)](http://badge.fury.io/rb/bootstrap-sass)
3
3
  [![npm version](https://img.shields.io/npm/v/bootstrap-sass.svg?style=flat)](https://www.npmjs.com/package/bootstrap-sass)
4
4
  [![Bower Version](https://badge.fury.io/bo/bootstrap-sass.svg)](http://badge.fury.io/bo/bootstrap-sass)
@@ -6,15 +6,15 @@
6
6
 
7
7
  `bootstrap-sass` is a Sass-powered version of [Bootstrap](https://github.com/twbs/bootstrap) 3, ready to drop right into your Sass powered applications.
8
8
 
9
- This is Bootstrap 3. For Bootstrap 4 use the [Bootstrap Ruby gem](http://github.com/twbs/bootstrap-rubygem) if you use Ruby, and the [main repo](http://github.com/twbs/bootstrap) otherwise.
9
+ This is Bootstrap **3**. For Bootstrap **4** use the [Bootstrap rubygem](https://github.com/twbs/bootstrap-rubygem) if you use Ruby, and the [main repo](https://github.com/twbs/bootstrap) otherwise.
10
10
 
11
11
  ## Installation
12
12
 
13
13
  Please see the appropriate guide for your environment of choice:
14
14
 
15
15
  * [Ruby on Rails](#a-ruby-on-rails).
16
- * [Compass](#b-compass-without-rails) not on Rails.
17
- * [Bower](#c-bower).
16
+ * [Bower](#b-bower).
17
+ * [npm / Node.js](#c-npm--nodejs).
18
18
 
19
19
  ### a. Ruby on Rails
20
20
 
@@ -23,8 +23,8 @@ Please see the appropriate guide for your environment of choice:
23
23
  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.
24
24
 
25
25
  ```ruby
26
- gem 'bootstrap-sass', '~> 3.3.6'
27
- gem 'sass-rails', '>= 3.2'
26
+ gem 'bootstrap-sass', '~> 3.4.1'
27
+ gem 'sassc-rails', '>= 2.1.0'
28
28
  ```
29
29
 
30
30
  `bundle install` and restart your server to make the files available through the pipeline.
@@ -50,6 +50,17 @@ Then, remove all the `*= require_self` and `*= require_tree .` statements from t
50
50
 
51
51
  Do not use `*= require` in Sass or your other stylesheets will not be [able to access][antirequire] the Bootstrap mixins or variables.
52
52
 
53
+ Bootstrap JavaScript depends on jQuery.
54
+ If you're using Rails 5.1+, add the `jquery-rails` gem to your Gemfile:
55
+
56
+ ```ruby
57
+ gem 'jquery-rails'
58
+ ```
59
+
60
+ ```console
61
+ $ bundle install
62
+ ```
63
+
53
64
  Require Bootstrap Javascripts in `app/assets/javascripts/application.js`:
54
65
 
55
66
  ```js
@@ -100,49 +111,7 @@ Please make sure `sprockets-rails` is at least v2.1.4.
100
111
 
101
112
  bootstrap-sass is no longer compatible with Rails 3. The latest version of bootstrap-sass compatible with Rails 3.2 is v3.1.1.0.
102
113
 
103
- ### b. Compass without Rails
104
-
105
- Install the gem:
106
-
107
- ```console
108
- $ gem install bootstrap-sass
109
- ```
110
-
111
- If you have an existing Compass project:
112
-
113
- 1. Require `bootstrap-sass` in `config.rb`:
114
-
115
- ```ruby
116
- require 'bootstrap-sass'
117
- ```
118
-
119
- 2. Install Bootstrap with:
120
-
121
- ```console
122
- $ bundle exec compass install bootstrap -r bootstrap-sass
123
- ```
124
-
125
- If you are creating a new Compass project, you can generate it with bootstrap-sass support:
126
-
127
- ```console
128
- $ bundle exec compass create my-new-project -r bootstrap-sass --using bootstrap
129
- ```
130
-
131
- or, alternatively, if you're not using a Gemfile for your dependencies:
132
-
133
- ```console
134
- $ compass create my-new-project -r bootstrap-sass --using bootstrap
135
- ```
136
-
137
- This will create a new Compass project with the following files in it:
138
-
139
- * [styles.sass](/templates/project/styles.sass) - main project Sass file, imports Bootstrap and variables.
140
- * [_bootstrap-variables.sass](/templates/project/_bootstrap-variables.sass) - all of Bootstrap variables, override them here.
141
-
142
- Some bootstrap-sass mixins may conflict with the Compass ones.
143
- If this happens, change the import order so that Compass mixins are loaded later.
144
-
145
- ### c. Bower
114
+ ### b. Bower
146
115
 
147
116
  bootstrap-sass Bower package is compatible with node-sass 3.2.0+. You can install it with:
148
117
 
@@ -157,7 +126,7 @@ This is compatible by default with asset managers such as [wiredep](https://gith
157
126
 
158
127
  #### Node.js Mincer
159
128
 
160
- If you use [mincer][mincer] with node-sass, import bootstrap like so:
129
+ If you use [mincer][mincer] with node-sass, import Bootstrap like so:
161
130
 
162
131
  In `application.css.ejs.scss` (NB **.css.ejs.scss**):
163
132
 
@@ -175,10 +144,15 @@ In `application.js`:
175
144
 
176
145
  See also this [example manifest.js](/test/dummy_node_mincer/manifest.js) for mincer.
177
146
 
147
+ ### c. npm / Node.js
148
+ ```console
149
+ $ npm install bootstrap-sass
150
+ ```
178
151
 
179
- ### Configuration
180
152
 
181
- #### Sass
153
+ ## Configuration
154
+
155
+ ### Sass
182
156
 
183
157
  By default all of Bootstrap is imported.
184
158
 
@@ -191,25 +165,39 @@ In the application Sass file, replace `@import 'bootstrap'` with:
191
165
  @import 'bootstrap-custom';
192
166
  ```
193
167
 
194
- #### Sass: Number Precision
168
+ ### Sass: Number Precision
195
169
 
196
170
  bootstrap-sass [requires](https://github.com/twbs/bootstrap-sass/issues/409) minimum [Sass number precision][sass-precision] of 8 (default is 5).
197
171
 
198
- Precision is set for Rails and Compass automatically.
199
- When using ruby Sass compiler standalone or with the Bower version you can set it with:
172
+ Precision is set for Ruby automatically when using the `sassc-rails` gem.
173
+ When using the npm or Bower version with Ruby, you can set it with:
200
174
 
201
175
  ```ruby
202
176
  ::Sass::Script::Value::Number.precision = [8, ::Sass::Script::Value::Number.precision].max
203
177
  ```
204
178
 
205
- #### Sass: Autoprefixer
179
+ ### Sass: Autoprefixer
206
180
 
207
181
  Bootstrap requires the use of [Autoprefixer][autoprefixer].
208
- [Autoprefixer][autoprefixer] adds vendor prefixes to CSS rules using values from [Can I Use](http://caniuse.com/).
182
+ [Autoprefixer][autoprefixer] adds vendor prefixes to CSS rules using values from [Can I Use](https://caniuse.com/).
183
+
184
+ To match [upstream Bootstrap's level of browser compatibility](https://getbootstrap.com/getting-started/#support), set Autoprefixer's `browsers` option to:
185
+ ```json
186
+ [
187
+ "Android 2.3",
188
+ "Android >= 4",
189
+ "Chrome >= 20",
190
+ "Firefox >= 24",
191
+ "Explorer >= 8",
192
+ "iOS >= 6",
193
+ "Opera >= 12",
194
+ "Safari >= 6"
195
+ ]
196
+ ```
209
197
 
210
- #### JavaScript
198
+ ### JavaScript
211
199
 
212
- [`assets/javascripts/bootstrap.js`](/assets/javascripts/bootstrap.js) contains all of Bootstrap JavaScript,
200
+ [`assets/javascripts/bootstrap.js`](/assets/javascripts/bootstrap.js) contains all of Bootstrap's JavaScript,
213
201
  concatenated in the [correct order](/assets/javascripts/bootstrap-sprockets.js).
214
202
 
215
203
 
@@ -231,7 +219,7 @@ You can check dependencies in the [Bootstrap JS documentation][jsdocs].
231
219
  //= require bootstrap/dropdown
232
220
  ```
233
221
 
234
- #### Fonts
222
+ ### Fonts
235
223
 
236
224
  The fonts are referenced as:
237
225
 
@@ -252,19 +240,19 @@ When using bootstrap-sass with Compass, Sprockets, or Mincer, you **must** impor
252
240
 
253
241
  ### Sass
254
242
 
255
- Import Bootstrap into a Sass file (for example, application.scss) to get all of Bootstrap's styles, mixins and variables!
243
+ Import Bootstrap into a Sass file (for example, `application.scss`) to get all of Bootstrap's styles, mixins and variables!
256
244
 
257
245
  ```scss
258
246
  @import "bootstrap";
259
247
  ```
260
248
 
261
- You can also include optional bootstrap theme:
249
+ You can also include optional Bootstrap theme:
262
250
 
263
251
  ```scss
264
252
  @import "bootstrap/theme";
265
253
  ```
266
254
 
267
- The full list of bootstrap variables can be found [here](http://getbootstrap.com/customize/#less-variables). You can override these by simply redefining the variable before the `@import` directive, e.g.:
255
+ The full list of Bootstrap variables can be found [here](https://getbootstrap.com/customize/#less-variables). You can override these by simply redefining the variable before the `@import` directive, e.g.:
268
256
 
269
257
  ```scss
270
258
  $navbar-default-bg: #312312;
@@ -274,10 +262,26 @@ $navbar-default-color: $light-orange;
274
262
  @import "bootstrap";
275
263
  ```
276
264
 
265
+ ### Eyeglass
266
+
267
+ Bootstrap is available as an [Eyeglass](https://github.com/sass-eyeglass/eyeglass) module. After installing Bootstrap via NPM you can import the Bootstrap library via:
268
+
269
+ ```scss
270
+ @import "bootstrap-sass/bootstrap"
271
+ ```
272
+
273
+ or import only the parts of Bootstrap you need:
274
+
275
+ ```scss
276
+ @import "bootstrap-sass/bootstrap/variables";
277
+ @import "bootstrap-sass/bootstrap/mixins";
278
+ @import "bootstrap-sass/bootstrap/carousel";
279
+ ```
280
+
277
281
  ## Version
278
282
 
279
283
  Bootstrap for Sass version may differ from the upstream version in the last number, known as
280
- [PATCH](http://semver.org/spec/v2.0.0.html). The patch version may be ahead of the corresponding upstream minor.
284
+ [PATCH](https://semver.org/spec/v2.0.0.html). The patch version may be ahead of the corresponding upstream minor.
281
285
  This happens when we need to release Sass-specific changes.
282
286
 
283
287
  Before v3.3.2, Bootstrap for Sass version used to reflect the upstream version, with an additional number for
@@ -287,9 +291,7 @@ The upstream versions vs the Bootstrap for Sass versions are:
287
291
 
288
292
  | Upstream | Sass |
289
293
  |---------:|--------:|
290
- | 3.3.6 | 3.3.6 |
291
- | 3.3.5 | 3.3.5 |
292
- | 3.3.4 | 3.3.4 |
294
+ | 3.3.4+ | same |
293
295
  | 3.3.2 | 3.3.3 |
294
296
  | <= 3.3.1 | 3.3.1.x |
295
297
 
@@ -320,7 +322,7 @@ To convert a specific branch or version, pass the branch name or the commit hash
320
322
 
321
323
  The latest converter script is located [here][converter] and does the following:
322
324
 
323
- * Converts upstream bootstrap LESS files to its matching SCSS file.
325
+ * Converts upstream Bootstrap LESS files to its matching SCSS file.
324
326
  * Copies all upstream JavaScript into `assets/javascripts/bootstrap`, a Sprockets manifest at `assets/javascripts/bootstrap-sprockets.js`, and a concatenation at `assets/javascripts/bootstrap.js`.
325
327
  * Copies all upstream font files into `assets/fonts/bootstrap`.
326
328
  * Sets `Bootstrap::BOOTSTRAP_SHA` in [version.rb][version] to the branch sha.
@@ -350,7 +352,7 @@ Michael Hartl's [Rails Tutorial](https://www.railstutorial.org/), [gitlabhq](htt
350
352
  [version]: https://github.com/twbs/bootstrap-sass/blob/master/lib/bootstrap-sass/version.rb
351
353
  [contrib]: https://github.com/twbs/bootstrap-sass/graphs/contributors
352
354
  [antirequire]: https://github.com/twbs/bootstrap-sass/issues/79#issuecomment-4428595
353
- [jsdocs]: http://getbootstrap.com/javascript/#transitions
355
+ [jsdocs]: https://getbootstrap.com/javascript/#transitions
354
356
  [sass-precision]: http://sass-lang.com/documentation/Sass/Script/Value/Number.html#precision%3D-class_method
355
357
  [mincer]: https://github.com/nodeca/mincer
356
358
  [autoprefixer]: https://github.com/postcss/autoprefixer
data/Rakefile CHANGED
@@ -1,4 +1,6 @@
1
- lib_path = File.join(File.dirname(__FILE__), 'lib')
1
+ require 'bundler/gem_tasks'
2
+
3
+ lib_path = File.join(__dir__, 'lib')
2
4
  $:.unshift(lib_path) unless $:.include?(lib_path)
3
5
 
4
6
  load './tasks/bower.rake'
@@ -42,11 +44,12 @@ end
42
44
 
43
45
  desc 'Dumps output to a CSS file for testing'
44
46
  task :debug do
45
- require 'sass'
47
+ require 'sassc'
48
+ require 'bootstrap-sass'
46
49
  path = Bootstrap.stylesheets_path
47
- %w(bootstrap).each do |file|
48
- engine = Sass::Engine.for_file("#{path}/#{file}.scss", syntax: :scss, load_paths: [path])
49
- File.open("./#{file}.css", 'w') { |f| f.write(engine.render) }
50
+ %w(_bootstrap).each do |file|
51
+ engine = SassC::Engine.new(File.read("#{path}/#{file}.scss"), syntax: :scss, load_paths: ['.', path])
52
+ File.open("tmp/#{file}.css", 'w') { |f| f.write(engine.render) }
50
53
  end
51
54
  end
52
55
 
@@ -64,7 +67,8 @@ end
64
67
 
65
68
  desc 'Compile bootstrap-sass to tmp/ (or first arg)'
66
69
  task :compile, :css_path do |t, args|
67
- require 'sass'
70
+ require 'sassc'
71
+ require 'bootstrap-sass'
68
72
  require 'term/ansicolor'
69
73
 
70
74
  path = 'assets/stylesheets'
@@ -74,8 +78,8 @@ task :compile, :css_path do |t, args|
74
78
  %w(_bootstrap bootstrap/_theme).each do |file|
75
79
  save_path = "#{css_path}/#{file.sub(/(^|\/)?_+/, '\1').sub('/', '-')}.css"
76
80
  puts Term::ANSIColor.cyan(" #{save_path}") + '...'
77
- engine = Sass::Engine.for_file("#{path}/#{file}.scss", syntax: :scss, load_paths: [path])
78
- css = engine.render
81
+ engine = SassC::Engine.new(File.read("#{path}/#{file}.scss"), syntax: :scss, load_paths: ['.', path])
82
+ css = engine.render
79
83
  File.open(save_path, 'w') { |f| f.write css }
80
84
  end
81
85
  end
@@ -1,8 +1,8 @@
1
1
  /* ========================================================================
2
- * Bootstrap: affix.js v3.3.6
3
- * http://getbootstrap.com/javascript/#affix
2
+ * Bootstrap: affix.js v3.4.1
3
+ * https://getbootstrap.com/docs/3.4/javascript/#affix
4
4
  * ========================================================================
5
- * Copyright 2011-2015 Twitter, Inc.
5
+ * Copyright 2011-2019 Twitter, Inc.
6
6
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
7
  * ======================================================================== */
8
8
 
@@ -16,7 +16,9 @@
16
16
  var Affix = function (element, options) {
17
17
  this.options = $.extend({}, Affix.DEFAULTS, options)
18
18
 
19
- this.$target = $(this.options.target)
19
+ var target = this.options.target === Affix.DEFAULTS.target ? $(this.options.target) : $(document).find(this.options.target)
20
+
21
+ this.$target = target
20
22
  .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
21
23
  .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
22
24
 
@@ -28,7 +30,7 @@
28
30
  this.checkPosition()
29
31
  }
30
32
 
31
- Affix.VERSION = '3.3.6'
33
+ Affix.VERSION = '3.4.1'
32
34
 
33
35
  Affix.RESET = 'affix affix-top affix-bottom'
34
36
 
@@ -1,8 +1,8 @@
1
1
  /* ========================================================================
2
- * Bootstrap: alert.js v3.3.6
3
- * http://getbootstrap.com/javascript/#alerts
2
+ * Bootstrap: alert.js v3.4.1
3
+ * https://getbootstrap.com/docs/3.4/javascript/#alerts
4
4
  * ========================================================================
5
- * Copyright 2011-2015 Twitter, Inc.
5
+ * Copyright 2011-2019 Twitter, Inc.
6
6
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
7
  * ======================================================================== */
8
8
 
@@ -18,7 +18,7 @@
18
18
  $(el).on('click', dismiss, this.close)
19
19
  }
20
20
 
21
- Alert.VERSION = '3.3.6'
21
+ Alert.VERSION = '3.4.1'
22
22
 
23
23
  Alert.TRANSITION_DURATION = 150
24
24
 
@@ -31,7 +31,8 @@
31
31
  selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
32
32
  }
33
33
 
34
- var $parent = $(selector)
34
+ selector = selector === '#' ? [] : selector
35
+ var $parent = $(document).find(selector)
35
36
 
36
37
  if (e) e.preventDefault()
37
38
 
@@ -1,8 +1,8 @@
1
1
  /* ========================================================================
2
- * Bootstrap: button.js v3.3.6
3
- * http://getbootstrap.com/javascript/#buttons
2
+ * Bootstrap: button.js v3.4.1
3
+ * https://getbootstrap.com/docs/3.4/javascript/#buttons
4
4
  * ========================================================================
5
- * Copyright 2011-2015 Twitter, Inc.
5
+ * Copyright 2011-2019 Twitter, Inc.
6
6
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
7
  * ======================================================================== */
8
8
 
@@ -19,7 +19,7 @@
19
19
  this.isLoading = false
20
20
  }
21
21
 
22
- Button.VERSION = '3.3.6'
22
+ Button.VERSION = '3.4.1'
23
23
 
24
24
  Button.DEFAULTS = {
25
25
  loadingText: 'loading...'
@@ -41,10 +41,10 @@
41
41
 
42
42
  if (state == 'loadingText') {
43
43
  this.isLoading = true
44
- $el.addClass(d).attr(d, d)
44
+ $el.addClass(d).attr(d, d).prop(d, true)
45
45
  } else if (this.isLoading) {
46
46
  this.isLoading = false
47
- $el.removeClass(d).removeAttr(d)
47
+ $el.removeClass(d).removeAttr(d).prop(d, false)
48
48
  }
49
49
  }, this), 0)
50
50
  }
@@ -108,10 +108,15 @@
108
108
 
109
109
  $(document)
110
110
  .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
111
- var $btn = $(e.target)
112
- if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
111
+ var $btn = $(e.target).closest('.btn')
113
112
  Plugin.call($btn, 'toggle')
114
- if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
113
+ if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
114
+ // Prevent double click on radios, and the double selections (so cancellation) on checkboxes
115
+ e.preventDefault()
116
+ // The target component still receive the focus
117
+ if ($btn.is('input,button')) $btn.trigger('focus')
118
+ else $btn.find('input:visible,button:visible').first().trigger('focus')
119
+ }
115
120
  })
116
121
  .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
117
122
  $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
@@ -1,8 +1,8 @@
1
1
  /* ========================================================================
2
- * Bootstrap: carousel.js v3.3.6
3
- * http://getbootstrap.com/javascript/#carousel
2
+ * Bootstrap: carousel.js v3.4.1
3
+ * https://getbootstrap.com/docs/3.4/javascript/#carousel
4
4
  * ========================================================================
5
- * Copyright 2011-2015 Twitter, Inc.
5
+ * Copyright 2011-2019 Twitter, Inc.
6
6
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
7
  * ======================================================================== */
8
8
 
@@ -30,7 +30,7 @@
30
30
  .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
31
31
  }
32
32
 
33
- Carousel.VERSION = '3.3.6'
33
+ Carousel.VERSION = '3.4.1'
34
34
 
35
35
  Carousel.TRANSITION_DURATION = 600
36
36
 
@@ -144,7 +144,9 @@
144
144
  var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
145
145
  if ($.support.transition && this.$element.hasClass('slide')) {
146
146
  $next.addClass(type)
147
- $next[0].offsetWidth // force reflow
147
+ if (typeof $next === 'object' && $next.length) {
148
+ $next[0].offsetWidth // force reflow
149
+ }
148
150
  $active.addClass(direction)
149
151
  $next.addClass(direction)
150
152
  $active
@@ -206,10 +208,17 @@
206
208
  // =================
207
209
 
208
210
  var clickHandler = function (e) {
209
- var href
210
211
  var $this = $(this)
211
- var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
212
+ var href = $this.attr('href')
213
+ if (href) {
214
+ href = href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
215
+ }
216
+
217
+ var target = $this.attr('data-target') || href
218
+ var $target = $(document).find(target)
219
+
212
220
  if (!$target.hasClass('carousel')) return
221
+
213
222
  var options = $.extend({}, $target.data(), $this.data())
214
223
  var slideIndex = $this.attr('data-slide-to')
215
224
  if (slideIndex) options.interval = false
@@ -1,11 +1,12 @@
1
1
  /* ========================================================================
2
- * Bootstrap: collapse.js v3.3.6
3
- * http://getbootstrap.com/javascript/#collapse
2
+ * Bootstrap: collapse.js v3.4.1
3
+ * https://getbootstrap.com/docs/3.4/javascript/#collapse
4
4
  * ========================================================================
5
- * Copyright 2011-2015 Twitter, Inc.
5
+ * Copyright 2011-2019 Twitter, Inc.
6
6
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
7
  * ======================================================================== */
8
8
 
9
+ /* jshint latedef: false */
9
10
 
10
11
  +function ($) {
11
12
  'use strict';
@@ -29,7 +30,7 @@
29
30
  if (this.options.toggle) this.toggle()
30
31
  }
31
32
 
32
- Collapse.VERSION = '3.3.6'
33
+ Collapse.VERSION = '3.4.1'
33
34
 
34
35
  Collapse.TRANSITION_DURATION = 350
35
36
 
@@ -136,7 +137,7 @@
136
137
  }
137
138
 
138
139
  Collapse.prototype.getParent = function () {
139
- return $(this.options.parent)
140
+ return $(document).find(this.options.parent)
140
141
  .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
141
142
  .each($.proxy(function (i, element) {
142
143
  var $element = $(element)
@@ -159,7 +160,7 @@
159
160
  var target = $trigger.attr('data-target')
160
161
  || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
161
162
 
162
- return $(target)
163
+ return $(document).find(target)
163
164
  }
164
165
 
165
166
 
@@ -1,8 +1,8 @@
1
1
  /* ========================================================================
2
- * Bootstrap: dropdown.js v3.3.6
3
- * http://getbootstrap.com/javascript/#dropdowns
2
+ * Bootstrap: dropdown.js v3.4.1
3
+ * https://getbootstrap.com/docs/3.4/javascript/#dropdowns
4
4
  * ========================================================================
5
- * Copyright 2011-2015 Twitter, Inc.
5
+ * Copyright 2011-2019 Twitter, Inc.
6
6
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
7
  * ======================================================================== */
8
8
 
@@ -19,7 +19,7 @@
19
19
  $(element).on('click.bs.dropdown', this.toggle)
20
20
  }
21
21
 
22
- Dropdown.VERSION = '3.3.6'
22
+ Dropdown.VERSION = '3.4.1'
23
23
 
24
24
  function getParent($this) {
25
25
  var selector = $this.attr('data-target')
@@ -29,7 +29,7 @@
29
29
  selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
30
30
  }
31
31
 
32
- var $parent = selector && $(selector)
32
+ var $parent = selector !== '#' ? $(document).find(selector) : null
33
33
 
34
34
  return $parent && $parent.length ? $parent : $this.parent()
35
35
  }