twbs_less_rails 2.5.1 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Gemfile.lock +1 -1
  4. data/Rakefile +55 -21
  5. data/lib/twbs_less_rails/version.rb +1 -1
  6. data/vendor/assets/javascripts/respond.js +209 -211
  7. data/vendor/assets/javascripts/twbs/bootstrap/affix.js +1 -1
  8. data/vendor/assets/javascripts/twbs/bootstrap/alert.js +1 -1
  9. data/vendor/assets/javascripts/twbs/bootstrap/button.js +11 -5
  10. data/vendor/assets/javascripts/twbs/bootstrap/carousel.js +5 -5
  11. data/vendor/assets/javascripts/twbs/bootstrap/collapse.js +1 -1
  12. data/vendor/assets/javascripts/twbs/bootstrap/dropdown.js +5 -5
  13. data/vendor/assets/javascripts/twbs/bootstrap/modal.js +1 -1
  14. data/vendor/assets/javascripts/twbs/bootstrap/popover.js +1 -1
  15. data/vendor/assets/javascripts/twbs/bootstrap/scrollspy.js +2 -2
  16. data/vendor/assets/javascripts/twbs/bootstrap/tab.js +1 -1
  17. data/vendor/assets/javascripts/twbs/bootstrap/tooltip.js +1 -1
  18. data/vendor/assets/javascripts/twbs/bootstrap/transition.js +1 -1
  19. data/vendor/assets/stylesheets/twbs/bootstrap/badges.less +6 -6
  20. data/vendor/assets/stylesheets/twbs/bootstrap/button-groups.less +7 -33
  21. data/vendor/assets/stylesheets/twbs/bootstrap/buttons.less +2 -5
  22. data/vendor/assets/stylesheets/twbs/bootstrap/carousel.less +1 -0
  23. data/vendor/assets/stylesheets/twbs/bootstrap/dropdowns.less +3 -8
  24. data/vendor/assets/stylesheets/twbs/bootstrap/forms.less +11 -0
  25. data/vendor/assets/stylesheets/twbs/bootstrap/glyphicons.less +1 -1
  26. data/vendor/assets/stylesheets/twbs/bootstrap/grid.less +12 -26
  27. data/vendor/assets/stylesheets/twbs/bootstrap/input-groups.less +1 -1
  28. data/vendor/assets/stylesheets/twbs/bootstrap/jumbotron.less +8 -2
  29. data/vendor/assets/stylesheets/twbs/bootstrap/labels.less +6 -0
  30. data/vendor/assets/stylesheets/twbs/bootstrap/mixins.less +37 -50
  31. data/vendor/assets/stylesheets/twbs/bootstrap/modals.less +2 -5
  32. data/vendor/assets/stylesheets/twbs/bootstrap/navbar.less +41 -53
  33. data/vendor/assets/stylesheets/twbs/bootstrap/navs.less +0 -20
  34. data/vendor/assets/stylesheets/twbs/bootstrap/panels.less +11 -1
  35. data/vendor/assets/stylesheets/twbs/bootstrap/progress-bars.less +0 -12
  36. data/vendor/assets/stylesheets/twbs/bootstrap/tables.less +5 -18
  37. data/vendor/assets/stylesheets/twbs/bootstrap/thumbnails.less +9 -3
  38. data/vendor/assets/stylesheets/twbs/bootstrap/type.less +54 -52
  39. data/vendor/assets/stylesheets/twbs/bootstrap/variables.less +15 -10
  40. metadata +2 -2
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: affix.js v3.0.2
2
+ * Bootstrap: affix.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#affix
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: alert.js v3.0.2
2
+ * Bootstrap: alert.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#alerts
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: button.js v3.0.2
2
+ * Bootstrap: button.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#buttons
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -54,15 +54,21 @@
54
54
 
55
55
  Button.prototype.toggle = function () {
56
56
  var $parent = this.$element.closest('[data-toggle="buttons"]')
57
+ var changed = true
57
58
 
58
59
  if ($parent.length) {
59
60
  var $input = this.$element.find('input')
60
- .prop('checked', !this.$element.hasClass('active'))
61
- .trigger('change')
62
- if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active')
61
+ if ($input.prop('type') === 'radio') {
62
+ // see if clicking on current one
63
+ if ($input.prop('checked') && this.$element.hasClass('active'))
64
+ changed = false
65
+ else
66
+ $parent.find('.active').removeClass('active')
67
+ }
68
+ if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
63
69
  }
64
70
 
65
- this.$element.toggleClass('active')
71
+ if (changed) this.$element.toggleClass('active')
66
72
  }
67
73
 
68
74
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: carousel.js v3.0.2
2
+ * Bootstrap: carousel.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#carousel
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -69,7 +69,7 @@
69
69
 
