bootstrap-sass 2.0.1 → 2.0.2

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 (46) hide show
  1. data/README.md +8 -8
  2. data/lib/bootstrap-sass.rb +2 -0
  3. data/lib/bootstrap-sass/engine.rb +1 -1
  4. data/templates/project/manifest.rb +1 -1
  5. data/vendor/assets/javascripts/bootstrap-alert.js +1 -1
  6. data/vendor/assets/javascripts/bootstrap-button.js +4 -2
  7. data/vendor/assets/javascripts/bootstrap-carousel.js +7 -3
  8. data/vendor/assets/javascripts/bootstrap-collapse.js +4 -2
  9. data/vendor/assets/javascripts/bootstrap-dropdown.js +1 -1
  10. data/vendor/assets/javascripts/bootstrap-modal.js +1 -1
  11. data/vendor/assets/javascripts/bootstrap-popover.js +1 -1
  12. data/vendor/assets/javascripts/bootstrap-scrollspy.js +1 -1
  13. data/vendor/assets/javascripts/bootstrap-tab.js +1 -1
  14. data/vendor/assets/javascripts/bootstrap-tooltip.js +2 -2
  15. data/vendor/assets/javascripts/bootstrap-transition.js +1 -1
  16. data/vendor/assets/javascripts/bootstrap-typeahead.js +7 -7
  17. data/vendor/assets/stylesheets/_bootstrap-responsive.scss +65 -35
  18. data/vendor/assets/stylesheets/_bootstrap.scss +1 -11
  19. data/vendor/assets/stylesheets/bootstrap/_alerts.scss +3 -9
  20. data/vendor/assets/stylesheets/bootstrap/_badges.scss +36 -0
  21. data/vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss +2 -0
  22. data/vendor/assets/stylesheets/bootstrap/_button-groups.scss +32 -10
  23. data/vendor/assets/stylesheets/bootstrap/_buttons.scss +16 -12
  24. data/vendor/assets/stylesheets/bootstrap/_code.scss +2 -2
  25. data/vendor/assets/stylesheets/bootstrap/_component-animations.scss +3 -1
  26. data/vendor/assets/stylesheets/bootstrap/_dropdowns.scss +44 -27
  27. data/vendor/assets/stylesheets/bootstrap/_forms.scss +63 -40
  28. data/vendor/assets/stylesheets/bootstrap/_grid.scss +2 -5
  29. data/vendor/assets/stylesheets/bootstrap/_hero-unit.scss +3 -1
  30. data/vendor/assets/stylesheets/bootstrap/_labels.scss +9 -3
  31. data/vendor/assets/stylesheets/bootstrap/_mixins.scss +161 -119
  32. data/vendor/assets/stylesheets/bootstrap/_modals.scss +12 -5
  33. data/vendor/assets/stylesheets/bootstrap/_navbar.scss +62 -32
  34. data/vendor/assets/stylesheets/bootstrap/_navs.scss +16 -6
  35. data/vendor/assets/stylesheets/bootstrap/_pager.scss +5 -0
  36. data/vendor/assets/stylesheets/bootstrap/_pagination.scss +1 -1
  37. data/vendor/assets/stylesheets/bootstrap/_progress-bars.scss +15 -1
  38. data/vendor/assets/stylesheets/bootstrap/_reset.scss +1 -1
  39. data/vendor/assets/stylesheets/bootstrap/_scaffolding.scss +3 -3
  40. data/vendor/assets/stylesheets/bootstrap/_sprites.scss +3 -3
  41. data/vendor/assets/stylesheets/bootstrap/_tables.scss +11 -15
  42. data/vendor/assets/stylesheets/bootstrap/_type.scss +22 -5
  43. data/vendor/assets/stylesheets/bootstrap/_variables.scss +102 -14
  44. data/vendor/assets/stylesheets/bootstrap/_wells.scss +10 -0
  45. metadata +20 -9
  46. data/lib/bootstrap-sass/config/sass-ie_hex_str.rb +0 -14
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Bootstrap for SASS
1
+ # Bootstrap for Sass
2
2
 
