bootstrap-sass-backport 3.2.0.2 → 3.3.1.0

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.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/.travis.yml +8 -2
  4. data/CHANGELOG.md +14 -0
  5. data/README.md +35 -22
  6. data/Rakefile +3 -4
  7. data/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +1 -1
  8. data/assets/javascripts/bootstrap.js +1232 -1019
  9. data/assets/javascripts/bootstrap/affix.js +43 -23
  10. data/assets/javascripts/bootstrap/alert.js +6 -4
  11. data/assets/javascripts/bootstrap/button.js +16 -10
  12. data/assets/javascripts/bootstrap/carousel.js +27 -10
  13. data/assets/javascripts/bootstrap/collapse.js +69 -28
  14. data/assets/javascripts/bootstrap/dropdown.js +20 -10
  15. data/assets/javascripts/bootstrap/modal.js +67 -23
  16. data/assets/javascripts/bootstrap/popover.js +13 -7
  17. data/assets/javascripts/bootstrap/scrollspy.js +12 -7
  18. data/assets/javascripts/bootstrap/tab.js +41 -16
  19. data/assets/javascripts/bootstrap/tooltip.js +60 -39
  20. data/assets/javascripts/bootstrap/transition.js +1 -1
  21. data/assets/stylesheets/bootstrap/_badges.scss +7 -1
  22. data/assets/stylesheets/bootstrap/_button-groups.scss +18 -15
  23. data/assets/stylesheets/bootstrap/_buttons.scss +8 -5
  24. data/assets/stylesheets/bootstrap/_carousel.scss +25 -1
  25. data/assets/stylesheets/bootstrap/_code.scss +1 -0
  26. data/assets/stylesheets/bootstrap/_component-animations.scss +5 -2
  27. data/assets/stylesheets/bootstrap/_dropdowns.scss +4 -6
  28. data/assets/stylesheets/bootstrap/_forms.scss +55 -43
  29. data/assets/stylesheets/bootstrap/_glyphicons.scss +2 -5
  30. data/assets/stylesheets/bootstrap/_grid.scss +4 -4
  31. data/assets/stylesheets/bootstrap/_jumbotron.scss +6 -5
  32. data/assets/stylesheets/bootstrap/_list-group.scss +1 -8
  33. data/assets/stylesheets/bootstrap/_media.scss +27 -36
  34. data/assets/stylesheets/bootstrap/_modals.scss +4 -6
  35. data/assets/stylesheets/bootstrap/_navbar.scss +36 -33
  36. data/assets/stylesheets/bootstrap/_navs.scss +5 -3
  37. data/assets/stylesheets/bootstrap/_normalize.scss +5 -3
  38. data/assets/stylesheets/bootstrap/_pager.scss +2 -3
  39. data/assets/stylesheets/bootstrap/_pagination.scss +1 -1
  40. data/assets/stylesheets/bootstrap/_panels.scss +22 -4
  41. data/assets/stylesheets/bootstrap/_popovers.scss +6 -4
  42. data/assets/stylesheets/bootstrap/_print.scss +102 -96
  43. data/assets/stylesheets/bootstrap/_progress-bars.scss +2 -20
  44. data/assets/stylesheets/bootstrap/_responsive-embed.scss +2 -1
  45. data/assets/stylesheets/bootstrap/_responsive-utilities.scss +4 -1
  46. data/assets/stylesheets/bootstrap/_scaffolding.scss +3 -3
  47. data/assets/stylesheets/bootstrap/_tables.scss +11 -10
  48. data/assets/stylesheets/bootstrap/_theme.scss +27 -13
  49. data/assets/stylesheets/bootstrap/_thumbnails.scss +2 -2
  50. data/assets/stylesheets/bootstrap/_tooltip.scss +12 -4
  51. data/assets/stylesheets/bootstrap/_type.scss +10 -16
  52. data/assets/stylesheets/bootstrap/_utilities.scss +3 -4
  53. data/assets/stylesheets/bootstrap/_variables.scss +31 -21
  54. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +2 -0
  55. data/assets/stylesheets/bootstrap/mixins/_forms.scss +5 -1
  56. data/assets/stylesheets/bootstrap/mixins/_grid.scss +2 -2
  57. data/assets/stylesheets/bootstrap/mixins/_hide-text.scss +1 -1
  58. data/assets/stylesheets/bootstrap/mixins/_image.scss +0 -1
  59. data/assets/stylesheets/bootstrap/mixins/_labels.scss +1 -1
  60. data/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +1 -1
  61. data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +6 -3
  62. data/bower.json +1 -1
  63. data/composer.json +1 -1
  64. data/lib/bootstrap-sass-backport.rb +2 -1
  65. data/lib/bootstrap-sass/engine.rb +1 -1
  66. data/lib/bootstrap-sass/version.rb +2 -2
  67. data/package.json +4 -4
  68. data/tasks/converter/js_conversion.rb +2 -3
  69. data/tasks/converter/less_conversion.rb +64 -30
  70. data/tasks/converter/network.rb +12 -6
  71. data/templates/project/_bootstrap-variables.sass +866 -0
  72. data/templates/project/manifest.rb +5 -11
  73. data/test/node_sass_compile_test.sh +8 -0
  74. metadata +6 -27
  75. data/templates/project/_bootstrap-variables.sass.erb +0 -4
  76. data/test/dummy_rails/bin/bundle +0 -3
  77. data/test/dummy_rails/bin/rails +0 -4
  78. data/test/dummy_rails/bin/rake +0 -4
  79. data/test/dummy_rails/db/test.sqlite3 +0 -0
  80. data/test/dummy_rails/lib/assets/.keep +0 -0
  81. data/test/dummy_rails/public/404.html +0 -58
  82. data/test/dummy_rails/public/422.html +0 -58
  83. data/test/dummy_rails/public/500.html +0 -57
  84. data/test/dummy_rails/public/favicon.ico +0 -0
  85. data/test/node_sass_test.rb +0 -16
  86. data/test/support/integration_test.rb +0 -22
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: tooltip.js v3.2.0
2
+ * Bootstrap: tooltip.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#tooltip
4
4
  * Inspired by the original jQuery.tipsy by Jason Frame
