bootstrap-sass 3.0.2.1 → 3.0.3.0

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

Potentially problematic release.


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

Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/Gemfile +9 -1
  4. data/README.md +49 -3
  5. data/Rakefile +1 -3
  6. data/lib/bootstrap-sass.rb +54 -43
  7. data/lib/bootstrap-sass/sass_functions.rb +45 -10
  8. data/lib/bootstrap-sass/version.rb +2 -2
  9. data/tasks/converter/less_conversion.rb +18 -12
  10. data/templates/project/manifest.rb +11 -2
  11. data/test/dummy/app/views/pages/root.html.slim +19 -3
  12. data/test/dummy_sass_only/Gemfile +4 -0
  13. data/test/dummy_sass_only/compile.rb +13 -0
  14. data/test/dummy_sass_only/import_all.sass +2 -0
  15. data/test/gemfiles/sass_3_2.gemfile +9 -1
  16. data/test/gemfiles/sass_head.gemfile +11 -2
  17. data/test/sass_test.rb +23 -0
  18. data/test/test_helper.rb +0 -1
  19. data/vendor/assets/javascripts/bootstrap/affix.js +1 -1
  20. data/vendor/assets/javascripts/bootstrap/alert.js +1 -1
  21. data/vendor/assets/javascripts/bootstrap/button.js +11 -5
  22. data/vendor/assets/javascripts/bootstrap/carousel.js +5 -5
  23. data/vendor/assets/javascripts/bootstrap/collapse.js +1 -1
  24. data/vendor/assets/javascripts/bootstrap/dropdown.js +5 -5
  25. data/vendor/assets/javascripts/bootstrap/modal.js +1 -1
  26. data/vendor/assets/javascripts/bootstrap/popover.js +1 -1
  27. data/vendor/assets/javascripts/bootstrap/scrollspy.js +2 -2
  28. data/vendor/assets/javascripts/bootstrap/tab.js +1 -1
  29. data/vendor/assets/javascripts/bootstrap/tooltip.js +1 -1
  30. data/vendor/assets/javascripts/bootstrap/transition.js +1 -1
  31. data/vendor/assets/stylesheets/bootstrap/_badges.scss +6 -6
  32. data/vendor/assets/stylesheets/bootstrap/_button-groups.scss +7 -33
  33. data/vendor/assets/stylesheets/bootstrap/_buttons.scss +2 -5
  34. data/vendor/assets/stylesheets/bootstrap/_carousel.scss +1 -0
  35. data/vendor/assets/stylesheets/bootstrap/_dropdowns.scss +3 -8
  36. data/vendor/assets/stylesheets/bootstrap/_forms.scss +11 -0
  37. data/vendor/assets/stylesheets/bootstrap/_glyphicons.scss +5 -5
  38. data/vendor/assets/stylesheets/bootstrap/_grid.scss +12 -26
  39. data/vendor/assets/stylesheets/bootstrap/_input-groups.scss +1 -1
  40. data/vendor/assets/stylesheets/bootstrap/_jumbotron.scss +8 -2
  41. data/vendor/assets/stylesheets/bootstrap/_labels.scss +6 -0
  42. data/vendor/assets/stylesheets/bootstrap/_mixins.scss +38 -51
  43. data/vendor/assets/stylesheets/bootstrap/_modals.scss +2 -5
  44. data/vendor/assets/stylesheets/bootstrap/_navbar.scss +41 -53
  45. data/vendor/assets/stylesheets/bootstrap/_navs.scss +0 -20
  46. data/vendor/assets/stylesheets/bootstrap/_panels.scss +11 -1
  47. data/vendor/assets/stylesheets/bootstrap/_progress-bars.scss +0 -12
  48. data/vendor/assets/stylesheets/bootstrap/_tables.scss +5 -18
  49. data/vendor/assets/stylesheets/bootstrap/_thumbnails.scss +9 -3
  50. data/vendor/assets/stylesheets/bootstrap/_type.scss +54 -52
  51. data/vendor/assets/stylesheets/bootstrap/_variables.scss +17 -10
  52. metadata +10 -3
  53. data/lib/bootstrap-sass/compass_functions.rb +0 -24
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'sass', '~> 3.2'
4
+ gem 'bootstrap-sass', path: '../..'
@@ -0,0 +1,13 @@
1
+ require 'sass'
2
+ require 'bootstrap-sass'
3
+
4
+ css = Sass.compile(
5
+ File.read(File.expand_path('./import_all.sass', File.dirname(__FILE__))),
6
+ :syntax => 'sass'
7
+ )
8
+
9
+ if ARGV[0]
10
+ File.open(ARGV[0], 'w') { |f| f.write css }
11
+ else
12
+ puts css
13
+ end
@@ -0,0 +1,2 @@
1
+ @import 'bootstrap'
2
+ @import 'bootstrap/theme'
@@ -2,4 +2,12 @@ source "https://rubygems.org"
2
2
 
