twitter-bootstrap-rails 2.1.7 → 2.2.8

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

Potentially problematic release.


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

Files changed (117) hide show
  1. data/README.md +428 -21
  2. data/Rakefile +15 -3
  3. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  4. data/app/assets/fonts/fontawesome-webfont.svg +399 -0
  5. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  6. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  7. data/{vendor → app}/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +12 -1
  8. data/{vendor → app}/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +12 -1
  9. data/{vendor → app}/assets/javascripts/twitter/bootstrap/bootstrap-button.js +12 -1
  10. data/{vendor → app}/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +42 -11
  11. data/{vendor → app}/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +18 -7
  12. data/{vendor → app}/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +32 -11
  13. data/{vendor → app}/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +25 -12
  14. data/{vendor → app}/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +17 -6
  15. data/{vendor → app}/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +13 -2
  16. data/{vendor → app}/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +12 -1
  17. data/{vendor → app}/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +115 -30
  18. data/{vendor → app}/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +1 -1
  19. data/{vendor → app}/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +38 -13
  20. data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +890 -0
  21. data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +787 -0
  22. data/{vendor → app}/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +2 -2
  23. data/app/helpers/badge_label_helper.rb +16 -0
  24. data/app/helpers/bootstrap_flash_helper.rb +22 -16
  25. data/app/helpers/glyph_helper.rb +7 -2
  26. data/app/helpers/modal_helper.rb +29 -16
  27. data/app/helpers/navbar_helper.rb +194 -0
  28. data/app/helpers/twitter_breadcrumbs_helper.rb +7 -2
  29. data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +2 -2
  30. data/lib/generators/bootstrap/install/install_generator.rb +19 -6
  31. data/lib/generators/bootstrap/install/templates/bootstrap.coffee +2 -3
  32. data/lib/generators/bootstrap/install/templates/bootstrap.js +2 -3
  33. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +8 -10
  34. data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +18 -0
  35. data/lib/generators/bootstrap/layout/templates/layout.html.erb +10 -12
  36. data/lib/generators/bootstrap/layout/templates/layout.html.haml +8 -11
  37. data/lib/generators/bootstrap/layout/templates/layout.html.slim +10 -11
  38. data/lib/generators/bootstrap/themed/templates/edit.html.erb +1 -2
  39. data/lib/generators/bootstrap/themed/templates/edit.html.haml +1 -1
  40. data/lib/generators/bootstrap/themed/templates/edit.html.slim +1 -1
  41. data/lib/generators/bootstrap/themed/templates/index.html.erb +1 -1
  42. data/lib/generators/bootstrap/themed/templates/index.html.haml +1 -1
  43. data/lib/generators/bootstrap/themed/templates/index.html.slim +1 -1
  44. data/lib/generators/bootstrap/themed/templates/new.html.erb +1 -2
  45. data/lib/generators/bootstrap/themed/templates/new.html.haml +1 -1
  46. data/lib/generators/bootstrap/themed/templates/new.html.slim +1 -1
  47. data/lib/generators/bootstrap/themed/templates/show.html.erb +1 -1
  48. data/lib/generators/bootstrap/themed/templates/show.html.haml +1 -1
  49. data/lib/generators/bootstrap/themed/templates/show.html.slim +1 -1
  50. data/lib/generators/bootstrap/themed/themed_generator.rb +2 -2
  51. data/lib/twitter/bootstrap/rails/engine.rb +3 -0
  52. data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +14 -2
  53. data/lib/twitter/bootstrap/rails/version.rb +2 -2
  54. data/lib/twitter-bootstrap-rails.rb +4 -4
  55. data/spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb +22 -0
  56. data/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb +62 -0
  57. data/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +362 -0
  58. data/spec/lib/twitter_bootstrap_rails/uri_state_spec.rb +47 -0
  59. data/spec/spec_helper.rb +11 -0
  60. data/test/lib/breadcrumbs_test.rb +75 -0
  61. data/test/test_helper.rb +11 -0
  62. data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +316 -294
  63. data/vendor/static-source/fontawesome.less +8 -6
  64. data/vendor/static-source/sprites.less +3 -2
  65. data/vendor/toolkit/fontawesome/bootstrap.less +84 -0
  66. data/vendor/toolkit/fontawesome/core.less +129 -0
  67. data/vendor/toolkit/fontawesome/extras.less +93 -0
  68. data/vendor/toolkit/fontawesome/font-awesome-ie7.less +1953 -0
  69. data/vendor/toolkit/fontawesome/font-awesome.less +33 -0
  70. data/vendor/toolkit/fontawesome/icons.less +381 -0
  71. data/vendor/toolkit/fontawesome/mixins.less +48 -0
  72. data/vendor/toolkit/fontawesome/path.less +14 -0
  73. data/vendor/toolkit/fontawesome/variables.less +735 -0
  74. data/vendor/toolkit/twitter/bootstrap/alerts.less +14 -0
  75. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +4 -4
  76. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +6 -6
  77. data/vendor/toolkit/twitter/bootstrap/button-groups.less +31 -44
  78. data/vendor/toolkit/twitter/bootstrap/buttons.less +13 -17
  79. data/vendor/toolkit/twitter/bootstrap/carousel.less +48 -21
  80. data/vendor/toolkit/twitter/bootstrap/close.less +2 -1
  81. data/vendor/toolkit/twitter/bootstrap/code.less +3 -0
  82. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +32 -21
  83. data/vendor/toolkit/twitter/bootstrap/forms.less +17 -10
  84. data/vendor/toolkit/twitter/bootstrap/labels-badges.less +12 -2
  85. data/vendor/toolkit/twitter/bootstrap/media.less +2 -2
  86. data/vendor/toolkit/twitter/bootstrap/mixins.less +25 -9
  87. data/vendor/toolkit/twitter/bootstrap/modals.less +4 -3
  88. data/vendor/toolkit/twitter/bootstrap/navbar.less +35 -13
  89. data/vendor/toolkit/twitter/bootstrap/navs.less +45 -21
  90. data/vendor/toolkit/twitter/bootstrap/pager.less +3 -1
  91. data/vendor/toolkit/twitter/bootstrap/pagination.less +3 -1
  92. data/vendor/toolkit/twitter/bootstrap/popovers.less +55 -39
  93. data/vendor/toolkit/twitter/bootstrap/reset.less +82 -4
  94. data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +2 -2
  95. data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +6 -2
  96. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +16 -0
  97. data/vendor/toolkit/twitter/bootstrap/responsive.less +1 -1
  98. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +2 -1
  99. data/vendor/toolkit/twitter/bootstrap/sprites.less +9 -5
  100. data/vendor/toolkit/twitter/bootstrap/tables.less +54 -46
  101. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +3 -2
  102. data/vendor/toolkit/twitter/bootstrap/tooltip.less +6 -6
  103. data/vendor/toolkit/twitter/bootstrap/type.less +44 -24
  104. data/vendor/toolkit/twitter/bootstrap/variables.less +3 -3
  105. metadata +130 -44
  106. data/lib/generators/bootstrap/partial/templates/_navbar.html.erb +0 -13
  107. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  108. data/vendor/assets/fonts/fontawesome-webfont.svg +0 -255
  109. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  110. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  111. data/vendor/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +0 -218
  112. data/vendor/toolkit/font-awesome-ie7.less +0 -245
  113. data/vendor/toolkit/fontawesome.less +0 -327
  114. /data/{vendor → app}/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  115. /data/{vendor → app}/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  116. /data/{vendor → app}/assets/javascripts/twitter/bootstrap.js +0 -0
  117. /data/{vendor → app}/assets/javascripts/twitter/bootstrap_ujs.js +0 -0