5
5
  * ========================================================================
@@ -25,7 +25,9 @@
25
25
  this.init('tooltip', element, options)
26
26
  }
27
27
 
28
- Tooltip.VERSION = '3.2.0'
28
+ Tooltip.VERSION = '3.3.1'
29
+
30
+ Tooltip.TRANSITION_DURATION = 150
29
31
 
30
32
  Tooltip.DEFAULTS = {
31
33
  animation: true,
@@ -103,6 +105,11 @@
103
105
  var self = obj instanceof this.constructor ?
104
106
  obj : $(obj.currentTarget).data('bs.' + this.type)
105
107
 
108
+ if (self && self.$tip && self.$tip.is(':visible')) {
109
+ self.hoverState = 'in'
110
+ return
111
+ }
112
+
106
113
  if (!self) {
107
114
  self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
108
115
  $(obj.currentTarget).data('bs.' + this.type, self)
@@ -145,7 +152,7 @@
145
152
  if (this.hasContent() && this.enabled) {
146
153
  this.$element.trigger(e)
147
154
 
148
- var inDom = $.contains(document.documentElement, this.$element[0])
155
+ var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
149
156
  if (e.isDefaultPrevented() || !inDom) return
150
157
  var that = this
151
158
 
@@ -181,13 +188,13 @@
181
188
 
182
189
  if (autoPlace) {
183
190
  var orgPlacement = placement
184
- var $parent = this.$element.parent()
185
- var parentDim = this.getPosition($parent)
191
+ var $container = this.options.container ? $(this.options.container) : this.$element.parent()
192
+ var containerDim = this.getPosition($container)
186
193
 
187
- placement = placement == 'bottom' && pos.top + pos.height + actualHeight - parentDim.scroll > parentDim.height ? 'top' :
188
- placement == 'top' && pos.top - parentDim.scroll - actualHeight < 0 ? 'bottom' :
189
- placement == 'right' && pos.right + actualWidth > parentDim.width ? 'left' :
190
- placement == 'left' && pos.left - actualWidth < parentDim.left ? 'right' :
194
+ placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
195
+ placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
196
+ placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
197
+ placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
191
198
  placement
192
199
 
193
200
  $tip
@@ -200,14 +207,17 @@
200
207
  this.applyPlacement(calculatedOffset, placement)
201
208
 
202
209
  var complete = function () {
210
+ var prevHoverState = that.hoverState
203
211
  that.$element.trigger('shown.bs.' + that.type)
204
212
  that.hoverState = null
213
+
214
+ if (prevHoverState == 'out') that.leave(that)
205
215
  }
206
216
 
207
217
  $.support.transition && this.$tip.hasClass('fade') ?
208
218
  $tip
209
219
  .one('bsTransitionEnd', complete)
210
- .emulateTransitionEnd(150) :
220
+ .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
211
221
  complete()
212
222
  }
213
223
  }
@@ -254,16 +264,18 @@
254
264
  if (delta.left) offset.left += delta.left
255
265
  else offset.top += delta.top
256
266
 
257
- var arrowDelta = delta.left ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
258
- var arrowPosition = delta.left ? 'left' : 'top'
259
- var arrowOffsetPosition = delta.left ? 'offsetWidth' : 'offsetHeight'
267
+ var isVertical = /top|bottom/.test(placement)
268
+ var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
269
+ var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
260
270
 
261
271
  $tip.offset(offset)
262
- this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], arrowPosition)
272
+ this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
263
273
  }
