sass-rails-bootstrap 2.0.4 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/README.md +3 -3
  2. data/lib/sass-rails-bootstrap/sass_functions.rb +15 -0
  3. data/lib/sass-rails-bootstrap/version.rb +1 -1
  4. data/lib/sass-rails-bootstrap.rb +1 -0
  5. data/vendor/assets/javascripts/twitter/bootstrap/affix.js +104 -0
  6. data/vendor/assets/javascripts/twitter/bootstrap/alert.js +2 -2
  7. data/vendor/assets/javascripts/twitter/bootstrap/button.js +2 -2
  8. data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +13 -6
  9. data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +5 -4
  10. data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +69 -19
  11. data/vendor/assets/javascripts/twitter/bootstrap/modal.js +96 -75
  12. data/vendor/assets/javascripts/twitter/bootstrap/popover.js +19 -9
  13. data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +13 -13
  14. data/vendor/assets/javascripts/twitter/bootstrap/tab.js +3 -3
  15. data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +15 -15
  16. data/vendor/assets/javascripts/twitter/bootstrap/transition.js +3 -4
  17. data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +52 -37
  18. data/vendor/assets/javascripts/twitter/bootstrap.js +1 -0
  19. data/vendor/assets/stylesheets/twitter/_bootstrap-responsive.scss +5 -5
  20. data/vendor/assets/stylesheets/twitter/_bootstrap.scss +2 -1
  21. data/vendor/assets/stylesheets/twitter/bootstrap/_accordion.sass +3 -2
  22. data/vendor/assets/stylesheets/twitter/bootstrap/_alerts.sass +14 -8
  23. data/vendor/assets/stylesheets/twitter/bootstrap/_breadcrumbs.sass +9 -9
  24. data/vendor/assets/stylesheets/twitter/bootstrap/_button-groups.sass +71 -23
  25. data/vendor/assets/stylesheets/twitter/bootstrap/_buttons.sass +81 -66
  26. data/vendor/assets/stylesheets/twitter/bootstrap/_carousel.sass +12 -3
  27. data/vendor/assets/stylesheets/twitter/bootstrap/_close.sass +4 -2
  28. data/vendor/assets/stylesheets/twitter/bootstrap/_code.sass +6 -4
  29. data/vendor/assets/stylesheets/twitter/bootstrap/_component-animations.sass +5 -2
  30. data/vendor/assets/stylesheets/twitter/bootstrap/_dropdowns.sass +76 -13
  31. data/vendor/assets/stylesheets/twitter/bootstrap/_forms.sass +84 -41
  32. data/vendor/assets/stylesheets/twitter/bootstrap/_grid.sass +13 -2
  33. data/vendor/assets/stylesheets/twitter/bootstrap/_hero-unit.sass +4 -2
  34. data/vendor/assets/stylesheets/twitter/bootstrap/_labels-badges.sass +15 -2
  35. data/vendor/assets/stylesheets/twitter/bootstrap/_layouts.sass +3 -2
  36. data/vendor/assets/stylesheets/twitter/bootstrap/_mixins.sass +107 -76
  37. data/vendor/assets/stylesheets/twitter/bootstrap/_modals.sass +8 -2
  38. data/vendor/assets/stylesheets/twitter/bootstrap/_navbar.sass +234 -134
  39. data/vendor/assets/stylesheets/twitter/bootstrap/_navs.sass +130 -96
  40. data/vendor/assets/stylesheets/twitter/bootstrap/_pager.sass +5 -4
  41. data/vendor/assets/stylesheets/twitter/bootstrap/_pagination.sass +16 -8
  42. data/vendor/assets/stylesheets/twitter/bootstrap/_popovers.sass +92 -38
  43. data/vendor/assets/stylesheets/twitter/bootstrap/_progress-bars.sass +18 -13
  44. data/vendor/assets/stylesheets/twitter/bootstrap/_reset.sass +6 -2
  45. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-1200px-min.sass +9 -7
  46. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-767px-max.sass +75 -60
  47. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-768px-979px.sass +7 -5
  48. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-navbar.sass +15 -6
  49. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-utilities.sass +17 -14
  50. data/vendor/assets/stylesheets/twitter/bootstrap/_scaffolding.sass +24 -4
  51. data/vendor/assets/stylesheets/twitter/bootstrap/_sprites.sass +13 -3
  52. data/vendor/assets/stylesheets/twitter/bootstrap/_tables.sass +50 -9
  53. data/vendor/assets/stylesheets/twitter/bootstrap/_thumbnails.sass +9 -4
  54. data/vendor/assets/stylesheets/twitter/bootstrap/_tooltip.sass +46 -17
  55. data/vendor/assets/stylesheets/twitter/bootstrap/_type.sass +69 -67
  56. data/vendor/assets/stylesheets/twitter/bootstrap/_utilities.sass +8 -2
  57. data/vendor/assets/stylesheets/twitter/bootstrap/_variables.sass +95 -26
  58. data/vendor/assets/stylesheets/twitter/bootstrap/_wells.sass +6 -5
  59. metadata +4 -2
