bootstrap-sass-rails 2.0.2.2 → 2.0.3.0pre1

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 (79) hide show
  1. data/lib/bootstrap/sass/rails/version.rb +1 -1
  2. data/test/cases/usage_css_spec.rb +7 -4
  3. data/test/dummy/log/test.log +610 -0
  4. data/test/dummy/tmp/cache/assets/C29/E80/sprockets%2F8f076727207424919c7170c7157bbe37 +0 -0
  5. data/test/dummy/tmp/cache/assets/D04/3C0/sprockets%2F29d763bd40cc25622b1f04b876a5c3e3 +0 -0
  6. data/test/dummy/tmp/cache/assets/D3F/FA0/sprockets%2F22c8366fdbaaa2872b202dfe7376629f +0 -0
  7. data/test/dummy/tmp/cache/assets/D7C/3E0/sprockets%2F53c81ab87ec56a748428a59da9a5d5de +0 -0
  8. data/test/dummy/tmp/cache/assets/E3A/D90/sprockets%2Fce0dbefdb4416ebc42589ecdbf7d7857 +0 -0
  9. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_accordion.scssc +0 -0
  10. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_button-groups.scssc +0 -0
  11. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_buttons.scssc +0 -0
  12. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_close.scssc +0 -0
  13. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_code.scssc +0 -0
  14. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_component-animations.scssc +0 -0
  15. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_dropdowns.scssc +0 -0
  16. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_forms.scssc +0 -0
  17. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_labels-badges.scssc +0 -0
  18. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_layouts.scssc +0 -0
  19. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_mixins.scssc +0 -0
  20. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_modals.scssc +0 -0
  21. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_navbar.scssc +0 -0
  22. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_navs.scssc +0 -0
  23. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_progress-bars.scssc +0 -0
  24. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_reset.scssc +0 -0
  25. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_responsive-1200px-min.scssc +0 -0
  26. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_responsive-767px-max.scssc +0 -0
  27. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_responsive-768px-979px.scssc +0 -0
  28. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_responsive-navbar.scssc +0 -0
  29. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_responsive-utilities.scssc +0 -0
  30. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_responsive.scssc +0 -0
  31. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_sprites.scssc +0 -0
  32. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_tables.scssc +0 -0
  33. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_thumbnails.scssc +0 -0
  34. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_type.scssc +0 -0
  35. data/test/dummy/tmp/cache/sass/367107abe8cc7204b7df467455e0644864892d9f/_variables.scssc +0 -0
  36. data/test/dummy/tmp/cache/sass/766526f7d87ffdf0401dde0ec8d49f976470392d/bootstrap.css.scssc +0 -0
  37. data/vendor/assets/javascripts/twitter/bootstrap/alert.js +28 -32
  38. data/vendor/assets/javascripts/twitter/bootstrap/button.js +29 -33
  39. data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +27 -19
  40. data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +44 -25
  41. data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +18 -10
  42. data/vendor/assets/javascripts/twitter/bootstrap/modal.js +25 -17
  43. data/vendor/assets/javascripts/twitter/bootstrap/popover.js +13 -10
  44. data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +43 -17
  45. data/vendor/assets/javascripts/twitter/bootstrap/tab.js +12 -7
  46. data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +40 -35
  47. data/vendor/assets/javascripts/twitter/bootstrap/transition.js +30 -20
  48. data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +25 -11
  49. data/vendor/assets/stylesheets/twitter/bootstrap.css.scss +2 -3
  50. data/vendor/assets/stylesheets/twitter/bootstrap/_accordion.scss +5 -0
  51. data/vendor/assets/stylesheets/twitter/bootstrap/_button-groups.scss +55 -36
  52. data/vendor/assets/stylesheets/twitter/bootstrap/_buttons.scss +16 -11
  53. data/vendor/assets/stylesheets/twitter/bootstrap/_close.scss +12 -1
  54. data/vendor/assets/stylesheets/twitter/bootstrap/_code.scss +4 -4
  55. data/vendor/assets/stylesheets/twitter/bootstrap/_component-animations.scss +5 -5
  56. data/vendor/assets/stylesheets/twitter/bootstrap/_dropdowns.scss +15 -20
  57. data/vendor/assets/stylesheets/twitter/bootstrap/_forms.scss +57 -29
  58. data/vendor/assets/stylesheets/twitter/bootstrap/_labels-badges.scss +55 -0
  59. data/vendor/assets/stylesheets/twitter/bootstrap/_layouts.scss +1 -1
  60. data/vendor/assets/stylesheets/twitter/bootstrap/_mixins.scss +54 -36
  61. data/vendor/assets/stylesheets/twitter/bootstrap/_modals.scss +2 -2
  62. data/vendor/assets/stylesheets/twitter/bootstrap/_navbar.scss +64 -41
  63. data/vendor/assets/stylesheets/twitter/bootstrap/_navs.scss +36 -35
  64. data/vendor/assets/stylesheets/twitter/bootstrap/_progress-bars.scss +16 -8
  65. data/vendor/assets/stylesheets/twitter/bootstrap/_reset.scss +3 -3
  66. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-1200px-min.scss +26 -0
  67. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-767px-max.scss +150 -0
  68. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-768px-979px.scss +19 -0
  69. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-navbar.scss +146 -0
  70. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-utilities.scss +41 -0
  71. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive.scss +15 -338
  72. data/vendor/assets/stylesheets/twitter/bootstrap/_sprites.scss +25 -5
  73. data/vendor/assets/stylesheets/twitter/bootstrap/_tables.scss +22 -6
  74. data/vendor/assets/stylesheets/twitter/bootstrap/_thumbnails.scss +14 -2
  75. data/vendor/assets/stylesheets/twitter/bootstrap/_type.scss +7 -6
  76. data/vendor/assets/stylesheets/twitter/bootstrap/_variables.scss +10 -5
  77. metadata +30 -17
  78. data/vendor/assets/stylesheets/twitter/bootstrap/_badges.scss +0 -36
  79. data/vendor/assets/stylesheets/twitter/bootstrap/_labels.scss +0 -38