264
274
 
265
- Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
266
- this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '')
275
+ Tooltip.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
276
+ this.arrow()
277
+ .css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
278
+ .css(isHorizontal ? 'top' : 'left', '')
267
279
  }
268
280
 
269
281
  Tooltip.prototype.setContent = function () {
@@ -274,16 +286,17 @@
274
286
  $tip.removeClass('fade in top bottom left right')
275
287
  }
276
288
 
277
- Tooltip.prototype.hide = function () {
289
+ Tooltip.prototype.hide = function (callback) {
278
290
  var that = this
279
291
  var $tip = this.tip()
280
292
  var e = $.Event('hide.bs.' + this.type)
281
293
 
282
- this.$element.removeAttr('aria-describedby')
283
-
284
294
  function complete() {
285
295
  if (that.hoverState != 'in') $tip.detach()
286
- that.$element.trigger('hidden.bs.' + that.type)
296
+ that.$element
297
+ .removeAttr('aria-describedby')
298
+ .trigger('hidden.bs.' + that.type)
299
+ callback && callback()
287
300
  }
288
301
 
289
302
  this.$element.trigger(e)
@@ -295,7 +308,7 @@
295
308
  $.support.transition && this.$tip.hasClass('fade') ?
296
309
  $tip
297
310
  .one('bsTransitionEnd', complete)
298
- .emulateTransitionEnd(150) :
311
+ .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
299
312
  complete()
300
313
 
301
314
  this.hoverState = null
@@ -316,13 +329,20 @@
316
329
 
317
330
  Tooltip.prototype.getPosition = function ($element) {
318
331
  $element = $element || this.$element
332
+
319
333
  var el = $element[0]
320
334
  var isBody = el.tagName == 'BODY'
321
- return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : null, {
322
- scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop(),
323
- width: isBody ? $(window).width() : $element.outerWidth(),
324
- height: isBody ? $(window).height() : $element.outerHeight()
325
- }, isBody ? { top: 0, left: 0 } : $element.offset())
335
+
336
+ var elRect = el.getBoundingClientRect()
337
+ if (elRect.width == null) {
338
+ // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
339
+ elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
340
+ }
341
+ var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
342
+ var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
343
+ var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
344
+
345
+ return $.extend({}, elRect, scroll, outerDims, elOffset)
326
346
  }
327
347
 
328
348
  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
@@ -386,14 +406,6 @@
386
406
  return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
387
407
  }