@@ -163,7 +163,7 @@
163
163
  // Mixin for form field states
164
164
  .formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) {
165
165
  // Set the text color
166
- > label,
166
+ .control-label,
167
167
  .help-block,
168
168
  .help-inline {
169
169
  color: @textColor;
@@ -268,6 +268,12 @@
268
268
  -o-transition-delay: @transition-delay;
269
269
  transition-delay: @transition-delay;
270
270
  }
271
+ .transition-duration(@transition-duration) {
272
+ -webkit-transition-duration: @transition-duration;
273
+ -moz-transition-duration: @transition-duration;
274
+ -o-transition-duration: @transition-duration;
275
+ transition-duration: @transition-duration;
276
+ }
271
277
 
272
278
  // Transformations
273
279
  .rotate(@degrees) {
@@ -437,6 +443,17 @@
437
443
  background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10
438
444
  background-image: linear-gradient(@deg, @startColor, @endColor); // Standard, IE10
439
445
  }
446
+ .horizontal-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
447
+ background-color: mix(@midColor, @endColor, 80%);
448
+ background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));
449
+ background-image: -webkit-linear-gradient(left, @startColor, @midColor @colorStop, @endColor);
450
+ background-image: -moz-linear-gradient(left, @startColor, @midColor @colorStop, @endColor);
451
+ background-image: -o-linear-gradient(left, @startColor, @midColor @colorStop, @endColor);
452
+ background-image: linear-gradient(to right, @startColor, @midColor @colorStop, @endColor);
453
+ background-repeat: no-repeat;
454
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down, gets no color-stop at all for proper fallback
455
+ }
456
+
440
457
  .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