70
70
  if (pos > (this.$items.length - 1) || pos < 0) return
71
71
 
72
- if (this.sliding) return this.$element.one('slid', function () { that.to(pos) })
72
+ if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) })
73
73
  if (activeIndex == pos) return this.pause().cycle()
74
74
 
75
75
  return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
@@ -121,7 +121,7 @@
121
121
 
122
122
  if (this.$indicators.length) {
123
123
  this.$indicators.find('.active').removeClass('active')
124
- this.$element.one('slid', function () {
124
+ this.$element.one('slid.bs.carousel', function () {
125
125
  var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
126
126
  $nextIndicator && $nextIndicator.addClass('active')
127
127
  })
@@ -139,7 +139,7 @@
139
139
  $next.removeClass([type, direction].join(' ')).addClass('active')
140
140
  $active.removeClass(['active', direction].join(' '))
141
141
  that.sliding = false
142
- setTimeout(function () { that.$element.trigger('slid') }, 0)
142
+ setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
143
143
  })
144
144
  .emulateTransitionEnd(600)
145
145
  } else {
@@ -148,7 +148,7 @@
148
148
  $active.removeClass('active')
149
149
  $next.addClass('active')
150
150
  this.sliding = false
151
- this.$element.trigger('slid')
151
+ this.$element.trigger('slid.bs.carousel')
152
152
  }
153
153
 
154
154
  isCycling && this.cycle()
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: collapse.js v3.0.2
2
+ * Bootstrap: collapse.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#collapse
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: dropdown.js v3.0.2
2
+ * Bootstrap: dropdown.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#dropdowns
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -26,7 +26,7 @@
26
26
  var backdrop = '.dropdown-backdrop'
27
27
  var toggle = '[data-toggle=dropdown]'
28
28
  var Dropdown = function (element) {
29
- var $el = $(element).on('click.bs.dropdown', this.toggle)
29
+ $(element).on('click.bs.dropdown', this.toggle)
30
30
  }
31
31
 
32
32
  Dropdown.prototype.toggle = function (e) {
@@ -41,7 +41,7 @@
41
41
 
42
42
  if (!isActive) {
43
43
  if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
44
- // if mobile we we use a backdrop because click events don't delegate
44
+ // if mobile we use a backdrop because click events don't delegate
45
45
  $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
46
46
  }
47
47
 
@@ -123,9 +123,9 @@
123
123
  $.fn.dropdown = function (option) {
124
124
  return this.each(function () {
125
125
  var $this = $(this)
126
- var data = $this.data('dropdown')
126
+ var data = $this.data('bs.dropdown')
127
127
 
128
- if (!data) $this.data('dropdown', (data = new Dropdown(this)))
128
+ if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
129
129
  if (typeof option == 'string') data[option].call($this)
130
130
  })
131
131
  }
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: modal.js v3.0.2
2
+ * Bootstrap: modal.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#modals
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: popover.js v3.0.2
2
+ * Bootstrap: popover.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#popovers
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: scrollspy.js v3.0.2
2
+ * Bootstrap: scrollspy.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#scrollspy
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -113,7 +113,7 @@
113
113
  .addClass('active')
114
114
  }
115
115
 
116
- active.trigger('activate')
116
+ active.trigger('activate.bs.scrollspy')
117
117
  }
118
118
 
119
119
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: tab.js v3.0.2
2
+ * Bootstrap: tab.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#tabs
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: tooltip.js v3.0.2
2
+ * Bootstrap: tooltip.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#tooltip
4
4
  * Inspired by the original jQuery.tipsy by Jason Frame
5
5
  * ========================================================================
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: transition.js v3.0.2
2
+ * Bootstrap: transition.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#transitions
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -22,6 +22,12 @@
22
22
  &:empty {
23
23
  display: none;
24
24
  }
25
+
26
+ // Quick fix for badges in buttons
27
+ .btn & {
28
+ position: relative;
29
+ top: -1px;
30
+ }
25
31
  }
26
32
 
27
33
  // Hover state, but only for links
@@ -34,12 +40,6 @@ a.badge {
34
40
  }
35
41
  }
36
42
 
37
- // Quick fix for labels/badges in buttons
38
- .btn .badge {
39
- position: relative;
40
- top: -1px;
41
- }
42
-
43
43
  // Account for counters in navs
44
44
  a.list-group-item.active > .badge,