@@ -11,7 +11,7 @@
11
11
 
12
12
  // Fluid layouts (left aligned, with sidebar, min- & max-width content)
13
13
  .container-fluid {
14
- padding-left: $gridGutterWidth;
15
14
  padding-right: $gridGutterWidth;
15
+ padding-left: $gridGutterWidth;
16
16
  @include clearfix();
17
17
  }
@@ -70,11 +70,11 @@
70
70
 
71
71
  // Sizing shortcuts
72
72
  // -------------------------
73
- @mixin size($height: 5px, $width: 5px) {
73
+ @mixin size($height, $width) {
74
74
  width: $width;
75
75
  height: $height;
76
76
  }
77
- @mixin square($size: 5px) {
77
+ @mixin square($size) {
78
78
  @include size($size, $size);
79
79
  }
80
80
 
@@ -93,14 +93,16 @@
93
93
  // -------------------------
94
94
  // Requires inline-block or block for proper styling
95
95
  @mixin text-overflow() {
96
- overflow: hidden;
97
- text-overflow: ellipsis;
98
- white-space: nowrap;
96
+ font: 0/0 a;
97
+ color: transparent;
98
+ text-shadow: none;
99
+ background-color: transparent;
100
+ border: 0;
99
101
  }
100
102
 
101
- // New image replacement
103
+ // CSS image replacement
102
104
  // -------------------------
103
- // Source: http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/
105
+ // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
104
106
  @mixin hide-text {
105
107
  overflow: hidden;
106
108
  text-indent: 100%;
@@ -112,13 +114,13 @@
112
114
  // --------------------------------------------------
113
115
 
114
116
  @mixin font-family-serif() {
115
- font-family: Georgia, "Times New Roman", Times, serif;
117
+ font-family: $serifFontFamily;
116
118
  }
117
119
  @mixin font-family-sans-serif() {
118
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
120
+ font-family: $sansFontFamily;
119
121
  }
120
122
  @mixin font-family-monospace() {
121
- font-family: Menlo, Monaco, "Courier New", monospace;
123
+ font-family: $monoFontFamily;
122
124
  }
123
125
  @mixin font-shorthand($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
124
126
  font-size: $size;
@@ -147,9 +149,9 @@
147
149
  @mixin input-block-level {
148
150
  display: block;
149
151
  width: 100%;
150
- min-height: 28px; /* Make inputs at least the height of their button counterpart */
151
- /* Makes inputs behave like true block-level elements */
152
- @include box-sizing(border-box)
152
+ min-height: 28px; // Make inputs at least the height of their button counterpart
153
+ @include box-sizing(border-box); // Makes inputs behave like true block-level elements
154
+
153
155
  }
154
156
 
155
157
 
@@ -187,14 +189,14 @@
187
189
  // --------------------------------------------------
188
190
 
189
191
  // Border Radius
190
- @mixin border-radius($radius: 5px) {
192
+ @mixin border-radius($radius) {
191
193
  -webkit-border-radius: $radius;
192
194
  -moz-border-radius: $radius;
193
195
  border-radius: $radius;
194
196
  }
195
197
 
196
198
  // Drop shadows
197
- @mixin box-shadow($shadow: 0 1px 3px rgba(0,0,0,.25)) {
199
+ @mixin box-shadow($shadow) {
198
200
  -webkit-box-shadow: $shadow;
199
201
  -moz-box-shadow: $shadow;
200
202
  box-shadow: $shadow;
@@ -224,21 +226,21 @@
224
226
  -o-transform: scale($ratio);
225
227
  transform: scale($ratio);
226
228
  }
227
- @mixin translate($x: 0, $y: 0) {
229
+ @mixin translate($x, $y) {
228
230
  -webkit-transform: translate($x, $y);
229
231
  -moz-transform: translate($x, $y);
230
232
  -ms-transform: translate($x, $y);
231
233
  -o-transform: translate($x, $y);
232
234
  transform: translate($x, $y);
233
235
  }
234
- @mixin skew($x: 0, $y: 0) {
236
+ @mixin skew($x, $y) {
235
237
  -webkit-transform: skew($x, $y);
236
238
  -moz-transform: skew($x, $y);
237
239
  -ms-transform: skew($x, $y);
238
240
  -o-transform: skew($x, $y);
239
241
  transform: skew($x, $y);
240
242
  }
241
- @mixin translate3d($x: 0, $y: 0, $z: 0) {
243
+ @mixin translate3d($x, $y, $z) {
242
244
  -webkit-transform: translate($x, $y, $z);
243
245
  -moz-transform: translate($x, $y, $z);
244
246
  -ms-transform: translate($x, $y, $z);
@@ -246,6 +248,17 @@
246
248
  transform: translate($x, $y, $z);
247
249
  }
248
250
 
251
+ // Backface visibility
252
+ // Prevent browsers from flickering when using CSS 3D transforms.
253
+ // Default value is `visible`, but can be changed to `hidden
254
+ // See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples
255
+ @mixin backface-visibility($visibility){
256
+ -webkit-backface-visibility: $visibility;
257
+ -moz-backface-visibility: $visibility;
258
+ -ms-backface-visibility: $visibility;
259
+ backface-visibility: $visibility;
260
+ }
261
+
249
262
  // Background clipping
250
263
  // Heads up: FF 3.6 and under need "padding" instead of "padding-box"
251
264
  @mixin background-clip($clip) {
@@ -276,18 +289,19 @@
276
289
  @mixin user-select($select) {
277
290
  -webkit-user-select: $select;
278
291
  -moz-user-select: $select;
292
+ -ms-user-select: $select;
279
293
  -o-user-select: $select;
280
294
  user-select: $select;
281
295
  }
282
296
 
283
297
  // Resize anything
284
- @mixin resizable($direction: both) {
298
+ @mixin resizable($direction) {
285
299
  resize: $direction; // Options: horizontal, vertical, both
286
300
  overflow: auto; // Safari fix
287
301
  }
288
302
 
289
303
  // CSS3 Content Columns
290
- @mixin content-columns($columnCount, $columnGap: $gridColumnGutter) {
304
+ @mixin content-columns($columnCount, $columnGap: $gridGutterWidth) {
291
305
  -webkit-column-count: $columnCount;
292
306
  -moz-column-count: $columnCount;
293
307
  column-count: $columnCount;
@@ -297,7 +311,7 @@
297
311
  }
298
312
 
299
313
  // Opacity
300
- @mixin opacity($opacity: 100) {
314
+ @mixin opacity($opacity) {
301
315
  opacity: $opacity / 100;
302
316
  filter: alpha(opacity=$opacity);
303
317
  }
@@ -398,18 +412,17 @@
398
412
  // -------------------------
399
413
  // Dividers (basically an hr) within dropdowns and nav lists
400
414
  @mixin nav-divider() {
401
- height: 1px;
402
- margin: (($baseLineHeight / 2) - 1) 1px; // 8px 1px
403
- overflow: hidden;
404
- background-color: #e5e5e5;
405
- border-bottom: 1px solid $white;
406
-
407
415
  // IE7 needs a set width since we gave a height. Restricting just
408
416
  // to IE7 to keep the 1px left/right space in other browsers.
409
417
  // It is unclear where IE is getting the extra space that we need
410
418
  // to negative-margin away, but so it goes.
411
419
  *width: 100%;
420
+ height: 1px;
421
+ margin: (($baseLineHeight / 2) - 1) 1px; // 8px 1px
412
422
  *margin: -5px 0 5px;
423
+ overflow: hidden;
424
+ background-color: #e5e5e5;
425
+ border-bottom: 1px solid $white;
413
426
  }
414
427
 
415
428
  // Button backgrounds
@@ -417,17 +430,19 @@
417
430
  @mixin buttonBackground($startColor, $endColor) {
418
431
  // gradientBar will set the background to a pleasing blend of these, to support IE<=9
419
432
  @include gradientBar($startColor, $endColor);
433
+ *background-color: $endColor; /* Darken IE7 buttons by default so they stand out more given they won't have borders */
420
434
  @include reset-filter();
421
435
 
422
436
  // in these cases the gradient won't cover the background, so we override
423
437
  &:hover, &:active, &.active, &.disabled, &[disabled] {
424
438
  background-color: $endColor;
439
+ *background-color: darken($endColor, 5%);
425
440
  }
426
441
 
427
442
  // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
428
443
  &:active,
429
444
  &.active {
430
- background-color: darken($endColor, 10%) e("\9");
445
+ background-color: darken($endColor, 10%) \9; /* IE6-9 */
431
446
  }
432
447
  }
433
448
 
@@ -480,8 +495,8 @@
480
495
 
481
496
  // Centered container element
482
497
  @mixin container-fixed() {
483
- margin-left: auto;
484
498
  margin-right: auto;
499
+ margin-left: auto;
485
500
  @include clearfix();
486
501
  }
487
502
 
@@ -498,15 +513,15 @@
498
513
  margin-left: $gridGutterWidth * -1;
499
514
  @include clearfix();
500
515
  }
501
- @mixin makeColumn($columns: 1) {
516
+ @mixin makeColumn($columns: 1, $offSet: 0) {
502
517
  float: left;
503
- margin-left: $gridGutterWidth;
518
+ margin-left: ($gridColumnWidth * $offset) + ($gridGutterWidth * ($offset - 1)) + ($gridGutterWidth * 2);
504
519
  width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
505
520
  }
506
521
 
507
522
  // The Grid
508
523
  @mixin grid-core-offset($gridColumnWidth, $gridGutterWidth, $columns) {
509
- margin-left: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1)) + ($gridGutterWidth * 2);
524
+ margin-left: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns + 1));
510
525
  }
511
526
 
512
527
  @mixin grid-core-span($gridColumnWidth, $gridGutterWidth, $columns) {
@@ -536,25 +551,28 @@
536
551
  }
537
552
  }
538
553
 
539
- @mixin grid-fluid-span($gridColumnWidth, $gridGutterWidth, $columns) {
554
+ @mixin grid-fluid-span($fluidGridColumnWidth, $fluidGridGutterWidth, $columns) {
540
555
  width: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1));
556
+ *width: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1)) - (.5 / ($gridRowWidth/1px) * 100%);
541
557
  }
542
558
 
543
559
  @mixin grid-fluid($fluidGridColumnWidth, $fluidGridGutterWidth) {
544
560
  .row-fluid {
545
561
  width: 100%;
546
562
  @include clearfix();
547
- > [class*="span"] {
563
+ [class*="span"] {
564
+ @include input-block-level();
548
565
  float: left;
549
566
  margin-left: $fluidGridGutterWidth;
567
+ *margin-left: $fluidGridGutterWidth - (.5 / ($gridRowWidth/1px) * 100%);
550
568
  }
551
- > [class*="span"]:first-child {
569
+ [class*="span"]:first-child {
552
570
  margin-left: 0;
553
571
  }
554
572
 
555
573
  // generate .spanX
556
574
  @for $index from 1 through $gridColumns {
557
- > .span#{$index} { @include grid-fluid-span($gridColumnWidth, $gridGutterWidth, $index); }
575
+ .span#{$index} { @include grid-fluid-span($fluidGridColumnWidth, $fluidGridGutterWidth, $index); }
558
576
  }
559
577
  }
560
578
  }
@@ -44,7 +44,7 @@
44
44
  @include box-shadow(0 3px 7px rgba(0,0,0,0.3));
45
45
  @include background-clip(padding-box);
46
46
  &.fade {
47
- @include transition(e('opacity .3s linear, top .3s ease-out'));
47
+ @include transition('opacity .3s linear, top .3s ease-out');
48
48
  top: -25%;
49
49
  }
50
50
  &.fade.in { top: 50%; }
@@ -56,7 +56,7 @@
56
56
  .close { margin-top: 2px; }
57
57
  }
58
58
 
59
- // Body (where all modal content resises)
59
+ // Body (where all modal content resides)
60
60
  .modal-body {
61
61
  overflow-y: auto;
62
62
  max-height: 400px;
@@ -16,12 +16,12 @@
16
16
 
17
17
  // Gradient is applied to it's own element because overflow visible is not honored by IE when filter is present
18
18
  .navbar-inner {
19
+ min-height: $navbarHeight;
19
20
  padding-left: 20px;
20
21
  padding-right: 20px;
21
22
  @include gradient-vertical($navbarBackgroundHighlight, $navbarBackground);
22
23
  @include border-radius(4px);
23
- $shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);
24
- @include box-shadow($shadow);
24
+ @include box-shadow("0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1)");
25
25
  }
26
26
 
27
27
  // Set width to auto for default container
@@ -30,28 +30,6 @@
30
30
  width: auto;
31
31
  }
32
32
 
33
- // Navbar button for toggling navbar items in responsive layouts
34
- .btn-navbar {
35
- display: none;
36
- float: right;
37
- padding: 7px 10px;
38
- margin-left: 5px;
39
- margin-right: 5px;
40
- @include buttonBackground($navbarBackgroundHighlight, $navbarBackground);
41
- $shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
42
- @include box-shadow($shadow);
43
- }
44
- .btn-navbar .icon-bar {
45
- display: block;
46
- width: 18px;
47
- height: 2px;
48
- background-color: #f5f5f5;
49
- @include border-radius(1px);
50
- @include box-shadow(0 1px 0 rgba(0,0,0,.25));
51
- }
52
- .btn-navbar .icon-bar + .icon-bar {
53
- margin-top: 3px;
54
- }
55
33
  // Override the default collapsed state
56
34
  .nav-collapse.collapse {
57
35
  height: auto;
@@ -69,25 +47,34 @@
69
47
  .brand {
70
48
  float: left;
71
49
  display: block;
72
- padding: 8px 20px 12px;
50
+ // Vertically center the text given $navbarHeight
51
+ $elementHeight: 20px;
52
+ padding: (($navbarHeight - $elementHeight) / 2 - 2) 20px (($navbarHeight - $elementHeight) / 2 + 2);
73
53
  margin-left: -20px; // negative indent to left-align the text down the page
74
54
  font-size: 20px;
75
55
  font-weight: 200;
76
56
  line-height: 1;
77
- color: $white;
57
+ color: $navbarBrandColor;
78
58
  }
79
59
  // Plain text in topbar
80
60
  .navbar-text {
81
61
  margin-bottom: 0;
82
62
  line-height: $navbarHeight;
83
63
  }
64
+ // Janky solution for now to account for links outside the .nav
65
+ .navbar-link {
66
+ color: $navbarLinkColor;
67
+ &:hover {
68
+ color: $navbarLinkColorHover;
69
+ }
70
+ }
84
71
  // Buttons in navbar
85
72
  .btn,
86
73
  .btn-group {
87
74
  @include navbarVerticalAlign(30px); // Vertically center in navbar
88
75
  }
89
76
  .btn-group .btn {
90
- margin-top: 0; // then undo the margin here so we don't accidentally double it
77
+ margin: 0; // then undo the margin here so we don't accidentally double it
91
78
  }
92
79
  }
93
80
 
@@ -133,8 +120,7 @@
133
120
  color: $white;
134
121
  background-color: $navbarSearchBackground;
135
122
  border: 1px solit $navbarSearchBorder;
136
- $shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.15);
137
- @include box-shadow($shadow);
123
+ @include box-shadow("inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.15)");
138
124
  @include transition(none);
139
125
 
140
126
  // Placeholder text gets special styles; can't be a grouped selector
@@ -217,12 +203,29 @@
217
203
  // Links
218
204
  .navbar .nav > li > a {
219
205
  float: none;
220
- padding: 10px 10px 11px;
206
+ // Vertically center the text given @navbarHeight
207
+ $elementHeight: 20px;
208
+ padding: (($navbarHeight - $elementHeight) / 2 - 1) 10px (($navbarHeight - $elementHeight) / 2 + 1);
221
209
  line-height: 19px;
222
210
  color: $navbarLinkColor;
223
211
  text-decoration: none;
224
212
  text-shadow: 0 -1px 0 rgba(0,0,0,.25);
225
213
  }
214
+ // Buttons
215
+ .navbar .btn {
216
+ display: inline-block;
217
+ padding: 4px 10px 4px;
218
+ // Vertically center the button given @navbarHeight
219
+ $elementHeight: 28px;
220
+ margin: (($navbarHeight - $elementHeight) / 2 - 1) 5px (($navbarHeight - $elementHeight) / 2);
221
+ line-height: $baseLineHeight;
222
+ }
223
+ .navbar .btn-group {
224
+ margin: 0;
225
+ // Vertically center the button given @navbarHeight
226
+ $elementHeight: 28px;
227
+ padding: (($navbarHeight - $elementHeight) / 2 - 1) 5px (($navbarHeight - $elementHeight) / 2);
228
+ }
226
229
  // Hover
227
230
  .navbar .nav > li > a:hover {
228
231
  background-color: $navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active
@@ -254,6 +257,28 @@
254
257
  margin-right: 0;
255
258
  }
256
259
 
260
+ // Navbar button for toggling navbar items in responsive layouts
261
+ // These definitions need to come after '.navbar .btn'
262
+ .navbar .btn-navbar {
263
+ display: none;
264
+ float: right;
265
+ padding: 7px 10px;
266
+ margin-left: 5px;
267
+ margin-right: 5px;
268
+ @include buttonBackground($navbarBackgroundHighlight, $navbarBackground);
269
+ @include box-shadow("inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075)");
270
+ }
271
+ .navbar .btn-navbar .icon-bar {
272
+ display: block;
273
+ width: 18px;
274
+ height: 2px;
275
+ background-color: #f5f5f5;
276
+ @include border-radius(1px);
277
+ @include box-shadow(0 1px 0 rgba(0,0,0,.25));
278
+ }
279
+ .btn-navbar .icon-bar + .icon-bar {
280
+ margin-top: 3px;
281
+ }
257
282
 
258
283
 
259
284
  // Dropdown menus
@@ -261,8 +286,6 @@
261
286
 
262
287
  // Menu position and menu carets
263
288
  .navbar .dropdown-menu {
264
- margin-top: 1px;
265
- @include border-radius(4px);
266
289
  &:before {
267
290
  content: '';
268
291
  display: inline-block;
@@ -303,31 +326,31 @@
303
326
  }
304
327
 
305
328
  // Dropdown toggle caret
306
- .navbar .nav .dropdown-toggle .caret,
307
- .navbar .nav .open.dropdown .caret {
329
+ .navbar .nav li.dropdown .dropdown-toggle .caret,
330
+ .navbar .nav li.dropdown.open .caret {
308
331
  border-top-color: $white;
309
332
  border-bottom-color: $white;
310
333
  }
311
- .navbar .nav .active .caret {
334
+ .navbar .nav li.dropdown.active .caret {
312
335
  @include opacity(100);
313
336
  }
314
337
 
315
338
  // Remove background color from open dropdown
316
- .navbar .nav .open > .dropdown-toggle,
317
- .navbar .nav .active > .dropdown-toggle,
318
- .navbar .nav .open.active > .dropdown-toggle {
339
+ .navbar .nav li.dropdown.open > .dropdown-toggle,
340
+ .navbar .nav li.dropdown.active > .dropdown-toggle,
341
+ .navbar .nav li.dropdown.open.active > .dropdown-toggle {
319
342
  background-color: transparent;
320
343
  }
321
344
 
322
345
  // Dropdown link on hover
323
- .navbar .nav .active > .dropdown-toggle:hover {
346
+ .navbar .nav li.dropdown.active > .dropdown-toggle:hover {
324
347
  color: $white;
325
348
  }
326
349
 
327
350
  // Right aligned menus need alt position
328
351
  // TODO: rejigger this at some point to simplify the selectors
329
- .navbar .nav.pull-right .dropdown-menu,
330
- .navbar .nav .dropdown-menu.pull-right {
352
+ .navbar .pull-right .dropdown-menu,
353
+ .navbar .dropdown-menu.pull-right {
331
354
  left: auto;
332
355
  right: 0;
333
356
  &:before {