441
458
  background-color: mix(@midColor, @endColor, 80%);
442
459
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));
@@ -500,7 +517,7 @@
500
517
  .reset-filter();
501
518
 
502
519
  // in these cases the gradient won't cover the background, so we override
503
- &:hover, &:active, &.active, &.disabled, &[disabled] {
520
+ &:hover, &:focus, &:active, &.active, &.disabled, &[disabled] {
504
521
  color: @textColor;
505
522
  background-color: @endColor;
506
523
  *background-color: darken(@endColor, 5%);
@@ -558,13 +575,13 @@
558
575
  .core (@gridColumnWidth, @gridGutterWidth) {
559
576
 
560
577
  .spanX (@index) when (@index > 0) {
561
- (~".span@{index}") { .span(@index); }
578
+ .span@{index} { .span(@index); }
562
579
  .spanX(@index - 1);
563
580
  }
564
581
  .spanX (0) {}
565
582
 
566
583
  .offsetX (@index) when (@index > 0) {
567
- (~".offset@{index}") { .offset(@index); }
584
+ .offset@{index} { .offset(@index); }
568
585
  .offsetX(@index - 1);
569
586
  }
570
587
  .offsetX (0) {}
@@ -603,14 +620,14 @@
603
620
  .fluid (@fluidGridColumnWidth, @fluidGridGutterWidth) {
604
621
 
605
622
  .spanX (@index) when (@index > 0) {
606
- (~".span@{index}") { .span(@index); }
623
+ .span@{index} { .span(@index); }
607
624
  .spanX(@index - 1);
608
625
  }
609
626
  .spanX (0) {}
610
627
 
611
628
  .offsetX (@index) when (@index > 0) {
612
- (~'.offset@{index}') { .offset(@index); }
613
- (~'.offset@{index}:first-child') { .offsetFirstChild(@index); }
629
+ .offset@{index} { .offset(@index); }
630
+ .offset@{index}:first-child { .offsetFirstChild(@index); }
614
631
  .offsetX(@index - 1);
615
632
  }
616
633
  .offsetX (0) {}
@@ -658,7 +675,7 @@
658
675
  .input(@gridColumnWidth, @gridGutterWidth) {
659
676
 
660
677
  .spanX (@index) when (@index > 0) {
661
- (~"input.span@{index}, textarea.span@{index}, .uneditable-input.span@{index}") { .span(@index); }
678
+ input.span@{index}, textarea.span@{index}, .uneditable-input.span@{index} { .span(@index); }
662
679
  .spanX(@index - 1);
663
680
  }
664
681
  .spanX (0) {}
@@ -682,5 +699,4 @@
682
699
  .spanX (@gridColumns);
683
700
 
684
701
  }
685
-
686
702
  }
@@ -23,11 +23,11 @@
23
23
  // Base modal
24
24
  .modal {
25
25
  position: fixed;
26
- top: 50%;
26
+ top: 10%;
27
27
  left: 50%;
28
28
  z-index: @zindexModal;
29
29
  width: 560px;
30
- margin: -250px 0 0 -280px;
30
+ margin-left: -280px;
31
31
  background-color: @white;
32
32
  border: 1px solid #999;
33
33
  border: 1px solid rgba(0,0,0,.3);
@@ -42,7 +42,7 @@
42
42
  .transition(e('opacity .3s linear, top .3s ease-out'));
43
43
  top: -25%;
44
44
  }
45
- &.fade.in { top: 50%; }
45
+ &.fade.in { top: 10%; }
46
46
  }
47
47
  .modal-header {
48
48
  padding: 9px 15px;
@@ -58,6 +58,7 @@
58
58
 
59
59
  // Body (where all modal content resides)
60
60
  .modal-body {
61
+ position: relative;
61
62
  overflow-y: auto;
62
63
  max-height: 400px;
63
64
  padding: 15px;
@@ -10,7 +10,6 @@
10
10
  .navbar {
11
11
  overflow: visible;
12
12
  margin-bottom: @baseLineHeight;
13
- color: @navbarText;
14
13
 
15
14
  // Fix for IE7's bad z-indexing so dropdowns don't appear below content that follows the navbar
16
15
  *position: relative;
@@ -57,7 +56,8 @@
57
56
  font-weight: 200;
58
57
  color: @navbarBrandColor;
59
58
  text-shadow: 0 1px 0 @navbarBackgroundHighlight;
60
- &:hover {
59
+ &:hover,
60
+ &:focus {
61
61
  text-decoration: none;
62
62
  }
63
63
  }
@@ -67,13 +67,15 @@
67
67
  .navbar-text {
68
68
  margin-bottom: 0;
69
69
  line-height: @navbarHeight;
70
+ color: @navbarText;
70
71
  }
71
72
 
72
73
  // Janky solution for now to account for links outside the .nav
73
74
  // -------------------------
74
75
  .navbar-link {
75
76
  color: @navbarLinkColor;
76
- &:hover {
77
+ &:hover,
78
+ &:focus {
77
79
  color: @navbarLinkColorHover;
78
80
  }
79
81
  }
@@ -95,7 +97,9 @@
95
97
  }
96
98
  .navbar .btn-group .btn,
97
99
  .navbar .input-prepend .btn,
98
- .navbar .input-append .btn {
100
+ .navbar .input-append .btn,
101
+ .navbar .input-prepend .btn-group,
102
+ .navbar .input-append .btn-group {
99
103
  margin-top: 0; // then undo the margin here so we don't accidentally double it
100
104
  }
101
105
 
@@ -123,7 +127,7 @@
123
127
  }
124
128
  .input-append,
125
129
  .input-prepend {
126
- margin-top: 6px;
130
+ margin-top: 5px;
127
131
  white-space: nowrap; // preven two items from separating within a .navbar-form that has .pull-left
128
132
  input {
129
133
  margin-top: 0; // remove the margin on top since it's on the parent
@@ -247,10 +251,10 @@
247
251
  margin-top: 8px;
248
252
  }
249
253
 
250
- // Hover
254
+ // Hover/focus
251
255
  .navbar .nav > li > a:focus,
252
256
  .navbar .nav > li > a:hover {
253
- background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active
257
+ background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover/:focus from .active
254
258
  color: @navbarLinkColorHover;
255
259
  text-decoration: none;
256
260
  }
@@ -334,6 +338,13 @@
334
338
  }
335
339
  }
336
340
 
341
+ // Caret should match text color on hover/focus
342
+ .navbar .nav li.dropdown > a:hover .caret,
343
+ .navbar .nav li.dropdown > a:focus .caret {
344
+ border-top-color: @navbarLinkColorHover;
345
+ border-bottom-color: @navbarLinkColorHover;
346
+ }
347
+
337
348
  // Remove background color from open dropdown
338
349
  .navbar .nav li.dropdown.open > .dropdown-toggle,
339
350
  .navbar .nav li.dropdown.active > .dropdown-toggle,
@@ -379,7 +390,6 @@
379
390
  // -------------------------
380
391
 
381
392
  .navbar-inverse {
382
- color: @navbarInverseText;
383
393
 
384
394
  .navbar-inner {
385
395
  #gradient > .vertical(@navbarInverseBackgroundHighlight, @navbarInverseBackground);
@@ -390,11 +400,20 @@
390
400
  .nav > li > a {
391
401
  color: @navbarInverseLinkColor;
392
402
  text-shadow: 0 -1px 0 rgba(0,0,0,.25);
393
- &:hover {
403
+ &:hover,
404
+ &:focus {
394
405
  color: @navbarInverseLinkColorHover;
395
406
  }
396
407
  }
397
408
 
409
+ .brand {
410
+ color: @navbarInverseBrandColor;
411
+ }
412
+
413
+ .navbar-text {
414
+ color: @navbarInverseText;
415
+ }
416
+
398
417
  .nav > li > a:focus,
399
418
  .nav > li > a:hover {
400
419
  background-color: @navbarInverseLinkBackgroundHover;
@@ -411,7 +430,8 @@
411
430
  // Inline text links
412
431
  .navbar-link {
413
432
  color: @navbarInverseLinkColor;
414
- &:hover {
433
+ &:hover,
434
+ &:focus {
415
435
  color: @navbarInverseLinkColorHover;
416
436
  }
417
437
  }
@@ -429,6 +449,11 @@
429
449
  background-color: @navbarInverseLinkBackgroundActive;
430
450
  color: @navbarInverseLinkColorActive;
431
451
  }
452
+ .nav li.dropdown > a:hover .caret,
453
+ .nav li.dropdown > a:focus .caret {
454
+ border-top-color: @navbarInverseLinkColorActive;
455
+ border-bottom-color: @navbarInverseLinkColorActive;
456
+ }
432
457
  .nav li.dropdown > .dropdown-toggle .caret {
433
458
  border-top-color: @navbarInverseLinkColor;
434
459
  border-bottom-color: @navbarInverseLinkColor;
@@ -470,6 +495,3 @@
470
495
  }
471
496
 
472
497
  }
473
-
474
-
475
-
@@ -16,11 +16,18 @@
16
16
  .nav > li > a {
17
17
  display: block;
18
18
  }
19
- .nav > li > a:hover {
19
+ .nav > li > a:hover,
20
+ .nav > li > a:focus {
20
21
  text-decoration: none;
21
22
  background-color: @grayLighter;
22
23
  }
23
24
 
25
+ // Prevent IE8 from misplacing imgs
26
+ // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
27
+ .nav > li > a > img {
28
+ max-width: none;
29
+ }
30
+
24
31
  // Redeclare pull classes because of specifity
25
32
  .nav > .pull-right {
26
33
  float: right;
@@ -62,7 +69,8 @@
62
69
  padding: 3px 15px;
63
70
  }
64
71
  .nav-list > .active > a,
65
- .nav-list > .active > a:hover {
72
+ .nav-list > .active > a:hover,
73
+ .nav-list > .active > a:focus {
66
74
  color: @white;
67
75
  text-shadow: 0 -1px 0 rgba(0,0,0,.2);
68
76
  background-color: @linkColor;
@@ -116,13 +124,15 @@
116
124
  line-height: @baseLineHeight;
117
125
  border: 1px solid transparent;
118
126
  .border-radius(4px 4px 0 0);
119
- &:hover {
127
+ &:hover,
128
+ &:focus {
120
129
  border-color: @grayLighter @grayLighter #ddd;
121
130
  }
122
131
  }
123
- // Active state, and it's :hover to override normal :hover
132
+ // Active state, and it's :hover/:focus to override normal :hover/:focus
124
133
  .nav-tabs > .active > a,
125
- .nav-tabs > .active > a:hover {
134
+ .nav-tabs > .active > a:hover,
135
+ .nav-tabs > .active > a:focus {
126
136
  color: @gray;
127
137
  background-color: @bodyBackground;
128
138
  border: 1px solid #ddd;
@@ -145,7 +155,8 @@
145
155
 
146
156
  // Active state
147
157
  .nav-pills > .active > a,
148
- .nav-pills > .active > a:hover {
158
+ .nav-pills > .active > a:hover,
159
+ .nav-pills > .active > a:focus {
149
160
  color: @white;
150
161
  background-color: @linkColor;
151
162
  }
@@ -177,7 +188,8 @@
177
188
  .nav-tabs.nav-stacked > li:last-child > a {
178
189
  .border-bottom-radius(4px);
179
190
  }
180
- .nav-tabs.nav-stacked > li > a:hover {
191
+ .nav-tabs.nav-stacked > li > a:hover,
192
+ .nav-tabs.nav-stacked > li > a:focus {
181
193
  border-color: #ddd;
182
194
  z-index: 2;
183
195
  }
@@ -210,7 +222,8 @@
210
222
  border-bottom-color: @linkColor;
211
223
  margin-top: 6px;
212
224
  }
213
- .nav .dropdown-toggle:hover .caret {
225
+ .nav .dropdown-toggle:hover .caret,
226
+ .nav .dropdown-toggle:focus .caret {
214
227
  border-top-color: @linkColorHover;
215
228
  border-bottom-color: @linkColorHover;
216
229
  }
@@ -230,9 +243,10 @@
230
243
  border-bottom-color: @gray;
231
244
  }
232
245
 
233
- // Active:hover dropdown links
246
+ // Active:hover/:focus dropdown links
234
247
  // -------------------------
235
- .nav > .dropdown.active > a:hover {
248
+ .nav > .dropdown.active > a:hover,
249
+ .nav > .dropdown.active > a:focus {
236
250
  cursor: pointer;
237
251
  }
238
252
 
@@ -240,21 +254,24 @@
240
254
  // -------------------------
241
255
  .nav-tabs .open .dropdown-toggle,
242
256
  .nav-pills .open .dropdown-toggle,
243
- .nav > li.dropdown.open.active > a:hover {
257
+ .nav > li.dropdown.open.active > a:hover,
258
+ .nav > li.dropdown.open.active > a:focus {
244
259
  color: @white;
245
260
  background-color: @grayLight;
246
261
  border-color: @grayLight;
247
262
  }
248
263
  .nav li.dropdown.open .caret,
249
264
  .nav li.dropdown.open.active .caret,
250
- .nav li.dropdown.open a:hover .caret {
265
+ .nav li.dropdown.open a:hover .caret,
266
+ .nav li.dropdown.open a:focus .caret {
251
267
  border-top-color: @white;
252
268
  border-bottom-color: @white;
253
269
  .opacity(100);
254
270
  }
255
271
 
256
272
  // Dropdowns in stacked tabs
257
- .tabs-stacked .open > a:hover {
273
+ .tabs-stacked .open > a:hover,
274
+ .tabs-stacked .open > a:focus {
258
275
  border-color: @grayLight;
259
276
  }
260
277
 
@@ -305,13 +322,15 @@
305
322
  }
306
323
  .tabs-below > .nav-tabs > li > a {
307
324
  .border-radius(0 0 4px 4px);
308
- &:hover {
325
+ &:hover,
326
+ &:focus {
309
327
  border-bottom-color: transparent;
310
328
  border-top-color: #ddd;
311
329
  }
312
330
  }
313
331
  .tabs-below > .nav-tabs > .active > a,
314
- .tabs-below > .nav-tabs > .active > a:hover {
332
+ .tabs-below > .nav-tabs > .active > a:hover,
333
+ .tabs-below > .nav-tabs > .active > a:focus {
315
334
  border-color: transparent #ddd #ddd #ddd;
316
335
  }
317
336
 
@@ -340,11 +359,13 @@
340
359
  margin-right: -1px;
341
360
  .border-radius(4px 0 0 4px);
342
361
  }
343
- .tabs-left > .nav-tabs > li > a:hover {
362
+ .tabs-left > .nav-tabs > li > a:hover,
363
+ .tabs-left > .nav-tabs > li > a:focus {
344
364
  border-color: @grayLighter #ddd @grayLighter @grayLighter;
345
365
  }
346
366
  .tabs-left > .nav-tabs .active > a,
347
- .tabs-left > .nav-tabs .active > a:hover {
367
+ .tabs-left > .nav-tabs .active > a:hover,
368
+ .tabs-left > .nav-tabs .active > a:focus {
348
369
  border-color: #ddd transparent #ddd #ddd;
349
370
  *border-right-color: @white;
350
371
  }
@@ -359,11 +380,13 @@
359
380
  margin-left: -1px;
360
381
  .border-radius(0 4px 4px 0);
361
382
  }
362
- .tabs-right > .nav-tabs > li > a:hover {
383
+ .tabs-right > .nav-tabs > li > a:hover,
384
+ .tabs-right > .nav-tabs > li > a:focus {
363
385
  border-color: @grayLighter @grayLighter @grayLighter #ddd;
364
386
  }
365
387
  .tabs-right > .nav-tabs .active > a,
366
- .tabs-right > .nav-tabs .active > a:hover {
388
+ .tabs-right > .nav-tabs .active > a:hover,
389
+ .tabs-right > .nav-tabs .active > a:focus {
367
390
  border-color: #ddd #ddd #ddd transparent;
368
391
  *border-left-color: @white;
369
392
  }
@@ -377,8 +400,9 @@
377
400
  .nav > .disabled > a {
378
401
  color: @grayLight;
379
402
  }
380
- // Nuke hover effects
381
- .nav > .disabled > a:hover {
403
+ // Nuke hover/focus effects
404
+ .nav > .disabled > a:hover,
405
+ .nav > .disabled > a:focus {
382
406
  text-decoration: none;
383
407
  background-color: transparent;
384
408
  cursor: default;
@@ -20,7 +20,8 @@
20
20
  border: 1px solid #ddd;
21
21
  .border-radius(15px);
22
22
  }
23
- .pager li > a:hover {
23
+ .pager li > a:hover,
24
+ .pager li > a:focus {
24
25
  text-decoration: none;
25
26
  background-color: #f5f5f5;
26
27
  }
@@ -34,6 +35,7 @@
34
35
  }
35
36
  .pager .disabled > a,
36
37
  .pager .disabled > a:hover,
38
+ .pager .disabled > a:focus,
37
39
  .pager .disabled > span {
38
40
  color: @grayLight;
39
41
  background-color: #fff;
@@ -32,6 +32,7 @@
32
32
  border-left-width: 0;
33
33
  }
34
34
  .pagination ul > li > a:hover,
35
+ .pagination ul > li > a:focus,
35
36
  .pagination ul > .active > a,
36
37
  .pagination ul > .active > span {
37
38
  background-color: @paginationActiveBackground;
@@ -43,7 +44,8 @@
43
44
  }
44
45
  .pagination ul > .disabled > span,
45
46
  .pagination ul > .disabled > a,
46
- .pagination ul > .disabled > a:hover {
47
+ .pagination ul > .disabled > a:hover,
48
+ .pagination ul > .disabled > a:focus {
47
49
  color: @grayLight;
48
50
  background-color: transparent;
49
51
  cursor: default;
@@ -9,8 +9,9 @@
9
9
  left: 0;
10
10
  z-index: @zindexPopover;
11
11
  display: none;
12
- width: 236px;
12
+ max-width: 276px;
13
13
  padding: 1px;
14
+ text-align: left; // Reset given new insertion method
14
15
  background-color: @popoverBackground;
15
16
  -webkit-background-clip: padding-box;
16
17
  -moz-background-clip: padding;
@@ -20,12 +21,14 @@
20
21
  .border-radius(6px);
21
22
  .box-shadow(0 5px 10px rgba(0,0,0,.2));
22
23
 
24
+ // Overrides for proper insertion
25
+ white-space: normal;
26
+
23
27
  // Offset the popover to account for the popover arrow
24
28
  &.top { margin-top: -10px; }
25
29
  &.right { margin-left: 10px; }
26
30
  &.bottom { margin-top: 10px; }
27
31
  &.left { margin-left: -10px; }
28
-
29
32
  }
30
33
 
31
34
  .popover-title {
@@ -37,81 +40,94 @@
37
40
  background-color: @popoverTitleBackground;
38
41
  border-bottom: 1px solid darken(@popoverTitleBackground, 5%);
39
42
  .border-radius(5px 5px 0 0);
43
+
44
+ &:empty {
45
+ display: none;
46
+ }
40
47
  }
41
48
 
42
49
  .popover-content {
43
50
  padding: 9px 14px;
44
- p, ul, ol {
45
- margin-bottom: 0;
46
- }
47
51
  }
48
52
 
49
53
  // Arrows
54
+ //
55
+ // .arrow is outer, .arrow:after is inner
56
+
50
57
  .popover .arrow,
51
58
  .popover .arrow:after {
52
59
  position: absolute;
53
- display: inline-block;
60
+ display: block;
54
61
  width: 0;
55
62
  height: 0;
56
63
  border-color: transparent;
57
64
  border-style: solid;
58
65
  }
66
+ .popover .arrow {
67
+ border-width: @popoverArrowOuterWidth;
68
+ }
59
69
  .popover .arrow:after {
70
+ border-width: @popoverArrowWidth;
60
71
  content: "";
61
- z-index: -1;
62
72
  }
63
73
 
64
74
  .popover {
65
75
  &.top .arrow {
66
- bottom: -@popoverArrowWidth;
67
76
  left: 50%;
68
- margin-left: -@popoverArrowWidth;
69
- border-width: @popoverArrowWidth @popoverArrowWidth 0;
70
- border-top-color: @popoverArrowColor;
77
+ margin-left: -@popoverArrowOuterWidth;
78
+ border-bottom-width: 0;
79
+ border-top-color: #999; // IE8 fallback
80
+ border-top-color: @popoverArrowOuterColor;
81
+ bottom: -@popoverArrowOuterWidth;
71
82
  &:after {
72
- border-width: @popoverArrowOuterWidth @popoverArrowOuterWidth 0;
73
- border-top-color: @popoverArrowOuterColor;
74
- bottom: -1px;
75
- left: -@popoverArrowOuterWidth;
83
+ bottom: 1px;
84
+ margin-left: -@popoverArrowWidth;
85
+ border-bottom-width: 0;
86
+ border-top-color: @popoverArrowColor;
76
87
  }
77
88
  }
78
89
  &.right .arrow {
79
90
  top: 50%;
80
- left: -@popoverArrowWidth;
81
- margin-top: -@popoverArrowWidth;
82
- border-width: @popoverArrowWidth @popoverArrowWidth @popoverArrowWidth 0;
83
- border-right-color: @popoverArrowColor;
91
+ left: -@popoverArrowOuterWidth;
92
+ margin-top: -@popoverArrowOuterWidth;
93
+ border-left-width: 0;
94
+ border-right-color: #999; // IE8 fallback
95
+ border-right-color: @popoverArrowOuterColor;
84
96
  &:after {
85
- border-width: @popoverArrowOuterWidth @popoverArrowOuterWidth @popoverArrowOuterWidth 0;
86
- border-right-color: @popoverArrowOuterColor;
87
- bottom: -@popoverArrowOuterWidth;
88
- left: -1px;
97
+ left: 1px;
98
+ bottom: -@popoverArrowWidth;
99
+ border-left-width: 0;
100
+ border-right-color: @popoverArrowColor;
89
101
  }
90
102
  }
91
103
  &.bottom .arrow {
92
- top: -@popoverArrowWidth;
93
104
  left: 50%;
94
- margin-left: -@popoverArrowWidth;
95
- border-width: 0 @popoverArrowWidth @popoverArrowWidth;
96
- border-bottom-color: @popoverArrowColor;
105
+ margin-left: -@popoverArrowOuterWidth;
106
+ border-top-width: 0;
107
+ border-bottom-color: #999; // IE8 fallback
108
+ border-bottom-color: @popoverArrowOuterColor;
109
+ top: -@popoverArrowOuterWidth;
97
110
  &:after {
98
- border-width: 0 @popoverArrowOuterWidth @popoverArrowOuterWidth;
99
- border-bottom-color: @popoverArrowOuterColor;
100
- top: -1px;
101
- left: -@popoverArrowOuterWidth;
111
+ top: 1px;
112
+ margin-left: -@popoverArrowWidth;
113
+ border-top-width: 0;
114
+ border-bottom-color: @popoverArrowColor;
102
115
  }
103
116
  }
117
+
104
118
  &.left .arrow {
105
119
  top: 50%;
106
- right: -@popoverArrowWidth;
107
- margin-top: -@popoverArrowWidth;
108
- border-width: @popoverArrowWidth 0 @popoverArrowWidth @popoverArrowWidth;
109
- border-left-color: @popoverArrowColor;
120
+ right: -@popoverArrowOuterWidth;
121
+ margin-top: -@popoverArrowOuterWidth;
122
+ border-right-width: 0;
123
+ border-left-color: #999; // IE8 fallback
124
+ border-left-color: @popoverArrowOuterColor;
110
125
  &:after {
111
- border-width: @popoverArrowOuterWidth 0 @popoverArrowOuterWidth @popoverArrowOuterWidth;
112
- border-left-color: @popoverArrowOuterColor;
113
- bottom: -@popoverArrowOuterWidth;
114
- right: -1px;
126
+ right: 1px;
127
+ border-right-width: 0;
128
+ border-left-color: @popoverArrowColor;
129
+ bottom: -@popoverArrowWidth;
115
130
  }
116
131
  }
132
+
117
133
  }