45
45
  .nav-pills > .active > a > .badge {
@@ -2,37 +2,6 @@
2
2
  // Button groups
3
3
  // --------------------------------------------------
4
4
 
5
- // Button carets
6
- //
7
- // Match the button text color to the arrow/caret for indicating dropdown-ness.
8
-
9
- .caret {
10
- .btn-default & {
11
- border-top-color: @btn-default-color;
12
- }
13
- .btn-primary &,
14
- .btn-success &,
15
- .btn-warning &,
16
- .btn-danger &,
17
- .btn-info & {
18
- border-top-color: #fff;
19
- }
20
- }
21
- .dropup {
22
- .btn-default .caret {
23
- border-bottom-color: @btn-default-color;
24
- }
25
- .btn-primary,
26
- .btn-success,
27
- .btn-warning,
28
- .btn-danger,
29
- .btn-info {
30
- .caret {
31
- border-bottom-color: #fff;
32
- }
33
- }
34
- }
35
-
36
5
  // Make the div behave like a button
37
6
  .btn-group,
38
7
  .btn-group-vertical {
@@ -178,7 +147,8 @@
178
147
 
179
148
  .btn-group-vertical {
180
149
  > .btn,
181
- > .btn-group {
150
+ > .btn-group,
151
+ > .btn-group > .btn {
182
152
  display: block;
183
153
  float: none;
184
154
  width: 100%;
@@ -238,11 +208,15 @@
238
208
  width: 100%;
239
209
  table-layout: fixed;
240
210
  border-collapse: separate;
241
- .btn {
211
+ > .btn,
212
+ > .btn-group {
242
213
  float: none;
243
214
  display: table-cell;
244
215
  width: 1%;
245
216
  }
217
+ > .btn-group .btn {
218
+ width: 100%;
219
+ }
246
220
  }
247
221
 
248
222
 
@@ -6,7 +6,6 @@
6
6
  // Base styles
7
7
  // --------------------------------------------------
8
8
 
9
- // Core styles
10
9
  .btn {
11
10
  display: inline-block;
12
11
  margin-bottom: 0; // For input.btn
@@ -45,7 +44,6 @@
45
44
  .opacity(.65);
46
45
  .box-shadow(none);
47
46
  }
48
-
49
47
  }
50
48
 
51
49
 
@@ -123,13 +121,12 @@
123
121
  // line-height: ensure even-numbered height of button next to large input
124
122
  .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
125
123
  }
126
- .btn-sm,
127
- .btn-xs {
124
+ .btn-sm {
128
125
  // line-height: ensure proper height of button next to small input
129
126
  .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
130
127
  }
131
128
  .btn-xs {
132
- padding: 1px 5px;
129
+ .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small);
133
130
  }
134
131
 
135
132
 
@@ -91,6 +91,7 @@
91
91
  // Hover/focus state
92
92
  &:hover,
93
93
  &:focus {
94
+ outline: none;
94
95
  color: @carousel-control-color;
95
96
  text-decoration: none;
96
97
  .opacity(.9);
@@ -10,12 +10,9 @@
10
10
  height: 0;
11
11
  margin-left: 2px;
12
12
  vertical-align: middle;
13
- border-top: @caret-width-base solid @dropdown-caret-color;
13
+ border-top: @caret-width-base solid;
14
14
  border-right: @caret-width-base solid transparent;
15
15
  border-left: @caret-width-base solid transparent;
16
- // Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once fixed,
17
- // we can just straight up remove this.
18
- border-bottom: 0 dotted;
19
16
  }
20
17
 
21
18
  // The dropdown wrapper (div)
@@ -163,10 +160,8 @@
163
160
  .navbar-fixed-bottom .dropdown {
164
161
  // Reverse the caret
165
162
  .caret {
166
- // Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once this
167
- // gets fixed, restore `border-top: 0;`.
168
- border-top: 0 dotted;
169
- border-bottom: @caret-width-base solid @dropdown-caret-color;
163
+ border-top: 0;
164
+ border-bottom: @caret-width-base solid;
170
165
  content: "";
171
166
  }
172
167
  // Different positioning for bottom up menu
@@ -309,6 +309,11 @@ input[type="checkbox"],
309
309
  display: inline-block;
310
310
  }
311
311
 
312
+ // Override `width: 100%;` when not within a `.form-group`
313
+ select.form-control {
314
+ width: auto;
315
+ }
316
+
312
317
  // Remove default margin on radios/checkboxes that were used for stacking, and
313
318
  // then undo the floating of radios and checkboxes to match (which also avoids
314
319
  // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).
@@ -345,6 +350,12 @@ input[type="checkbox"],
345
350
  margin-bottom: 0;
346
351
  padding-top: (@padding-base-vertical + 1); // Default padding plus a border
347
352
  }
353
+ // Account for padding we're adding to ensure the alignment and of help text
354
+ // and other content below items
355
+ .radio,
356
+ .checkbox {
357
+ min-height: @line-height-computed + (@padding-base-vertical + 1);
358
+ }
348
359
 
349
360
  // Make form groups behave like rows
350
361
  .form-group {
@@ -14,7 +14,7 @@
14
14
  src: asset-url('glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
15
15
  asset-url('glyphicons-halflings-regular.woff') format('woff'),
16
16
  asset-url('glyphicons-halflings-regular.ttf') format('truetype'),
17
- asset-url('glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
17
+ asset-url('glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
18
18
  }
19
19
 
20
20
  // Catchall baseclass
@@ -5,6 +5,16 @@
5
5
  // Set the container width, and override it for fixed navbars in media queries
6
6
  .container {
7
7
  .container-fixed();
8
+
9
+ @media (min-width: @screen-sm) {
10
+ width: @container-sm;
11
+ }
12
+ @media (min-width: @screen-md) {
13
+ width: @container-md;
14
+ }
15
+ @media (min-width: @screen-lg-min) {
16
+ width: @container-lg;
17
+ }
8
18
  }
9
19
 
10
20
  // mobile first defaults
@@ -18,11 +28,8 @@
18
28
 
19
29
  // Extra small grid
20
30
  //
21
- // Grid classes for extra small devices like smartphones. No offset, push, or
22
- // pull classes are present here due to the size of the target.
23
- //
24
- // Note that `.col-xs-12` doesn't get floated on purpose--there's no need since
25
- // it's full-width.
31
+ // Columns, offsets, pushes, and pulls for extra small devices like
32
+ // smartphones.
26
33
 
27
34
  .make-grid-columns-float(xs);
28
35
  .make-grid(@grid-columns, xs, width);
@@ -35,15 +42,8 @@
35
42
  //
36
43
  // Columns, offsets, pushes, and pulls for the small device range, from phones
37
44
  // to tablets.
38
- //
39
- // Note that `.col-sm-12` doesn't get floated on purpose--there's no need since
40
- // it's full-width.
41
45
 
42
46
  @media (min-width: @screen-sm-min) {
43
- .container {
44
- width: @container-sm;
45
- }
46
-
47
47
  .make-grid-columns-float(sm);
48
48
  .make-grid(@grid-columns, sm, width);
49
49
  .make-grid(@grid-columns, sm, pull);
@@ -55,15 +55,8 @@
55
55
  // Medium grid
56
56
  //
57
57
  // Columns, offsets, pushes, and pulls for the desktop device range.
58
- //
59
- // Note that `.col-md-12` doesn't get floated on purpose--there's no need since
60
- // it's full-width.
61
58
 
62
59
  @media (min-width: @screen-md-min) {
63
- .container {
64
- width: @container-md;
65
- }
66
-
67
60
  .make-grid-columns-float(md);
68
61
  .make-grid(@grid-columns, md, width);
69
62
  .make-grid(@grid-columns, md, pull);
@@ -75,15 +68,8 @@
75
68
  // Large grid
76
69
  //
77
70
  // Columns, offsets, pushes, and pulls for the large desktop device range.
78
- //
79
- // Note that `.col-lg-12` doesn't get floated on purpose--there's no need since
80
- // it's full-width.
81
71
 
82
72
  @media (min-width: @screen-lg-min) {
83
- .container {
84
- width: @container-lg;
85
- }
86
-
87
73
  .make-grid-columns-float(lg);
88
74
  .make-grid(@grid-columns, lg, width);
89
75
  .make-grid(@grid-columns, lg, pull);
@@ -10,7 +10,7 @@
10
10
  border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table
11
11
 
12
12
  // Undo padding and float of grid classes
13
- &.col {
13
+ &[class*="col-"] {
14
14
  float: none;
15
15
  padding-left: 0;
16
16
  padding-right: 0;
@@ -12,7 +12,8 @@
12
12
  color: @jumbotron-color;
13
13
  background-color: @jumbotron-bg;
14
14
 
15
- h1 {
15
+ h1,
16
+ .h1 {
16
17
  line-height: 1;
17
18
  color: @jumbotron-heading-color;
18
19
  }
@@ -24,6 +25,10 @@
24
25
  border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container
25
26
  }
26
27
 
28
+ .container {
29
+ max-width: 100%;
30
+ }
31
+
27
32
  @media screen and (min-width: @screen-sm-min) {
28
33
  padding-top: (@jumbotron-padding * 1.6);
29
34
  padding-bottom: (@jumbotron-padding * 1.6);
@@ -33,7 +38,8 @@
33
38
  padding-right: (@jumbotron-padding * 2);
34
39
  }
35
40
 
36
- h1 {
41
+ h1,
42
+ .h1 {
37
43
  font-size: (@font-size-base * 4.5);
38
44
  }
39
45
  }
@@ -28,6 +28,12 @@
28
28
  &:empty {
29
29
  display: none;
30
30
  }
31
+
32
+ // Quick fix for labels in buttons
33
+ .btn & {
34
+ position: relative;
35
+ top: -1px;
36
+ }
31
37
  }
32
38
 
33
39
  // Colors