@@ -1,5 +1,6 @@
1
- // Base styles for various input types, form layouts, and states
2
- // -------------------------------------------------------------
1
+ //
2
+ // Forms
3
+ // --------------------------------------------------
3
4
 
4
5
 
5
6
  // GENERAL STYLES
@@ -19,7 +20,7 @@ legend
19
20
  display: block
20
21
  width: 100%
21
22
  padding: 0
22
- margin-bottom: $baseLineHeight * 1.5
23
+ margin-bottom: $baseLineHeight
23
24
  font-size: $baseFontSize * 1.5
24
25
  line-height: $baseLineHeight * 2
25
26
  color: $grayDark
@@ -72,11 +73,12 @@ input[type="color"],
72
73
  .uneditable-input
73
74
  display: inline-block
74
75
  height: $baseLineHeight
75
- padding: 4px
76
+ padding: 4px 6px
76
77
  margin-bottom: 9px
77
78
  font-size: $baseFontSize
78
79
  line-height: $baseLineHeight
79
80
  color: $gray
81
+ +border-radius($inputBorderRadius)
80
82
 
81
83
  // Reset appearance properties for textual inputs and textarea
82
84
  // Declare width for legacy (can't be on input[type=*] selectors or it's too specific)
@@ -105,7 +107,6 @@ input[type="color"],
105
107
  .uneditable-input
106
108
  background-color: $inputBackground
107
109
  border: 1px solid $inputBorder
108
- +border-radius($inputBorderRadius)
109
110
  +box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.075))
110
111
  $transition: border linear 0.2s, box-shadow linear 0.2s
111
112
  +transition($transition)
@@ -121,12 +122,14 @@ input[type="color"],
121
122
  //Position radios and checkboxes better
122
123
  input[type="radio"],
123
124
  input[type="checkbox"]
124
- margin: 3px 0
125
+ margin: 4px 0 0
125
126
  *margin-top: 0 /* IE7 */
127
+ margin-top: 1px \9 /* IE8-9 */
126
128
  line-height: normal
127
129
  cursor: pointer
128
130
 
129
131
  // Reset width of input buttons, radios, checkboxes
132
+ input[type="file"],
130
133
  input[type="submit"],
131
134
  input[type="reset"],
132
135
  input[type="button"],
@@ -134,22 +137,18 @@ input[type="radio"],
134
137
  input[type="checkbox"]
135
138
  width: auto // Override of generic input selector
136
139
 
137
- // Make uneditable textareas behave like a textarea
138
- .uneditable-textarea
139
- width: auto
140
- height: auto
141
-
142
140
  // Set the height of select and file controls to match text inputs
143
141
  select,
144
142
  input[type="file"]
145
- height: 28px /* In IE7, the height of the select element cannot be changed by height, only font-size */
143
+ height: 30px /* In IE7, the height of the select element cannot be changed by height, only font-size */
146
144
  *margin-top: 4px /* For IE7, add top margin to align select with labels */
147
- line-height: 28px
145
+ line-height: 30px
148
146
 
149
147
  // Make select elements obey height by applying a border
150
148
  select
151
149
  width: 220px // default input width + 10px of padding that doesn't get applied
152
150
  border: 1px solid #bbb
151
+ background-color: $inputBackground // Chrome on Linux and Mobile Safari need background-color
153
152
 
154
153
  // Make multiple select elements height not fixed
155
154
  select[multiple],
@@ -164,6 +163,37 @@ input[type="checkbox"]:focus
164
163
  +tab-focus
165
164
 
166
165
 
166
+ // Uneditable inputs
167
+ // -------------------------
168
+
169
+ // Make uneditable inputs look inactive
170
+ .uneditable-input,
171
+ .uneditable-textarea
172
+ color: $grayLight
173
+ background-color: darken($inputBackground, 1%)
174
+ border-color: $inputBorder
175
+ +box-shadow(inset 0 1px 2px rgba(0,0,0,.025))
176
+ cursor: not-allowed
177
+
178
+ // For text that needs to appear as an input but should not be an input
179
+ .uneditable-input
180
+ overflow: hidden // prevent text from wrapping, but still cut it off like an input does
181
+ white-space: nowrap
182
+
183
+ // Make uneditable textareas behave like a textarea
184
+ .uneditable-textarea
185
+ width: auto
186
+ height: auto
187
+
188
+
189
+ // Placeholder
190
+ // -------------------------
191
+
192
+ // Placeholder text gets special styles; can't be bundled together though for some reason
193
+ input,
194
+ textarea
195
+ +placeholder
196
+
167
197
 