388
408
 
389
- Tooltip.prototype.validate = function () {
390
- if (!this.$element[0].parentNode) {
391
- this.hide()
392
- this.$element = null
393
- this.options = null
394
- }
395
- }
396
-
397
409
  Tooltip.prototype.enable = function () {
398
410
  this.enabled = true
399
411
  }
@@ -420,8 +432,11 @@
420
432
  }
421
433
 
422
434
  Tooltip.prototype.destroy = function () {
435
+ var that = this
423
436
  clearTimeout(this.timeout)
424
- this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
437
+ this.hide(function () {
438
+ that.$element.off('.' + that.type).removeData('bs.' + that.type)
439
+ })
425
440
  }
426
441
 
427
442
 
@@ -430,12 +445,18 @@
430
445
 
431
446
  function Plugin(option) {
432
447
  return this.each(function () {
433
- var $this = $(this)
434
- var data = $this.data('bs.tooltip')
435
- var options = typeof option == 'object' && option
448
+ var $this = $(this)
449
+ var data = $this.data('bs.tooltip')
450
+ var options = typeof option == 'object' && option
451
+ var selector = options && options.selector
436
452
 
437
453
  if (!data && option == 'destroy') return
438
- if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
454
+ if (selector) {
455
+ if (!data) $this.data('bs.tooltip', (data = {}))
456
+ if (!data[selector]) data[selector] = new Tooltip(this, options)
457
+ } else {
458
+ if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
459
+ }
439
460
  if (typeof option == 'string') data[option]()
440
461
  })
441
462
  }
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: transition.js v3.2.0
2
+ * Bootstrap: transition.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#transitions
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -36,11 +36,17 @@
36
36
  // [converter] extracted a& to a.badge
37
37
 
38
38
  // Account for badges in navs
39
- a.list-group-item.active > &,
39
+ .list-group-item.active > &,
40
40
  .nav-pills > .active > a > & {
41
41
  color: $badge-active-color;
42
42
  background-color: $badge-active-bg;
43
43
  }
44
+ .list-group-item > & {
45
+ float: right;
46
+ }
47
+ .list-group-item > & + & {
48
+ margin-right: 5px;
49
+ }
44
50
  .nav-pills > li > a > & {
45
51
  margin-left: 3px;
46
52
  }
@@ -18,10 +18,6 @@
18
18
  &.active {
19
19
  z-index: 2;
20
20
  }
21
- &:focus {
22
- // Remove focus outline when dropdown JS adds it after closing the menu
23
- outline: 0;
24
- }
25
21
  }
26
22
  }
27
23
 
@@ -38,7 +34,7 @@
38
34
  // Optional: Group multiple button groups together for a toolbar