3
- `bootstrap-sass` is an SASS-powered version of [Twitter's Bootstrap](http://github.com/twitter/bootstrap), ready to drop right into your SASS powered applications.
3
+ `bootstrap-sass` is an Sass-powered version of [Twitter's Bootstrap](http://github.com/twitter/bootstrap), ready to drop right into your Sass powered applications.
4
4
 
5
5
  Enjoy.
6
6
 
@@ -14,24 +14,24 @@ Updating your application to a new version of `bootstrap-sass`? See [our changel
14
14
  In your Gemfile:
15
15
 
16
16
  gem 'sass-rails', '~> 3.1'
17
- gem 'bootstrap-sass', '~> 2.0.1'
18
-
19
- **Note**: previous versions of bootstrap-sass automatically required sass-rails. This is no longer the case, and you will *need* to require it in your Gemfile.
17
+ gem 'bootstrap-sass', '~> 2.0.2'
20
18
 
21
19
  #### CSS
22
20
 
23
- Import "bootstrap" in your SCSS file of choice to get all of Bootstrap's styles, mixins and variables! Don't use Sproket's `//= require` directives for SASS files, because they're horrible and will kill your cat.
21
+ Import "bootstrap" in your SCSS file of choice to get all of Bootstrap's styles, mixins and variables! We recommend against using `//= require` directives, since none of your other stylesheets will be [able to use](https://github.com/thomas-mcdonald/bootstrap-sass/issues/79#issuecomment-4428595) the awesome mixins that Bootstrap has defined.
24
22
 
25
23
  @import "bootstrap";
26
24
 
27
- Need to configure a variable or two? Simple define the value of the variable you want to change *before* importing Bootstrap. SASS will be awesome and respect your existing definition rather than overwriting it with the Bootstrap defaults. A list of customisable variables can be found in the [Bootstrap documentation](http://twitter.github.com/bootstrap/less.html#variables).
25
+ Need to configure a variable or two? Simple define the value of the variable you want to change *before* importing Bootstrap. Sass will respect your existing definition rather than overwriting it with the Bootstrap defaults. A list of customisable variables can be found in the [Bootstrap documentation](http://twitter.github.com/bootstrap/less.html#variables).
28
26
 
29
27
  $primaryButtonBackground: #f00;
30
28
  @import "bootstrap";
31
29
 
30
+ **Note**: It's important that the file you are importing is not named `bootstrap`, since this will cause an import loop. As a general rule, errors are something you should try to avoid.
31
+
32
32
  #### Javascripts
33
33
 
34
- You can include the Bootstrap javascripts through two methods. In this case, Sproket's `//= require` directives are useful and will not cause feline death.
34
+ You can include the Bootstrap javascripts through two methods. In this case, Sprocket's `//= require` directives are useful, since there is no better alternative.
35
35
 
36
36
  We have a helper that includes all available javascripts:
37
37
 
@@ -6,8 +6,10 @@ module Bootstrap
6
6
  if rails?
7
7
  require 'sass-rails' # See: https://github.com/thomas-mcdonald/bootstrap-sass/pull/4
8
8
  require 'bootstrap-sass/engine'
9
+ require 'bootstrap-sass/config/sass_extentions'
9
10
  elsif compass?
10
11
  require 'bootstrap-sass/compass_extensions'
12
+ require 'bootstrap-sass/config/sass_extentions'
11
13
  base = File.join(File.dirname(__FILE__), '..')
12
14
  styles = File.join(base, 'vendor', 'assets', 'stylesheets')
13
15
  templates = File.join(base, 'templates')
@@ -3,7 +3,7 @@ module Bootstrap
3
3
  class Engine < ::Rails::Engine
4
4
  # Rails, will you please look in our vendor? kthx
5
5
  # also add our initializer.
6
- paths["config/initializers"] << 'lib/bootstrap-sass/config'
6
+ # paths["config/initializers"] << 'lib/bootstrap-sass/config'
7
7
  end
8
8
  end
9
9
  end
@@ -1,4 +1,4 @@
1
- description "Bootstrap for SASS"
1
+ description "Bootstrap for Sass"
2
2
 
3
3
  # Stylesheet importing bootstrap
4
4
  stylesheet 'styles.scss'
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-alert.js v2.0.1
2
+ * bootstrap-alert.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#alerts
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ============================================================
2
- * bootstrap-button.js v2.0.1
2
+ * bootstrap-button.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#buttons
4
4
  * ============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -91,7 +91,9 @@
91
91
 
92
92
  $(function () {
93
93
  $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
94
- $(e.currentTarget).button('toggle')
94
+ var $btn = $(e.target)
95
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
96
+ $btn.button('toggle')
95
97
  })
96
98
  })
97
99
 
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-carousel.js v2.0.1
2
+ * bootstrap-carousel.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#carousel
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -29,6 +29,9 @@
29
29
  this.$element = $(element)
30
30
  this.options = $.extend({}, $.fn.carousel.defaults, options)
31
31
  this.options.slide && this.slide(this.options.slide)
32
+ this.options.pause == 'hover' && this.$element
33
+ .on('mouseenter', $.proxy(this.pause, this))
34
+ .on('mouseleave', $.proxy(this.cycle, this))
32
35
  }
33
36
 
34
37
  Carousel.prototype = {
@@ -83,14 +86,14 @@
83
86
  , fallback = type == 'next' ? 'first' : 'last'
84
87
  , that = this
85
88
 
86
- if (!$next.length) return
87
-
88
89
  this.sliding = true
89
90
 
90
91
  isCycling && this.pause()
91
92
 
92
93
  $next = $next.length ? $next : this.$element.find('.item')[fallback]()
93
94
 
95
+ if ($next.hasClass('active')) return
96
+
94
97
  if (!$.support.transition && this.$element.hasClass('slide')) {
95
98
  this.$element.trigger('slide')
96
99
  $active.removeClass('active')
@@ -136,6 +139,7 @@
136
139
 
137
140
  $.fn.carousel.defaults = {
138
141
  interval: 5000
142
+ , pause: 'hover'
139
143
  }
140
144
 
141
145
  $.fn.carousel.Constructor = Carousel
@@ -1,5 +1,5 @@
1
1
  /* =============================================================
2
- * bootstrap-collapse.js v2.0.1
2
+ * bootstrap-collapse.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#collapse
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -74,7 +74,9 @@
74
74
  [dimension](size || 'auto')
75
75
  [0].offsetWidth
76
76
 
77
- this.$element.addClass('collapse')
77
+ this.$element[size ? 'addClass' : 'removeClass']('collapse')
78
+
79
+ return this
78
80
  }
79
81
 
80
82
  , transition: function ( method, startEvent, completeEvent ) {
@@ -1,5 +1,5 @@
1
1
  /* ============================================================
2
- * bootstrap-dropdown.js v2.0.1
2
+ * bootstrap-dropdown.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#dropdowns
4
4
  * ============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* =========================================================
2
- * bootstrap-modal.js v2.0.1
2
+ * bootstrap-modal.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#modals
4
4
  * =========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ===========================================================
2
- * bootstrap-popover.js v2.0.1
2
+ * bootstrap-popover.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#popovers
4
4
  * ===========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* =============================================================
2
- * bootstrap-scrollspy.js v2.0.1
2
+ * bootstrap-scrollspy.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#scrollspy
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ========================================================
2
- * bootstrap-tab.js v2.0.1
2
+ * bootstrap-tab.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#tabs
4
4
  * ========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ===========================================================
2
- * bootstrap-tooltip.js v2.0.1
2
+ * bootstrap-tooltip.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#tooltips
4
4
  * Inspired by the original jQuery.tipsy by Jason Frame
5
5
  * ===========================================================
@@ -206,7 +206,7 @@
206
206
  title = $e.attr('data-original-title')
207
207
  || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
208
208
 
209
- title = title.toString().replace(/(^\s*|\s*$)/, "")
209
+ title = (title || '').toString().replace(/(^\s*|\s*$)/, "")
210
210
 
211
211
  return title
212
212
  }
@@ -1,5 +1,5 @@
1
1
  /* ===================================================
2
- * bootstrap-transition.js v2.0.1
2
+ * bootstrap-transition.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#transitions
4
4
  * ===================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* =============================================================
2
- * bootstrap-typeahead.js v2.0.1
2
+ * bootstrap-typeahead.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#typeahead
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -40,6 +40,7 @@
40
40
  , select: function () {
41
41
  var val = this.$menu.find('.active').attr('data-value')
42
42
  this.$element.val(val)
43
+ this.$element.change();
43
44
  return this.hide()
44
45
  }
45
46
 
@@ -165,9 +166,6 @@
165
166
  }
166
167
 
167
168
  , keyup: function (e) {
168
- e.stopPropagation()
169
- e.preventDefault()
170
-
171
169
  switch(e.keyCode) {
172
170
  case 40: // down arrow
173
171
  case 38: // up arrow
@@ -180,6 +178,7 @@
180
178
  break
181
179
 
182
180
  case 27: // escape
181
+ if (!this.shown) return
183
182
  this.hide()
184
183
  break
185
184
 
@@ -187,10 +186,11 @@
187
186
  this.lookup()
188
187
  }
189
188
 
189
+ e.stopPropagation()
190
+ e.preventDefault()
190
191
  }
191
192
 
192
193
  , keypress: function (e) {
193
- e.stopPropagation()
194
194
  if (!this.shown) return
195
195
 
196
196
  switch(e.keyCode) {
@@ -210,12 +210,12 @@
210
210
  this.next()
211
211
  break
212
212
  }
213
+
214
+ e.stopPropagation()
213
215
  }
214
216
 
215
217
  , blur: function (e) {
216
218
  var that = this
217
- e.stopPropagation()
218
- e.preventDefault()
219
219
  setTimeout(function () { that.hide() }, 150)
220
220
  }
221
221
 
@@ -1,14 +1,3 @@
1
- /*!
2
- * Bootstrap Responsive v2.0.1
3
- *
4
- * Copyright 2012 Twitter, Inc
5
- * Licensed under the Apache License v2.0
6
- * http://www.apache.org/licenses/LICENSE-2.0
7
- *
8
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
9
- * Converted to SASS by Thomas McDonald
10
- */
11
-
12
1
  // Responsive.css.scss
13
2
  // For phone and tablet devices
14
3
  // -------------------------------------------------------------
@@ -32,7 +21,36 @@
32
21
  visibility: hidden;
33
22
  }
34
23
 
24
+ // Visibility utilities
25
+ // For desktops
26
+ .visible-phone { display: none; }
27
+ .visible-tablet { display: none; }
28
+ .visible-desktop { display: block; }
29
+ .hidden-phone { display: block; }
30
+ .hidden-tablet { display: block; }
31
+ .hidden-desktop { display: none; }
35
32
 
33
+ // Phones only
34
+ @media (max-width: 767px) {
35
+ // Show
36
+ .visible-phone { display: block; }
37
+ // Hide
38
+ .hidden-phone { display: none; }
39
+ // Hide everything else
40
+ .hidden-desktop { display: block; }
41
+ .visible-desktop { display: none; }
42
+ }
43
+
44
+ // Tablets & small desktops only
45
+ @media (min-width: 768px) and (max-width: 979px) {
46
+ // Show
47
+ .visible-tablet { display: block; }
48
+ // Hide
49
+ .hidden-tablet { display: none; }
50
+ // Hide everything else
51
+ .hidden-desktop { display: block; }
52
+ .visible-desktop { display: none; }
53
+ }
36
54
 
37
55
  // UP TO LANDSCAPE PHONE
38
56
  // ---------------------
@@ -50,22 +68,6 @@
50
68
  line-height: $baseLineHeight;
51
69
  }
52
70
 
53
- // Make span* classes full width
54
- input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input {
55
- display: block;
56
- width: 100%;
57
- min-height: 28px; /* Make inputs at least the height of their button counterpart */
58
- /* Makes inputs behave like true block-level elements */
59
- -webkit-box-sizing: border-box; /* Older Webkit */
60
- -moz-box-sizing: border-box; /* Older FF */
61
- -ms-box-sizing: border-box; /* IE8 */
62
- box-sizing: border-box; /* CSS3 spec*/
63
- }
64
- // But don't let it screw up prepend/append inputs
65
- .input-prepend input[class*="span"], .input-append input[class*="span"] {
66
- width: auto;
67
- }
68
-
69
71
  // Update checkboxes for iOS
70
72
  input[type="checkbox"], input[type="radio"] {
71
73
  border: 1px solid #ccc;
@@ -120,12 +122,22 @@
120
122
  // --------------------------------------------------
121
123
 
122
124
  @media (max-width: 767px) {
125
+
126
+ // Padding to set content in a bit
127
+ body {
128
+ padding-left: 20px;
129
+ padding-right: 20px;
130
+ }
131
+ .navbar-fixed-top {
132
+ margin-left: -20px;
133
+ margin-right: -20px;
134
+ }
135
+
123
136
  // GRID & CONTAINERS
124
137
  // -----------------
125
138
  // Remove width from containers
126
139
  .container {
127
140
  width: auto;
128
- padding: 0 20px;
129
141
  }
130
142
  // Fluid rows
131
143
  .row-fluid {
@@ -142,6 +154,23 @@
142
154
  width: auto;
143
155
  margin: 0;
144
156
  }
157
+
158
+ // THUMBNAILS
159
+ // ----------
160
+ .thumbnails [class*="span"] {
161
+ width: auto;
162
+ }
163
+
164
+ // FORM FIELDS
165
+ // -----------
166
+ // Make span* classes full width
167
+ input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input {
168
+ @include input-block-level();
169
+ }
170
+ // But don't let it screw up prepend/append inputs
171
+ .input-prepend input[class*="span"], .input-append input[class*="span"] {
172
+ width: auto;
173
+ }
145
174
  }
146
175
 
147
176
 
@@ -152,13 +181,13 @@
152
181
  @media (min-width: 768px) and (max-width: 979px) {
153
182
 
154
183
  // Fixed grid
155
- @include gridSystemGenerate(12, 42px, 20px);
184
+ @include gridCore(42px, 20px);
156
185
 
157
186
  // Fluid grid
158
- @include fluidGridSystemGenerate(12, 5.801104972%, 2.762430939%);
187
+ @include gridFluid(5.801104972%, 2.762430939%);
159
188
 
160
189
  // Input grid
161
- @include inputGridSystemGenerate(12, 42px, 20px);
190
+ @include gridInput(42px, 20px);
162
191
 
163
192
  }
164
193
 
@@ -273,7 +302,7 @@
273
302
  display: block;
274
303
  }
275
304
 
276
- // Hide everything in the navbar save .brand and toggle button */
305
+ // Hide everything in the navbar save .brand and toggle button
277
306
  .nav-collapse {
278
307
  overflow: hidden;
279
308
  height: 0;
@@ -288,6 +317,7 @@
288
317
  @media (min-width: 980px) {
289
318
  .nav-collapse.collapse {
290
319
  height: auto !important;
320
+ overflow: visible !important;
291
321
  }
292
322
  }
293
323
 
@@ -299,13 +329,13 @@
299
329
  @media (min-width: 1200px) {
300
330
 
301
331
  // Fixed grid
302
- @include gridSystemGenerate(12, 70px, 30px);
332
+ @include gridCore(70px, 30px);
303
333
 
304
334
  // Fluid grid
305
- @include fluidGridSystemGenerate(12, 5.982905983%, 2.564102564%);
335
+ @include gridFluid(5.982905983%, 2.564102564%);
306
336
 
307
337
  // Input grid
308
- @include inputGridSystemGenerate(12, 70px, 30px);
338
+ @include gridInput(70px, 30px);
309
339
 
310
340
  // Thumbnails
311
341
  .thumbnails {
@@ -1,14 +1,3 @@
1
- /*!
2
- * Bootstrap 2.0.1
3
- *
4
- * Copyright 2012 Twitter, Inc
5
- * Licensed under the Apache License v2.0
6
- * http://www.apache.org/licenses/LICENSE-2.0
7
- *
8
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
9
- * Converted to SASS by Thomas McDonald
10
- */
11
-
12
1
  // Core variables and mixins
13
2
  @import "bootstrap/variables"; // Modify this for custom colors, font-sizes, etc
14
3
  @import "bootstrap/mixins";
@@ -54,6 +43,7 @@
54
43
  // Components: Misc
55
44
  @import "bootstrap/thumbnails";
56
45
  @import "bootstrap/labels";
46
+ @import "bootstrap/badges";
57
47
  @import "bootstrap/progress-bars";
58
48
  @import "bootstrap/accordion";
59
49
  @import "bootstrap/carousel";