bootstrap-sass 3.3.3 → 3.3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Gemfile +1 -1
  4. data/README.md +36 -14
  5. data/Rakefile +12 -1
  6. data/assets/javascripts/bootstrap-sprockets.js +2 -2
  7. data/assets/javascripts/bootstrap.js +108 -97
  8. data/assets/javascripts/bootstrap.min.js +3 -3
  9. data/assets/javascripts/bootstrap/affix.js +5 -5
  10. data/assets/javascripts/bootstrap/alert.js +2 -2
  11. data/assets/javascripts/bootstrap/button.js +2 -2
  12. data/assets/javascripts/bootstrap/carousel.js +6 -6
  13. data/assets/javascripts/bootstrap/collapse.js +7 -7
  14. data/assets/javascripts/bootstrap/dropdown.js +3 -3
  15. data/assets/javascripts/bootstrap/modal.js +41 -26
  16. data/assets/javascripts/bootstrap/popover.js +3 -8
  17. data/assets/javascripts/bootstrap/scrollspy.js +17 -20
  18. data/assets/javascripts/bootstrap/tab.js +3 -3
  19. data/assets/javascripts/bootstrap/tooltip.js +17 -13
  20. data/assets/javascripts/bootstrap/transition.js +1 -1
  21. data/assets/stylesheets/bootstrap/_alerts.scss +2 -2
  22. data/assets/stylesheets/bootstrap/_badges.scss +6 -5
  23. data/assets/stylesheets/bootstrap/_component-animations.scss +1 -2
  24. data/assets/stylesheets/bootstrap/_dropdowns.scss +1 -1
  25. data/assets/stylesheets/bootstrap/_forms.scss +10 -2
  26. data/assets/stylesheets/bootstrap/_glyphicons.scss +4 -0
  27. data/assets/stylesheets/bootstrap/_jumbotron.scss +1 -1
  28. data/assets/stylesheets/bootstrap/_modals.scss +3 -1
  29. data/assets/stylesheets/bootstrap/_navbar.scss +0 -1
  30. data/assets/stylesheets/bootstrap/_navs.scss +0 -2
  31. data/assets/stylesheets/bootstrap/_responsive-embed.scss +8 -8
  32. data/assets/stylesheets/bootstrap/_scaffolding.scss +12 -0
  33. data/assets/stylesheets/bootstrap/_tooltip.scss +0 -1
  34. data/assets/stylesheets/bootstrap/_type.scss +1 -1
  35. data/assets/stylesheets/bootstrap/_utilities.scss +0 -1
  36. data/assets/stylesheets/bootstrap/_variables.scss +5 -1
  37. data/bower.json +1 -1
  38. data/lib/bootstrap-sass/version.rb +2 -2
  39. data/package.json +3 -3
  40. data/tasks/converter/js_conversion.rb +1 -1
  41. data/tasks/converter/less_conversion.rb +11 -12
  42. data/tasks/converter/network.rb +10 -5
  43. data/templates/project/_bootstrap-variables.sass +6 -2
  44. data/test/dummy_rails/app/assets/stylesheets/{application.css.sass → application.sass} +0 -0
  45. data/test/dummy_rails/app/views/pages/root.html.slim +43 -0
  46. data/test/dummy_rails/config/environments/development.rb +0 -3
  47. data/test/dummy_rails/config/environments/production.rb +7 -1
  48. data/test/dummy_rails/config/environments/test.rb +7 -1
  49. metadata +6 -7
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: tab.js v3.3.2
2
+ * Bootstrap: tab.js v3.3.4
3
3
  * http://getbootstrap.com/javascript/#tabs
4
4
  * ========================================================================
5
5
  * Copyright 2011-2015 Twitter, Inc.
@@ -17,7 +17,7 @@
17
17
  this.element = $(element)
18
18
  }
19
19
 
20
- Tab.VERSION = '3.3.2'
20
+ Tab.VERSION = '3.3.4'
21
21
 
22
22
  Tab.TRANSITION_DURATION = 150
23
23
 
@@ -88,7 +88,7 @@
88
88
  element.removeClass('fade')
89
89
  }
90
90
 