39
35
  .btn-toolbar {
40
36
  margin-left: -5px; // Offset the first child's margin
41
- @include clearfix();
37
+ @include clearfix;
42
38
 
43
39
  .btn-group,
44
40
  .input-group {
@@ -156,7 +152,7 @@
156
152
 
157
153
  // Clear floats so dropdown menus can be properly placed
158
154
  > .btn-group {
159
- @include clearfix();
155
+ @include clearfix;
160
156
  > .btn {
161
157
  float: none;
162
158
  }
@@ -198,7 +194,6 @@
198
194
  }
199
195
 
200
196
 
201
-
202
197
  // Justified button groups
203
198
  // ----------------------
204
199
 
@@ -226,15 +221,23 @@
226
221
  // Checkbox and radio options
227
222
  //
228
223
  // In order to support the browser's form validation feedback, powered by the
229
- // `required` attribute, we have to "hide" the inputs via `opacity`. We cannot
230
- // use `display: none;` or `visibility: hidden;` as that also hides the popover.
224
+ // `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
225
+ // `display: none;` or `visibility: hidden;` as that also hides the popover.
226
+ // Simply visually hiding the inputs via `opacity` would leave them clickable in
227
+ // certain cases which is prevented by using `clip` and `pointer-events`.
231
228
  // This way, we ensure a DOM element is visible to position the popover from.
232
229
  //
233
- // See https://github.com/twbs/bootstrap/pull/12794 for more.
230
+ // See https://github.com/twbs/bootstrap/pull/12794 and
231
+ // https://github.com/twbs/bootstrap/pull/14559 for more information.
234
232
 
235
- [data-toggle="buttons"] > .btn > input[type="radio"],
236
- [data-toggle="buttons"] > .btn > input[type="checkbox"] {
237
- position: absolute;
238
- z-index: -1;
239
- @include opacity(0);
233
+ [data-toggle="buttons"] {
234
+ > .btn,
235
+ > .btn-group > .btn {
236
+ input[type="radio"],
237
+ input[type="checkbox"] {
238
+ position: absolute;
239
+ clip: rect(0,0,0,0);
240
+ pointer-events: none;
241
+ }
242
+ }
240
243
  }
@@ -12,6 +12,7 @@
12
12
  font-weight: $btn-font-weight;
13
13
  text-align: center;
14
14
  vertical-align: middle;
15
+ touch-action: manipulation;
15
16
  cursor: pointer;
16
17
  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
17
18
  border: 1px solid transparent;
@@ -22,13 +23,15 @@
22
23
  &,
23
24
  &:active,
24
25
  &.active {
25
- &:focus {
26
- @include tab-focus();
26
+ &:focus,
27
+ &.focus {
28
+ @include tab-focus;
27
29
  }
28
30
  }
29
31
 
30
32
  &:hover,
31
- &:focus {
33
+ &:focus,
34
+ &.focus {
32
35
  color: $btn-default-color;
33
36
  text-decoration: none;
34
37
  }
@@ -43,7 +46,7 @@
43
46
  &.disabled,
44
47
  &[disabled],
45
48
  fieldset[disabled] & {
46
- cursor: not-allowed;
49
+ cursor: $cursor-disabled;
47
50
  pointer-events: none; // Future-proof disabling of clicks
48
51
  @include opacity(.65);
49
52
  @include box-shadow(none);
@@ -85,11 +88,11 @@
85
88
  .btn-link {
86
89
  color: $link-color;
87
90
  font-weight: normal;
88
- cursor: pointer;
89
91
  border-radius: 0;
90
92
 
91
93
  &,
92
94
  &:active,
95
+ &.active,
93
96
  &[disabled],
94
97
  fieldset[disabled] & {
95
98
  background-color: transparent;
@@ -21,9 +21,33 @@
21
21
  // Account for jankitude on images
22
22
  > img,
23
23
  > a > img {
24
- @include img-responsive();
24
+ @include img-responsive;
25
25
  line-height: 1;
26
26
  }
27
+
28
+ // WebKit CSS3 transforms for supported devices
29
+ @media all and (transform-3d), (-webkit-transform-3d) {
30
+ transition: transform .6s ease-in-out;
31
+ backface-visibility: hidden;
32
+ perspective: 1000;
33
+
34
+ &.next,
35
+ &.active.right {
36
+ transform: translate3d(100%, 0, 0);
37
+ left: 0;
38
+ }
39
+ &.prev,
40
+ &.active.left {
41
+ transform: translate3d(-100%, 0, 0);
42
+ left: 0;
43
+ }
44
+ &.next.left,
45
+ &.prev.right,
46
+ &.active {
47
+ transform: translate3d(0, 0, 0);
48
+ left: 0;
49
+ }
50
+ }
27
51
  }
28
52
 
29
53
  > .active,
@@ -32,6 +32,7 @@ kbd {
32
32
  kbd {
33
33
  padding: 0;
34
34
  font-size: 100%;
35
+ font-weight: bold;
35
36
  box-shadow: none;
36
37
  }
37
38
  }
@@ -17,8 +17,9 @@
17
17
 
18
18
  .collapse {
19
19
  display: none;
20
+ visibility: hidden;
20
21
 
21
- &.in { display: block; }
22
+ &.in { display: block; visibility: visible; }
22
23
  // [converter] extracted tr&.in to tr.collapse.in
23
24
  // [converter] extracted tbody&.in to tbody.collapse.in
24
25
  }
@@ -31,5 +32,7 @@ tbody.collapse.in { display: table-row-group; }
31
32
  position: relative;
32
33
  height: 0;
33
34
  overflow: hidden;
34
- @include transition(height .35s ease);
35
+ @include transition-property(height, visibility);
36
+ @include transition-duration(.35s);
37
+ @include transition-timing-function(ease);
35
38
  }
@@ -103,16 +103,15 @@
103
103
  &:focus {
104
104
  color: $dropdown-link-disabled-color;
105
105
  }
106
- }
107
- // Nuke hover/focus effects
108
- .dropdown-menu > .disabled > a {
106
+
107
+ // Nuke hover/focus effects
109
108
  &:hover,
110
109
  &:focus {
111
110
  text-decoration: none;
112
111
  background-color: transparent;
113
112
  background-image: none; // Remove CSS gradient
114
- @include reset-filter();
115
- cursor: not-allowed;
113
+ @include reset-filter;
114
+ cursor: $cursor-disabled;
116
115
  }
117
116
  }
118
117
 
@@ -212,4 +211,3 @@
212
211
  }
213
212
  }
214
213
  }
215
-
@@ -77,7 +77,7 @@ select[size] {
77
77
  input[type="file"]:focus,
78
78
  input[type="radio"]:focus,
79
79
  input[type="checkbox"]:focus {
80
- @include tab-focus();
80
+ @include tab-focus;
81
81
  }
82
82
 
83
83
  // Adjust output element
@@ -128,10 +128,10 @@ output {
128
128
  @include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s);
129
129
 
130
130
  // Customize the `:focus` state to imitate native WebKit styles.
131
- @include form-control-focus();
131
+ @include form-control-focus;
132
132
 
133
133
  // Placeholder
134
- @include placeholder();
134
+ @include placeholder;
135
135
 
136
136
  // Disabled and read-only inputs
137
137
  //
@@ -141,7 +141,7 @@ output {
141
141
  &[disabled],
142
142
  &[readonly],
143
143
  fieldset[disabled] & {
144
- cursor: not-allowed;
144
+ cursor: $cursor-disabled;
145
145
  background-color: $input-bg-disabled;
146
146
  opacity: 1; // iOS fix for unreadable disabled content
147
147
  }
@@ -170,23 +170,27 @@ input[type="search"] {
170
170
  // Special styles for iOS temporal inputs
171
171
  //
172
172
  // In Mobile Safari, setting `display: block` on temporal inputs causes the
173
- // text within the input to become vertically misaligned.
174
- // As a workaround, we set a pixel line-height that matches the
175
- // given height of the input. Since this fucks up everything else, we have to
176
- // appropriately reset it for Internet Explorer and the size variations.
177
-
178
- input[type="date"],
179
- input[type="time"],
180
- input[type="datetime-local"],
181
- input[type="month"] {
182
- line-height: $input-height-base;
183
- // IE8+ misaligns the text within date inputs, so we reset
184
- line-height: $line-height-base #{\0};
185
-
186
- &.input-sm {
173
+ // text within the input to become vertically misaligned. As a workaround, we
174
+ // set a pixel line-height that matches the given height of the input, but only
175
+ // for Safari.
176
+
177
+ @media screen and (-webkit-min-device-pixel-ratio: 0) {
178
+ input[type="date"],
179
+ input[type="time"],
180
+ input[type="datetime-local"],
181
+ input[type="month"] {
182
+ line-height: $input-height-base;
183
+ }
184
+ input[type="date"].input-sm,
185
+ input[type="time"].input-sm,
186
+ input[type="datetime-local"].input-sm,
187
+ input[type="month"].input-sm {
187
188
  line-height: $input-height-small;
188
189
  }
189
- &.input-lg {
190
+ input[type="date"].input-lg,
191
+ input[type="time"].input-lg,
192
+ input[type="datetime-local"].input-lg,
193
+ input[type="month"].input-lg {
190
194
  line-height: $input-height-large;
191
195
  }
192
196
  }
@@ -210,11 +214,11 @@ input[type="month"] {
210
214
  .checkbox {
211
215
  position: relative;
212
216
  display: block;
213
- min-height: $line-height-computed; // clear the floating input if there is no label text
214
217
  margin-top: 10px;
215
218
  margin-bottom: 10px;
216
219
 
217
220
  label {
221
+ min-height: $line-height-computed; // Ensure the input doesn't jump when there is no text
218
222
  padding-left: 20px;
219
223
  margin-bottom: 0;
220
224
  font-weight: normal;
@@ -260,7 +264,7 @@ input[type="checkbox"] {
260
264
  &[disabled],
261
265
  &.disabled,
262
266
  fieldset[disabled] & {
263
- cursor: not-allowed;
267
+ cursor: $cursor-disabled;
264
268
  }
265
269
  }
266
270
  // These classes are used directly on <label>s
@@ -268,7 +272,7 @@ input[type="checkbox"] {
268
272
  .checkbox-inline {
269
273
  &.disabled,
270
274
  fieldset[disabled] & {
271
- cursor: not-allowed;
275
+ cursor: $cursor-disabled;
272
276
  }
273
277
  }
274
278
  // These classes are used on elements with <label> descendants
@@ -277,7 +281,7 @@ input[type="checkbox"] {
277
281
  &.disabled,
278
282
  fieldset[disabled] & {
279
283
  label {
280
- cursor: not-allowed;
284
+ cursor: $cursor-disabled;
281
285
  }
282
286
  }
283
287
  }
@@ -308,9 +312,11 @@ input[type="checkbox"] {
308
312
  // Build on `.form-control` with modifier classes to decrease or increase the
309
313
  // height and font-size of form controls.
310
314
 
311
- @include input-size('.input-sm', $input-height-small, $padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $border-radius-small);
315
+ @include input-size('.input-sm', $input-height-small, $padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $input-border-radius-small);
316
+ @include input-size('.form-group-sm .form-control', $input-height-small, $padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $input-border-radius-small);
312
317
 
313
- @include input-size('.input-lg', $input-height-large, $padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $border-radius-large);
318
+ @include input-size('.input-lg', $input-height-large, $padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $input-border-radius-large);
319
+ @include input-size('.form-group-lg .form-control', $input-height-large, $padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $input-border-radius-large);
314
320
 
315
321
 
316
322
  // Form control feedback states
@@ -329,7 +335,7 @@ input[type="checkbox"] {
329
335
  // Feedback icon (requires .glyphicon classes)
330
336
  .form-control-feedback {
331
337
  position: absolute;
332
- top: ($line-height-computed + 5); // Height of the `label` and its margin
338
+ top: 0;
333
339
  right: 0;
334
340
  z-index: 2; // Ensure icon is above input groups
335
341
  display: block;
@@ -337,6 +343,7 @@ input[type="checkbox"] {
337
343
  height: $input-height-base;
338
344
  line-height: $input-height-base;
339
345
  text-align: center;
346
+ pointer-events: none;
340
347
  }
341
348
  .input-lg + .form-control-feedback {
342
349
  width: $input-height-large;
@@ -360,10 +367,15 @@ input[type="checkbox"] {
360
367
  @include form-control-validation($state-danger-text, $state-danger-text, $state-danger-bg);
361
368
  }
362
369
 
370
+ // Reposition feedback icon if input has visible label above
371
+ .has-feedback label {
363
372
 
364
- // Reposition feedback icon if label is hidden with "screenreader only" state
365
- .has-feedback label.sr-only ~ .form-control-feedback {
366
- top: 0;
373
+ & ~ .form-control-feedback {
374
+ top: ($line-height-computed + 5); // Height of the `label` and its margin
375
+ }
376
+ &.sr-only ~ .form-control-feedback {
377
+ top: 0;
378
+ }
367
379
  }
368
380
 
369
381
 
@@ -380,7 +392,6 @@ input[type="checkbox"] {
380
392
  }
381
393
 
382
394
 
383
-
384
395
  // Inline forms
385
396
  //
386
397
  // Make forms appear inline(-block) by adding the `.form-inline` class. Inline
@@ -392,7 +403,8 @@ input[type="checkbox"] {
392
403
  //
393
404
  // Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
394
405
 
395
- .form-inline {
406
+ // [converter] extracted from `.form-inline` for libsass compatibility
407
+ @mixin form-inline {
396
408
 
397
409
  // Kick in the inline
398
410
  @media (min-width: $screen-sm-min) {
@@ -410,6 +422,11 @@ input[type="checkbox"] {
410
422
  vertical-align: middle;
411
423
  }
412
424
 
425
+ // Make static controls behave like regular ones
426
+ .form-control-static {
427
+ display: inline-block;
428
+ }
429
+
413
430
  .input-group {
414
431
  display: inline-table;
415
432
  vertical-align: middle;
@@ -451,15 +468,17 @@ input[type="checkbox"] {
451
468
  margin-left: 0;
452
469
  }
453
470
 
454
- // Validation states
455
- //
456
- // Reposition the icon because it's now within a grid column and columns have
457
- // `position: relative;` on them. Also accounts for the grid gutter padding.
471
+ // Re-override the feedback icon.
458
472
  .has-feedback .form-control-feedback {
459
473
  top: 0;
460
474
  }
461
475
  }
462
476
  }
477
+ // [converter] extracted as `@mixin form-inline` for libsass compatibility
478
+ .form-inline {
479
+ @include form-inline;
480
+ }
481
+
463
482
 
464
483
 
465
484
  // Horizontal forms
@@ -489,7 +508,7 @@ input[type="checkbox"] {
489
508
 
490
509
  // Make form groups behave like rows
491
510
  .form-group {
492
- @include make-row();
511
+ @include make-row;
493
512
  }
494
513
 
495
514
  // Reset spacing and right align labels, but scope to media queries so that
@@ -507,7 +526,6 @@ input[type="checkbox"] {
507
526
  // Reposition the icon because it's now within a grid column and columns have
508
527
  // `position: relative;` on them. Also accounts for the grid gutter padding.
509
528
  .has-feedback .form-control-feedback {
510
- top: 0;
511
529
  right: ($grid-gutter-width / 2);
512
530
  }
513
531
 
@@ -521,9 +539,6 @@ input[type="checkbox"] {
521
539
  padding-top: (($padding-large-vertical * $line-height-large) + 1);
522
540
  }
523
541
  }
524
- .form-control {
525
- @extend .input-lg;
526
- }
527
542
  }
528
543
  .form-group-sm {
529
544
  @media (min-width: $screen-sm-min) {
@@ -531,8 +546,5 @@ input[type="checkbox"] {
531
546
  padding-top: ($padding-small-vertical + 1);
532
547
  }
533
548
  }
534
- .form-control {
535
- @extend .input-sm;
536
- }
537
549
  }
538
550
  }