168
198
  // CHECKBOXES & RADIOS
169
199
  // -------------------
@@ -232,6 +262,10 @@ textarea[class*="span"],
232
262
  .input-append .uneditable-input[class*="span"],
233
263
  .input-prepend input[class*="span"],
234
264
  .input-prepend .uneditable-input[class*="span"],
265
+ .row-fluid input[class*="span"],
266
+ .row-fluid select[class*="span"],
267
+ .row-fluid textarea[class*="span"],
268
+ .row-fluid .uneditable-input[class*="span"],
235
269
  .row-fluid .input-prepend [class*="span"],
236
270
  .row-fluid .input-append [class*="span"]
237
271
  display: inline-block
@@ -241,8 +275,16 @@ textarea[class*="span"],
241
275
  // GRID SIZING FOR INPUTS
242
276
  // ----------------------
243
277
 
278
+ // Grid sizes
244
279
  +input-grid-generate($gridColumnWidth, $gridGutterWidth)
245
280
 
281
+ // Control row for multiple inputs per line
282
+ .controls-row
283
+ +clearfix // Clear the float from controls
284
+
285
+ .controls-row [class*="span"]
286
+ float: left // Float to collapse white-space for proper grid alignment
287
+
246
288
 
247
289
 
248
290
  // DISABLED STATE
@@ -257,7 +299,6 @@ select[readonly],
257
299
  textarea[readonly]
258
300
  cursor: not-allowed
259
301
  background-color: $inputDisabledBackground
260
- border-color: #ddd
261
302
 
262
303
  // Explicitly reset the colors here
263
304
  input[type="radio"][disabled],
@@ -302,19 +343,6 @@ select:focus:required:invalid
302
343
  border-top: 1px solid #e5e5e5
303
344
  +clearfix // Adding clearfix to allow for .pull-right button containers
304
345
 
305
- // For text that needs to appear as an input but should not be an input
306
- .uneditable-input
307
- white-space: nowrap
308
- overflow: hidden // prevent text from wrapping, but still cut it off like an input does
309
- cursor: not-allowed
310
- display: block
311
- background-color: $inputBackground
312
- border-color: #eee
313
- +box-shadow(inset 0 1px 2px rgba(0,0,0,.025))
314
-
315
- // Placeholder text gets special styles; can't be bundled together though for some reason
316
- +placeholder()
317
-
318
346
 
319
347
 
320
348
  // HELP TEXT
@@ -322,7 +350,7 @@ select:focus:required:invalid
322
350
 
323
351
  .help-block,
324
352
  .help-inline
325
- color: $gray // lighten the text some for contrast
353
+ color: lighten($textColor, 15%) // lighten the text some for contrast
326
354
 
327
355
 
328
356
  .help-block
@@ -341,38 +369,40 @@ select:focus:required:invalid
341
369
  // ------------
342
370
 
343
371
  // Allow us to put symbols and text within the input field for a cleaner look
344
- .input-prepend,
345
- .input-append
372
+ .input-append,
373
+ .input-prepend
346
374
  margin-bottom: 5px
375
+ font-size: 0
376
+ white-space: nowrap // Prevent span and input from separating
347
377
  input,
348
378
  select,
349
379
  .uneditable-input
350
380
  position: relative // placed here by default so that on :focus we can place the input above the .add-on for full border and box-shadow goodness
351
381
  margin-bottom: 0 // prevent bottom margin from screwing up alignment in stacked forms
352
382
  *margin-left: 0
353
- vertical-align: middle
383
+ font-size: $baseFontSize
384
+ vertical-align: top
354
385
  +border-radius(0 $inputBorderRadius $inputBorderRadius 0)
355
386
  // Make input on top when focused so blue border and shadow always show
356
387
  &:focus
357
388
  z-index: 2
358
- .uneditable-input
359
- border-left-color: #ccc
360
389
  .add-on
361
390
  display: inline-block
362
391
  width: auto
363
392
  height: $baseLineHeight
364
393
  min-width: 16px
365
394
  padding: 4px 5px
395
+ font-size: $baseFontSize
366
396
  font-weight: normal
367
397
  line-height: $baseLineHeight
368
398
  text-align: center
369
399
  text-shadow: 0 1px 0 $white