91
- if (element.parent('.dropdown-menu')) {
91
+ if (element.parent('.dropdown-menu').length) {
92
92
  element
93
93
  .closest('li.dropdown')
94
94
  .addClass('active')
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: tooltip.js v3.3.2
2
+ * Bootstrap: tooltip.js v3.3.4
3
3
  * http://getbootstrap.com/javascript/#tooltip
4
4
  * Inspired by the original jQuery.tipsy by Jason Frame
5
5
  * ========================================================================
@@ -15,17 +15,17 @@
15
15
  // ===============================
16
16
 
17
17
  var Tooltip = function (element, options) {
18
- this.type =
19
- this.options =
20
- this.enabled =
21
- this.timeout =
22
- this.hoverState =
18
+ this.type = null
19
+ this.options = null
20
+ this.enabled = null
21
+ this.timeout = null
22
+ this.hoverState = null
23
23
  this.$element = null
24
24
 
25
25
  this.init('tooltip', element, options)
26
26
  }
27
27
 
28
- Tooltip.VERSION = '3.3.2'
28
+ Tooltip.VERSION = '3.3.4'
29
29
 
30
30
  Tooltip.TRANSITION_DURATION = 150
31
31
 
@@ -52,6 +52,10 @@
52
52
  this.options = this.getOptions(options)
53
53
  this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
54
54
 
55
+ if (this.$element[0] instanceof document.constructor && !this.options.selector) {
56
+ throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
57
+ }
58
+
55
59
  var triggers = this.options.trigger.split(' ')
56
60
 
57
61
  for (var i = triggers.length; i--;) {
@@ -272,10 +276,10 @@
272
276
  this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
273
277
  }
274
278
 
275
- Tooltip.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
279
+ Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
276
280
  this.arrow()
277
- .css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
278
- .css(isHorizontal ? 'top' : 'left', '')
281
+ .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
282
+ .css(isVertical ? 'top' : 'left', '')
279
283
  }
280
284
 
281
285
  Tooltip.prototype.setContent = function () {
@@ -288,7 +292,7 @@
288
292
 
289
293
  Tooltip.prototype.hide = function (callback) {
290
294
  var that = this
291
- var $tip = this.tip()
295
+ var $tip = $(this.$tip)
292
296
  var e = $.Event('hide.bs.' + this.type)
293
297
 
294
298
  function complete() {
@@ -305,7 +309,7 @@
305
309
 
306
310
  $tip.removeClass('in')
307
311
 
308
- $.support.transition && this.$tip.hasClass('fade') ?
312
+ $.support.transition && $tip.hasClass('fade') ?
309
313
  $tip
310
314
  .one('bsTransitionEnd', complete)
311
315
  .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
@@ -449,7 +453,7 @@
449
453
  var data = $this.data('bs.tooltip')
450
454
  var options = typeof option == 'object' && option
451
455
 
452
- if (!data && option == 'destroy') return
456
+ if (!data && /destroy|hide/.test(option)) return
453
457
  if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
454
458
  if (typeof option == 'string') data[option]()
455
459
  })
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: transition.js v3.3.2
2
+ * Bootstrap: transition.js v3.3.4
3
3
  * http://getbootstrap.com/javascript/#transitions
4
4
  * ========================================================================
5
5
  * Copyright 2011-2015 Twitter, Inc.
@@ -18,7 +18,7 @@
18
18
  // Specified for the h4 to prevent conflicts of changing $headings-color
19
19
  color: inherit;
20
20
  }
21
-
21
+
22
22
  // Provide class for links that match alerts
23
23
  .alert-link {
24
24
  font-weight: $alert-link-font-weight;
@@ -29,7 +29,7 @@
29
29
  > ul {
30
30
  margin-bottom: 0;
31
31
  }
32
-
32
+
33
33
  > p + p {
34
34
  margin-top: 5px;
35
35
  }
@@ -28,8 +28,9 @@
28
28
  position: relative;
29
29
  top: -1px;
30
30
  }
31
-
32
- .btn-xs & {
31
+
32
+ .btn-xs &,
33
+ .btn-group-xs > .btn & {
33
34
  top: 0;
34
35
  padding: 1px 5px;
35
36
  }
@@ -42,15 +43,15 @@
42
43
  color: $badge-active-color;
43
44
  background-color: $badge-active-bg;
44
45
  }
45
-
46
+
46
47
  .list-group-item > & {
47
48
  float: right;
48
49
  }
49
-
50
+
50
51
  .list-group-item > & + & {
51
52
  margin-right: 5px;
52
53
  }
53
-
54
+
54
55
  .nav-pills > li > a > & {
55
56
  margin-left: 3px;
56
57
  }
@@ -17,9 +17,8 @@
17
17
 
18
18
  .collapse {
19
19
  display: none;
20
- visibility: hidden;
21
20
 
22
- &.in { display: block; visibility: visible; }
21
+ &.in { display: block; }
23
22
  // [converter] extracted tr&.in to tr.collapse.in
24
23
  // [converter] extracted tbody&.in to tbody.collapse.in
25
24
  }
@@ -10,7 +10,7 @@
10
10
  height: 0;
11
11
  margin-left: 2px;
12
12
  vertical-align: middle;
13
- border-top: $caret-width-base solid;
13
+ border-top: $caret-width-base dashed;
14
14
  border-right: $caret-width-base solid transparent;
15
15
  border-left: $caret-width-base solid transparent;
16
16
  }