3
3
  gem 'sass', '~> 3.2.0'
4
4
 
5
- gemspec path: '../../'
5
+ platform :rbx do
6
+ gem 'rubysl', '~> 2.0'
7
+ gem 'rubysl-test-unit', '~> 2.0'
8
+ gem 'rubysl-json', '~> 2.0'
9
+ gem 'racc'
10
+ end
11
+
12
+
13
+ gemspec path: '../../'
@@ -1,6 +1,15 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem 'sass', github: 'nex3/sass'
4
- gem 'compass', '~> 0.12.2'
3
+ gem 'sass', '~> 3.3.0.rc.2'
4
+ gem 'compass', '~> 1.0.0.alpha.13'
5
+
6
+
7
+ platform :rbx do
8
+ gem 'rubysl', '~> 2.0'
9
+ gem 'rubysl-test-unit', '~> 2.0'
10
+ gem 'rubysl-json', '~> 2.0'
11
+ gem 'racc'
12
+ end
13
+
5
14
 
6
15
  gemspec path: '../../'
@@ -0,0 +1,23 @@
1
+ require 'test_helper'
2
+
3
+ class SassTest < Test::Unit::TestCase
4
+ DUMMY_PATH = 'test/dummy_sass_only'
5
+
6
+ def test_font_helper
7
+ assert_match %r(url\(['"]?.*eot['"]?\)), @css
8
+ end
9
+
10
+ def setup
11
+ Dir.chdir DUMMY_PATH do
12
+ %x[bundle]
13
+ end
14
+ css_path = File.join Bootstrap.gem_path, 'tmp/bootstrap-sass-only.css'
15
+ command = "bundle exec ruby compile.rb #{css_path}"
16
+ Dir.chdir DUMMY_PATH do
17
+ assert silence_stream(STDOUT) {
18
+ system(command)
19
+ }, 'Sass-only compilation failed'
20
+ end
21
+ @css = File.read(css_path)
22
+ end
23
+ end
@@ -6,7 +6,6 @@ require File.expand_path('dummy/config/environment', File.dirname(__FILE__))
6
6
  require 'test/unit'
7
7
 
8
8
  require 'sass'
9
- require 'lib/bootstrap-sass/compass_functions'
10
9
  require 'lib/bootstrap-sass/sass_functions'
11
10
 
12
11
  require 'rails/test_help'
@@ -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
  @include opacity(.65);
46
45
  @include 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
  @include 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
  @include 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
+ @include 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
  @include 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
@@ -308,6 +308,11 @@ input[type="checkbox"],
308
308
  display: inline-block;
309
309
  }
310
310
 
311
+ // Override `width: 100%;` when not within a `.form-group`
312
+ select.form-control {
313
+ width: auto;
314
+ }
315
+
311
316
  // Remove default margin on radios/checkboxes that were used for stacking, and
312
317
  // then undo the floating of radios and checkboxes to match (which also avoids
313
318
  // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).
@@ -344,6 +349,12 @@ input[type="checkbox"],
344
349
  margin-bottom: 0;
345
350
  padding-top: ($padding-base-vertical + 1); // Default padding plus a border
346
351
  }
352
+ // Account for padding we're adding to ensure the alignment and of help text
353
+ // and other content below items
354
+ .radio,
355
+ .checkbox {
356
+ min-height: $line-height-computed + ($padding-base-vertical + 1);
357
+ }
347
358
 
348
359
  // Make form groups behave like rows
349
360
  .form-group {