370
- vertical-align: middle
371
400
  background-color: $grayLighter
372
401
  border: 1px solid #ccc
373
402
  .add-on,
374
403
  .btn
375
404
  margin-left: -1px
405
+ vertical-align: top
376
406
  +border-radius(0)
377
407
  .active
378
408
  background-color: lighten($green, 30)
@@ -391,9 +421,6 @@ select:focus:required:invalid
391
421
  select,
392
422
  .uneditable-input
393
423
  +border-radius($inputBorderRadius 0 0 $inputBorderRadius)
394
- .uneditable-input
395
- border-right-color: #ccc
396
- border-left-color: #eee
397
424
  .add-on:last-child,
398
425
  .btn:last-child
399
426
  +border-radius(0 $inputBorderRadius $inputBorderRadius 0)
@@ -418,13 +445,26 @@ select:focus:required:invalid
418
445
  // SEARCH FORM
419
446
  // -----------
420
447
 
421
- .search-query
448
+ input.search-query
422
449
  padding-right: 14px
423
450
  padding-right: 4px \9
424
451
  padding-left: 14px
425
452
  padding-left: 4px \9 /* IE7-8 doesn't have border-radius, so don't indent the padding */
426
- margin-bottom: 0 // remove the default margin on all inputs
427
- +border-radius(14px)
453
+ margin-bottom: 0 // Remove the default margin on all inputs
454
+ +border-radius(15px)
455
+
456
+ // Allow for input prepend/append in search forms
457
+ .form-search .input-append .search-query,
458
+ .form-search .input-prepend .search-query
459
+ +border-radius(0) // Override due to specificity
460
+ .form-search .input-append .search-query
461
+ +border-radius(14px 0 0 14px)
462
+ .form-search .input-append .btn
463
+ +border-radius(0 14px 14px 0)
464
+ .form-search .input-prepend .search-query
465
+ +border-radius(0 14px 14px 0)
466
+ .form-search .input-prepend .btn
467
+ +border-radius(14px 0 0 14px)
428
468
 
429
469
 
430
470
 
@@ -447,12 +487,15 @@ select:focus:required:invalid
447
487
  display: inline-block
448
488
  +ie7-inline-block
449
489
  margin-bottom: 0
490
+ vertical-align: middle
450
491
  // Re-hide hidden elements due to specifity
451
492
  .hide
452
493
  display: none
453
494
 
454
495
  .form-search label,
455
- .form-inline label
496
+ .form-inline label,
497
+ .form-search .btn-group,
498
+ .form-inline .btn-group
456
499
  display: inline-block
457
500
 
458
501
  // Remove margin for input-prepend/-append
@@ -1,8 +1,19 @@
1
- // GRID SYSTEM
2
- // -----------
1
+ //
2
+ // Grid system
3
+ // --------------------------------------------------
4
+
3
5
 
4
6
  // Fixed (940px)
5
7
  +core-grid-generate($gridColumnWidth, $gridGutterWidth)
6
8
 
7
9
  // Fluid (940px)
8
10
  +fluid-grid-generate($fluidGridColumnWidth, $fluidGridGutterWidth)
11
+
12
+ // Reset utility classes due to specificity
13
+ [class*="span"].hide,
14
+ .row-fluid [class*="span"].hide
15
+ display: none
16
+
17
+ [class*="span"].pull-right,
18
+ .row-fluid [class*="span"].pull-right
19
+ float: right
@@ -1,5 +1,7 @@
1
- // HERO UNIT
2
- // ---------
1
+ //
2
+ // Hero unit
3
+ // --------------------------------------------------
4
+
3
5
 
4
6
  .hero-unit
5
7
  padding: 60px
@@ -1,5 +1,7 @@
1
- // LABELS & BADGES
2
- // ---------------
1
+ //
2
+ // Labels and badges
3
+ // --------------------------------------------------
4
+
3
5
 
4
6
  // Base classes
5
7
  .label,
@@ -75,3 +77,14 @@ a
75
77
  .label-inverse[href],
76
78
  .badge-inverse[href]
77
79
  background-color: darken($grayDark, 10%)
80
+
81
+ // Quick fix for labels/badges in buttons
82
+ .btn
83
+ .label,
84
+ .badge
85
+ position: relative
86
+ top: -1px
87
+ .btn-mini
88
+ .label,
89
+ .badge
90
+ top: 0
@@ -1,5 +1,6 @@
1
- // Fixed-width and fluid (with sidebar) layouts
2
- // --------------------------------------------
1
+ //
2
+ // Layouts
3
+ // --------------------------------------------------
3
4
 
4
5
 
5
6
  // Container (centered, fixed-width layouts)