@@ -141,11 +141,15 @@ output {
141
141
  &[disabled],
142
142
  &[readonly],
143
143
  fieldset[disabled] & {
144
- cursor: $cursor-disabled;
145
144
  background-color: $input-bg-disabled;
146
145
  opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655
147
146
  }
148
147
 
148
+ &[disabled],
149
+ fieldset[disabled] & {
150
+ cursor: $cursor-disabled;
151
+ }
152
+
149
153
  // [converter] extracted textarea& to textarea.form-control
150
154
  }
151
155
 
@@ -200,7 +204,7 @@ input[type="search"] {
200
204
  // horizontal forms, use the predefined grid classes.
201
205
 
202
206
  .form-group {
203
- margin-bottom: 15px;
207
+ margin-bottom: $form-group-margin-bottom;
204
208
  }
205
209
 
206
210
 
@@ -240,6 +244,7 @@ input[type="search"] {
240
244
  // Radios and checkboxes on same line
241
245
  .radio-inline,
242
246
  .checkbox-inline {
247
+ position: relative;
243
248
  display: inline-block;
244
249
  padding-left: 20px;
245
250
  margin-bottom: 0;
@@ -296,6 +301,7 @@ input[type="checkbox"] {
296
301
  padding-bottom: ($padding-base-vertical + 1);
297
302
  // Remove default margin from `p`
298
303
  margin-bottom: 0;
304
+ min-height: ($line-height-computed + $font-size-base);
299
305
 
300
306
  &.input-lg,
301
307
  &.input-sm {
@@ -323,6 +329,7 @@ input[type="checkbox"] {
323
329
  padding: $padding-small-vertical $padding-small-horizontal;
324
330
  font-size: $font-size-small;
325
331
  line-height: $line-height-small;
332
+ min-height: ($line-height-computed + $font-size-small);
326
333
  }
327
334
  }
328
335
 
@@ -336,6 +343,7 @@ input[type="checkbox"] {
336
343
  padding: $padding-large-vertical $padding-large-horizontal;
337
344
  font-size: $font-size-large;
338
345
  line-height: $line-height-large;
346
+ min-height: ($line-height-computed + $font-size-large);
339
347
  }
340
348
  }
341
349
 
@@ -266,8 +266,12 @@
266
266
  .glyphicon-piggy-bank { &:before { content: "\e225"; } }
267
267
  .glyphicon-scissors { &:before { content: "\e226"; } }
268
268
  .glyphicon-bitcoin { &:before { content: "\e227"; } }
269
+ .glyphicon-btc { &:before { content: "\e227"; } }
270
+ .glyphicon-xbt { &:before { content: "\e227"; } }
269
271
  .glyphicon-yen { &:before { content: "\00a5"; } }
272
+ .glyphicon-jpy { &:before { content: "\00a5"; } }
270
273
  .glyphicon-ruble { &:before { content: "\20bd"; } }
274
+ .glyphicon-rub { &:before { content: "\20bd"; } }
271
275
  .glyphicon-scale { &:before { content: "\e230"; } }
272
276
  .glyphicon-ice-lolly { &:before { content: "\e231"; } }
273
277
  .glyphicon-ice-lolly-tasted { &:before { content: "\e232"; } }
@@ -13,7 +13,7 @@
13
13
  .h1 {
14
14
  color: $jumbotron-heading-color;
15
15
  }
16
-
16
+
17
17
  p {
18
18
  margin-bottom: ($jumbotron-padding / 2);
19
19
  font-size: $jumbotron-font-size;
@@ -62,10 +62,12 @@
62
62
 
63
63
  // Modal background
64
64
  .modal-backdrop {
65
- position: absolute;
65
+ position: fixed;
66
66
  top: 0;
67
67
  right: 0;
68
+ bottom: 0;
68
69
  left: 0;
70
+ z-index: $zindex-modal-background;
69
71
  background-color: $modal-backdrop-bg;
70
72
  // Fade for backdrop
71
73
  &.fade { @include opacity(0); }
@@ -67,7 +67,6 @@
67
67
 
68
68
  &.collapse {
69
69
  display: block !important;
70
- visibility: visible !important;
71
70
  height: auto !important;
72
71
  padding-bottom: 0; // Override default setting
73
72
  overflow: visible !important;
@@ -223,11 +223,9 @@
223
223
  .tab-content {
224
224
  > .tab-pane {
225
225
  display: none;
226
- visibility: hidden;
227
226
  }
228
227
  > .active {
229
228
  display: block;
230
- visibility: visible;
231
229
  }
232
230
  }
233
231
 
@@ -22,14 +22,14 @@
22
22
  width: 100%;
23
23
  border: 0;
24
24
  }
25
+ }
25
26
 
26
- // Modifier class for 16:9 aspect ratio
27
- &.embed-responsive-16by9 {
28
- padding-bottom: 56.25%;
29
- }
27
+ // Modifier class for 16:9 aspect ratio
28
+ .embed-responsive-16by9 {
29
+ padding-bottom: 56.25%;
30
+ }
30
31
 
31
- // Modifier class for 4:3 aspect ratio
32
- &.embed-responsive-4by3 {
33
- padding-bottom: 75%;
34
- }
32
+ // Modifier class for 4:3 aspect ratio
33
+ .embed-responsive-4by3 {
34
+ padding-bottom: 75%;
35
35
  }
@@ -148,3 +148,15 @@ hr {
148
148
  clip: auto;
149
149
  }
150
150
  }
151
+
152
+
153
+ // iOS "clickable elements" fix for role="button"
154
+ //
155
+ // Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
156
+ // for traditionally non-focusable elements with role="button"
157
+ // see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
158
+ // Upstream patch for normalize.css submitted: https://github.com/necolas/normalize.css/pull/379 - remove this fix once that is merged
159
+
160
+ [role="button"] {
161
+ cursor: pointer;
162
+ }
@@ -8,7 +8,6 @@
8
8
  position: absolute;
9
9
  z-index: $zindex-tooltip;
10
10
  display: block;
11
- visibility: visible;
12
11
  // Reset font and text properties given new insertion method
13
12
  font-family: $font-family-base;
14
13
  font-size: $font-size-small;
@@ -234,7 +234,7 @@ abbr[data-original-title] {
234
234
  }
235
235
  .initialism {
236
236
  font-size: 90%;
237
- text-transform: uppercase;
237
+ @extend .text-uppercase;
238
238
  }
239
239
 
240
240
  // Blockquotes
@@ -44,7 +44,6 @@
44
44
 
45
45
  .hidden {
46
46
  display: none !important;
47
- visibility: hidden !important;
48
47
  }
49
48
 
50
49
 
@@ -212,6 +212,9 @@ $input-height-large: (ceil($font-size-large * $line-height-large) +
212
212
  //** Small `.form-control` height
213
213
  $input-height-small: (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2) !default;
214
214
 
215
+ //** `.form-group` margin
216
+ $form-group-margin-bottom: 15px !default;
217
+
215
218
  $legend-color: $gray-dark !default;
216
219
  $legend-border-color: #e5e5e5 !default;
217
220
 
@@ -271,7 +274,8 @@ $zindex-dropdown: 1000 !default;
271
274
  $zindex-popover: 1060 !default;
272
275
  $zindex-tooltip: 1070 !default;
273
276
  $zindex-navbar-fixed: 1030 !default;
274
- $zindex-modal: 1040 !default;
277
+ $zindex-modal-background: 1040 !default;
278
+ $zindex-modal: 1050 !default;
275
279
 
276
280
 
277
281
  //== Media queries breakpoints
data/bower.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bootstrap-sass",
3
- "version": "3.3.3",
3
+ "version": "3.3.4",
4
4
  "homepage": "https://github.com/twbs/bootstrap-sass",
5
5
  "authors": [
6
6
  "Thomas McDonald",
@@ -1,4 +1,4 @@
1
1
  module Bootstrap
2
- VERSION = '3.3.3'
3
- BOOTSTRAP_SHA = 'bcf7dd38b5ab180256e2e4fb5da0369551b3f082'
2
+ VERSION = '3.3.4.1'
3
+ BOOTSTRAP_SHA = 'f5250d0a0e2a7cfed77f55654027ff151ebe5aeb'
4
4
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bootstrap-sass",
3
- "version": "3.3.3",
3
+ "version": "3.3.4",
4
4
  "description": "bootstrap-sass is a Sass-powered version of Bootstrap, ready to drop right into your Sass powered applications.",
5
5
  "main": "assets/javascripts/bootstrap.js",
6
6
  "repository": {
@@ -23,8 +23,8 @@
23
23
  "url": "https://github.com/twbs/bootstrap-sass/issues"
24
24
  },
25
25
  "devDependencies": {
26
- "node-sass": "~1.0",
27
- "mincer": "~1.1",
26
+ "node-sass": "~2.0",
27
+ "mincer": "~1.2",
28
28
  "ejs": "~1.0"
29
29
  }
30
30
  }
@@ -29,7 +29,7 @@ class Converter
29
29
 
30
30
  def bootstrap_js_files
31
31
  @bootstrap_js_files ||= begin
32
- files = get_paths_by_type 'js', /\.js$/
32
+ files = get_paths_by_type('js', /\.js$/).reject { |path| path =~ %r(^tests/) }
33
33
  files.sort_by { |f|
34
34
  case f
35
35
  # tooltip depends on popover and must be loaded earlier
@@ -1,4 +1,5 @@
1
1
  require_relative 'char_string_scanner'
2
+ require 'bootstrap-sass/version'
2
3
 
3
4
  # This is the script used to automatically convert all of twbs/bootstrap LESS to Sass.
4
5
  #
@@ -149,9 +150,7 @@ class Converter
149
150
  end
150
151
 
151
152
  def bootstrap_less_files
152
- @bootstrap_less_files ||= get_paths_by_type('less', /\.less$/) +
153
- get_paths_by_type('mixins', /\.less$/,
154
- get_tree(get_tree_sha('mixins', get_tree(get_tree_sha('less'))))).map { |p| "mixins/#{p}" }
153
+ @bootstrap_less_files ||= get_paths_by_type('less', /\.less$/)
155
154
  end
156
155
 
157
156
  # apply general less to scss conversion
@@ -425,16 +424,16 @@ SASS
425
424
  # #scope > .mixin() -> @include scope-mixin()
426
425
  # &:extend(.mixin all) -> @include mixin()
427
426
  def replace_mixins(less, mixin_names)
428
- mixin_pattern = /(\s+)(([#|\.][\w-]+\s*>\s*)*)\.([\w-]+\(.*\))(?!\s\{)/
429
-
430
- less = less.gsub(mixin_pattern) do |match|
431
- matches = match.scan(mixin_pattern).flatten
432
- scope = matches[1] && matches[1] != '' ? matches[1].scan(/[\w-]+/).join('-') + '-' : ''
433
- mixin_name = match.scan(/\.([\w-]+)\(.*\)\s?\{?/).first
434
- if mixin_name && mixin_names.include?("#{scope}#{mixin_name.first}")
435
- "#{matches.first}@include #{scope}#{matches.last.gsub(/;\s*\$/, ', $').sub(/;\)$/, ')').sub(/\(\)$/, '')}"
427
+ mixin_pattern = /(?<=^|\s)((?:[#|\.][\w-]+\s*>\s*)*)\.([\w-]+)\((.*)\)(?!\s\{)/
428
+
429
+ less = less.gsub(mixin_pattern) do |_|
430
+ scope, name, args = $1, $2, $3
431
+ scope = scope.scan(/[\w-]+/).join('-') + '-' unless scope.empty?
432
+ args = "(#{args.tr(';', ',')})" unless args.empty?
433
+ if name && mixin_names.include?("#{scope}#{name}")
434
+ "@include #{scope}#{name}#{args}"
436
435
  else
437
- "#{matches.first}@extend .#{scope}#{matches.last.gsub(/\(\)/, '')}"
436
+ "@extend .#{scope}#{name}"
438
437
  end
439
438
  end
440
439