bootstrap-generators 2.3.2 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +12 -2
  3. data/{LICENSE.txt → MIT-LICENSE} +1 -3
  4. data/README.md +19 -64
  5. data/Rakefile +24 -22
  6. data/bootstrap-generators.gemspec +3 -1
  7. data/lib/bootstrap-generators.rb +12 -1
  8. data/lib/bootstrap/generators/version.rb +1 -1
  9. data/lib/generators/bootstrap/install/install_generator.rb +9 -24
  10. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less +498 -179
  11. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.scss +620 -0
  12. data/lib/generators/bootstrap/install/templates/assets/stylesheets/{fluid.css → starter.css} +6 -6
  13. data/lib/generators/bootstrap/install/templates/assets/stylesheets/{fluid.css.less → starter.less} +7 -7
  14. data/lib/generators/bootstrap/install/templates/assets/stylesheets/{fluid.css.scss → starter.scss} +7 -8
  15. data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.erb +11 -9
  16. data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml +9 -8
  17. data/lib/generators/bootstrap/install/templates/layouts/starter.html.erb +50 -0
  18. data/lib/generators/bootstrap/install/templates/layouts/{hero.html.haml → starter.html.haml} +0 -0
  19. data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/edit.html.erb +3 -3
  20. data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb +25 -25
  21. data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/new.html.erb +2 -2
  22. data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/show.html.erb +5 -5
  23. data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/edit.html.haml +3 -3
  24. data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/index.html.haml +20 -19
  25. data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/new.html.haml +2 -2
  26. data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/show.html.haml +5 -5
  27. data/readme-template.md.erb +5 -48
  28. data/test/lib/generators/bootstrap/install_generator_test.rb +3 -33
  29. data/vendor/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  30. data/vendor/assets/fonts/glyphicons-halflings-regular.svg +228 -0
  31. data/vendor/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  32. data/vendor/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  33. data/vendor/assets/javascripts/bootstrap-ie.js +2 -0
  34. data/vendor/assets/javascripts/bootstrap-ie/html5shiv.js +8 -0
  35. data/vendor/assets/javascripts/bootstrap-ie/respond.min.js +6 -0
  36. data/vendor/assets/javascripts/bootstrap.js +12 -13
  37. data/vendor/assets/javascripts/bootstrap/affix.js +126 -0
  38. data/vendor/assets/javascripts/{bootstrap-alert.js → bootstrap/alert.js} +35 -36
  39. data/vendor/assets/javascripts/bootstrap/button.js +109 -0
  40. data/vendor/assets/javascripts/bootstrap/carousel.js +217 -0
  41. data/vendor/assets/javascripts/bootstrap/collapse.js +179 -0
  42. data/vendor/assets/javascripts/bootstrap/dropdown.js +154 -0
  43. data/vendor/assets/javascripts/bootstrap/modal.js +246 -0
  44. data/vendor/assets/javascripts/bootstrap/popover.js +117 -0
  45. data/vendor/assets/javascripts/bootstrap/scrollspy.js +158 -0
  46. data/vendor/assets/javascripts/bootstrap/tab.js +135 -0
  47. data/vendor/assets/javascripts/bootstrap/tooltip.js +386 -0
  48. data/vendor/assets/javascripts/bootstrap/transition.js +56 -0
  49. data/vendor/assets/stylesheets/bootstrap.css +4638 -4000
  50. data/vendor/twitter/bootstrap/less/alerts.less +46 -58
  51. data/vendor/twitter/bootstrap/less/badges.less +51 -0
  52. data/vendor/twitter/bootstrap/less/bootstrap.less +27 -31
  53. data/vendor/twitter/bootstrap/less/breadcrumbs.less +7 -8
  54. data/vendor/twitter/bootstrap/less/button-groups.less +173 -154
  55. data/vendor/twitter/bootstrap/less/buttons.less +97 -165
  56. data/vendor/twitter/bootstrap/less/carousel.less +115 -64
  57. data/vendor/twitter/bootstrap/less/close.less +20 -19
  58. data/vendor/twitter/bootstrap/less/code.less +17 -22
  59. data/vendor/twitter/bootstrap/less/component-animations.less +10 -3
  60. data/vendor/twitter/bootstrap/less/dropdowns.less +92 -147
  61. data/vendor/twitter/bootstrap/less/forms.less +224 -561
  62. data/vendor/twitter/bootstrap/less/glyphicons.less +232 -0
  63. data/vendor/twitter/bootstrap/less/grid.less +336 -11
  64. data/vendor/twitter/bootstrap/less/input-groups.less +127 -0
  65. data/vendor/twitter/bootstrap/less/jumbotron.less +40 -0
  66. data/vendor/twitter/bootstrap/less/labels.less +58 -0
  67. data/vendor/twitter/bootstrap/less/list-group.less +88 -0
  68. data/vendor/twitter/bootstrap/less/media.less +8 -7
  69. data/vendor/twitter/bootstrap/less/mixins.less +487 -466
  70. data/vendor/twitter/bootstrap/less/modals.less +98 -52
  71. data/vendor/twitter/bootstrap/less/navbar.less +507 -383
  72. data/vendor/twitter/bootstrap/less/navs.less +169 -349
  73. data/vendor/twitter/bootstrap/less/normalize.less +396 -0
  74. data/vendor/twitter/bootstrap/less/pager.less +45 -33
  75. data/vendor/twitter/bootstrap/less/pagination.less +65 -105
  76. data/vendor/twitter/bootstrap/less/panels.less +148 -0
  77. data/vendor/twitter/bootstrap/less/popovers.less +51 -51
  78. data/vendor/twitter/bootstrap/less/print.less +100 -0
  79. data/vendor/twitter/bootstrap/less/progress-bars.less +28 -55
  80. data/vendor/twitter/bootstrap/less/responsive-utilities.less +195 -34
  81. data/vendor/twitter/bootstrap/less/scaffolding.less +101 -24
  82. data/vendor/twitter/bootstrap/less/tables.less +170 -178
  83. data/vendor/twitter/bootstrap/less/theme.less +232 -0
  84. data/vendor/twitter/bootstrap/less/thumbnails.less +11 -33
  85. data/vendor/twitter/bootstrap/less/tooltip.less +45 -20
  86. data/vendor/twitter/bootstrap/less/type.less +100 -109
  87. data/vendor/twitter/bootstrap/less/utilities.less +19 -7
  88. data/vendor/twitter/bootstrap/less/variables.less +498 -179
  89. data/vendor/twitter/bootstrap/less/wells.less +7 -7
  90. data/vendor/twitter/bootstrap/sass/_alerts.scss +46 -58
  91. data/vendor/twitter/bootstrap/sass/_badges.scss +51 -0
  92. data/vendor/twitter/bootstrap/sass/_breadcrumbs.scss +8 -9
  93. data/vendor/twitter/bootstrap/sass/_button-groups.scss +173 -154
  94. data/vendor/twitter/bootstrap/sass/_buttons.scss +97 -165
  95. data/vendor/twitter/bootstrap/sass/_carousel.scss +116 -65
  96. data/vendor/twitter/bootstrap/sass/_close.scss +9 -8
  97. data/vendor/twitter/bootstrap/sass/_code.scss +16 -21
  98. data/vendor/twitter/bootstrap/sass/_component-animations.scss +10 -3
  99. data/vendor/twitter/bootstrap/sass/_dropdowns.scss +94 -148
  100. data/vendor/twitter/bootstrap/sass/_forms.scss +220 -559
  101. data/vendor/twitter/bootstrap/sass/_glyphicons.scss +232 -0
  102. data/vendor/twitter/bootstrap/sass/_grid.scss +336 -11
  103. data/vendor/twitter/bootstrap/sass/_input-groups.scss +127 -0
  104. data/vendor/twitter/bootstrap/sass/_jumbotron.scss +40 -0
  105. data/vendor/twitter/bootstrap/sass/_labels.scss +58 -0
  106. data/vendor/twitter/bootstrap/sass/_list-group.scss +88 -0
  107. data/vendor/twitter/bootstrap/sass/_media.scss +8 -7
  108. data/vendor/twitter/bootstrap/sass/_mixins.scss +465 -433
  109. data/vendor/twitter/bootstrap/sass/_modals.scss +102 -52
  110. data/vendor/twitter/bootstrap/sass/_navbar.scss +511 -383
  111. data/vendor/twitter/bootstrap/sass/_navs.scss +169 -349
  112. data/vendor/twitter/bootstrap/sass/_normalize.scss +396 -0
  113. data/vendor/twitter/bootstrap/sass/_pager.scss +45 -33
  114. data/vendor/twitter/bootstrap/sass/_pagination.scss +65 -105
  115. data/vendor/twitter/bootstrap/sass/_panels.scss +148 -0
  116. data/vendor/twitter/bootstrap/sass/_popovers.scss +51 -51
  117. data/vendor/twitter/bootstrap/sass/_print.scss +100 -0
  118. data/vendor/twitter/bootstrap/sass/_progress-bars.scss +28 -55
  119. data/vendor/twitter/bootstrap/sass/_responsive-utilities.scss +180 -45
  120. data/vendor/twitter/bootstrap/sass/_scaffolding.scss +101 -24
  121. data/vendor/twitter/bootstrap/sass/_tables.scss +169 -168
  122. data/vendor/twitter/bootstrap/sass/_theme.scss +232 -0
  123. data/vendor/twitter/bootstrap/sass/_thumbnails.scss +11 -33
  124. data/vendor/twitter/bootstrap/sass/_tooltip.scss +45 -20
  125. data/vendor/twitter/bootstrap/sass/_type.scss +101 -110
  126. data/vendor/twitter/bootstrap/sass/_utilities.scss +19 -22
  127. data/vendor/twitter/bootstrap/sass/_variables.scss +498 -179
  128. data/vendor/twitter/bootstrap/sass/_wells.scss +7 -7
  129. data/vendor/twitter/bootstrap/sass/bootstrap.scss +29 -33
  130. metadata +47 -56
  131. data/lib/bootstrap/generators/engine.rb +0 -14
  132. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.css.scss +0 -301
  133. data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css +0 -18
  134. data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.less +0 -19
  135. data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.scss +0 -19
  136. data/lib/generators/bootstrap/install/templates/config/initializers/simple_form.rb +0 -176
  137. data/lib/generators/bootstrap/install/templates/config/locales/simple_form.en.yml +0 -24
  138. data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.erb +0 -13
  139. data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.haml +0 -10
  140. data/lib/generators/bootstrap/install/templates/layouts/fluid.html.erb +0 -80
  141. data/lib/generators/bootstrap/install/templates/layouts/fluid.html.haml +0 -94
  142. data/lib/generators/bootstrap/install/templates/layouts/hero.html.erb +0 -53
  143. data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
  144. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  145. data/vendor/assets/javascripts/bootstrap-affix.js +0 -117
  146. data/vendor/assets/javascripts/bootstrap-button.js +0 -105
  147. data/vendor/assets/javascripts/bootstrap-carousel.js +0 -207
  148. data/vendor/assets/javascripts/bootstrap-collapse.js +0 -167
  149. data/vendor/assets/javascripts/bootstrap-dropdown.js +0 -169
  150. data/vendor/assets/javascripts/bootstrap-modal.js +0 -247
  151. data/vendor/assets/javascripts/bootstrap-popover.js +0 -114
  152. data/vendor/assets/javascripts/bootstrap-scrollspy.js +0 -162
  153. data/vendor/assets/javascripts/bootstrap-tab.js +0 -144
  154. data/vendor/assets/javascripts/bootstrap-tooltip.js +0 -361
  155. data/vendor/assets/javascripts/bootstrap-transition.js +0 -60
  156. data/vendor/assets/javascripts/bootstrap-typeahead.js +0 -335
  157. data/vendor/assets/stylesheets/bootstrap-responsive.css +0 -1109
  158. data/vendor/twitter/bootstrap/less/accordion.less +0 -34
  159. data/vendor/twitter/bootstrap/less/hero-unit.less +0 -25
  160. data/vendor/twitter/bootstrap/less/labels-badges.less +0 -84
  161. data/vendor/twitter/bootstrap/less/layouts.less +0 -16
  162. data/vendor/twitter/bootstrap/less/reset.less +0 -216
  163. data/vendor/twitter/bootstrap/less/responsive-1200px-min.less +0 -28
  164. data/vendor/twitter/bootstrap/less/responsive-767px-max.less +0 -193
  165. data/vendor/twitter/bootstrap/less/responsive-768px-979px.less +0 -19
  166. data/vendor/twitter/bootstrap/less/responsive-navbar.less +0 -189
  167. data/vendor/twitter/bootstrap/less/responsive.less +0 -48
  168. data/vendor/twitter/bootstrap/less/sprites.less +0 -197
  169. data/vendor/twitter/bootstrap/sass/_accordion.scss +0 -34
  170. data/vendor/twitter/bootstrap/sass/_hero-unit.scss +0 -25
  171. data/vendor/twitter/bootstrap/sass/_labels-badges.scss +0 -83
  172. data/vendor/twitter/bootstrap/sass/_layouts.scss +0 -16
  173. data/vendor/twitter/bootstrap/sass/_reset.scss +0 -216
  174. data/vendor/twitter/bootstrap/sass/_responsive-1200px-min.scss +0 -28
  175. data/vendor/twitter/bootstrap/sass/_responsive-767px-max.scss +0 -193
  176. data/vendor/twitter/bootstrap/sass/_responsive-768px-979px.scss +0 -19
  177. data/vendor/twitter/bootstrap/sass/_responsive-navbar.scss +0 -189
  178. data/vendor/twitter/bootstrap/sass/_sprites.scss +0 -197
  179. data/vendor/twitter/bootstrap/sass/responsive.scss +0 -48
@@ -5,28 +5,29 @@
5
5
 
6
6
  .close {
7
7
  float: right;
8
- font-size: 20px;
9
- font-weight: bold;
10
- line-height: @baseLineHeight;
11
- color: @black;
12
- text-shadow: 0 1px 0 rgba(255,255,255,1);
13
- .opacity(20);
8
+ font-size: (@font-size-base * 1.5);
9
+ font-weight: @close-font-weight;
10
+ line-height: 1;
11
+ color: @close-color;
12
+ text-shadow: @close-text-shadow;
13
+ .opacity(.2);
14
+
14
15
  &:hover,
15
16
  &:focus {
16
- color: @black;
17
+ color: @close-color;
17
18
  text-decoration: none;
18
19
  cursor: pointer;
19
- .opacity(40);
20
+ .opacity(.5);
20
21
  }
21
- }
22
22
 
23
- // Additional properties for button version
24
- // iOS requires the button element instead of an anchor tag.
25
- // If you want the anchor version, it requires `href="#"`.
26
- button.close {
27
- padding: 0;
28
- cursor: pointer;
29
- background: transparent;
30
- border: 0;
31
- -webkit-appearance: none;
32
- }
23
+ // Additional properties for button version
24
+ // iOS requires the button element instead of an anchor tag.
25
+ // If you want the anchor version, it requires `href="#"`.
26
+ button& {
27
+ padding: 0;
28
+ cursor: pointer;
29
+ background: transparent;
30
+ border: 0;
31
+ -webkit-appearance: none;
32
+ }
33
+ }
@@ -6,48 +6,43 @@
6
6
  // Inline and block code styles
7
7
  code,
8
8
  pre {
9
- padding: 0 3px 2px;
10
- #font > #family > .monospace;
11
- font-size: @baseFontSize - 2;
12
- color: @grayDark;
13
- .border-radius(3px);
9
+ font-family: @font-family-monospace;
14
10
  }
15
11
 
16
12
  // Inline code
17
13
  code {
18
14
  padding: 2px 4px;
19
- color: #d14;
20
- background-color: #f7f7f9;
21
- border: 1px solid #e1e1e8;
15
+ font-size: 90%;
16
+ color: @code-color;
17
+ background-color: @code-bg;
22
18
  white-space: nowrap;
19
+ border-radius: @border-radius-base;
23
20
  }
24
21
 
25
22
  // Blocks of code
26
23
  pre {
27
24
  display: block;
28
- padding: (@baseLineHeight - 1) / 2;
29
- margin: 0 0 @baseLineHeight / 2;
30
- font-size: @baseFontSize - 1; // 14px to 13px
31
- line-height: @baseLineHeight;
25
+ padding: ((@line-height-computed - 1) / 2);
26
+ margin: 0 0 (@line-height-computed / 2);
27
+ font-size: (@font-size-base - 1); // 14px to 13px
28
+ line-height: @line-height-base;
32
29
  word-break: break-all;
33
30
  word-wrap: break-word;
34
- white-space: pre;
35
- white-space: pre-wrap;
36
- background-color: #f5f5f5;
37
- border: 1px solid #ccc; // fallback for IE7-8
38
- border: 1px solid rgba(0,0,0,.15);
39
- .border-radius(@baseBorderRadius);
31
+ color: @pre-color;
32
+ background-color: @pre-bg;
33
+ border: 1px solid @pre-border-color;
34
+ border-radius: @border-radius-base;
40
35
 
41
36
  // Make prettyprint styles more spaced out for readability
42
37
  &.prettyprint {
43
- margin-bottom: @baseLineHeight;
38
+ margin-bottom: @line-height-computed;
44
39
  }
45
40
 
46
41
  // Account for some code outputs that place code tags in pre tags
47
42
  code {
48
43
  padding: 0;
44
+ font-size: inherit;
49
45
  color: inherit;
50
- white-space: pre;
51
46
  white-space: pre-wrap;
52
47
  background-color: transparent;
53
48
  border: 0;
@@ -56,6 +51,6 @@ pre {
56
51
 
57
52
  // Enable scrollable blocks of code
58
53
  .pre-scrollable {
59
- max-height: 340px;
54
+ max-height: @pre-scrollable-max-height;
60
55
  overflow-y: scroll;
61
- }
56
+ }
@@ -2,6 +2,10 @@
2
2
  // Component animations
3
3
  // --------------------------------------------------
4
4
 
5
+ // Heads up!
6
+ //
7
+ // We don't use the `.opacity()` mixin here since it causes a bug with text
8
+ // fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552.
5
9
 
6
10
  .fade {
7
11
  opacity: 0;
@@ -12,11 +16,14 @@
12
16
  }
13
17
 
14
18
  .collapse {
19
+ display: none;
20
+ &.in {
21
+ display: block;
22
+ }
23
+ }
24
+ .collapsing {
15
25
  position: relative;
16
26
  height: 0;
17
27
  overflow: hidden;
18
28
  .transition(height .35s ease);
19
- &.in {
20
- height: auto;
21
- }
22
29
  }
@@ -3,62 +3,51 @@
3
3
  // --------------------------------------------------
4
4
 
5
5
 
6
- // Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
7
- .dropup,
8
- .dropdown {
9
- position: relative;
10
- }
11
- .dropdown-toggle {
12
- // The caret makes the toggle a bit too tall in IE7
13
- *margin-bottom: -3px;
14
- }
15
- .dropdown-toggle:active,
16
- .open .dropdown-toggle {
17
- outline: 0;
18
- }
19
-
20
6
  // Dropdown arrow/caret
21
- // --------------------
22
7
  .caret {
23
8
  display: inline-block;
24
9
  width: 0;
25
10
  height: 0;
26
- vertical-align: top;
27
- border-top: 4px solid @black;
28
- border-right: 4px solid transparent;
29
- border-left: 4px solid transparent;
11
+ margin-left: 2px;
12
+ vertical-align: middle;
13
+ border-top: @caret-width-base solid @dropdown-caret-color;
14
+ border-right: @caret-width-base solid transparent;
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;
30
19
  content: "";
31
20
  }
32
21
 
33
- // Place the caret
34
- .dropdown .caret {
35
- margin-top: 8px;
36
- margin-left: 2px;
22
+ // The dropdown wrapper (div)
23
+ .dropdown {
24
+ position: relative;
25
+ }
26
+
27
+ // Prevent the focus on the dropdown toggle when closing dropdowns
28
+ .dropdown-toggle:focus {
29
+ outline: 0;
37
30
  }
38
31
 
39
32
  // The dropdown menu (ul)
40
- // ----------------------
41
33
  .dropdown-menu {
42
34
  position: absolute;
43
35
  top: 100%;
44
36
  left: 0;
45
- z-index: @zindexDropdown;
37
+ z-index: @zindex-dropdown;
46
38
  display: none; // none by default, but block on "open" of the menu
47
39
  float: left;
48
40
  min-width: 160px;
49
41
  padding: 5px 0;
50
42
  margin: 2px 0 0; // override default ul
51
43
  list-style: none;
52
- background-color: @dropdownBackground;
53
- border: 1px solid #ccc; // Fallback for IE7-8
54
- border: 1px solid @dropdownBorder;
55
- *border-right-width: 2px;
56
- *border-bottom-width: 2px;
57
- .border-radius(6px);
58
- .box-shadow(0 5px 10px rgba(0,0,0,.2));
59
- -webkit-background-clip: padding-box;
60
- -moz-background-clip: padding;
61
- background-clip: padding-box;
44
+ font-size: @font-size-base;
45
+ background-color: @dropdown-bg;
46
+ border: 1px solid @dropdown-fallback-border; // IE8 fallback
47
+ border: 1px solid @dropdown-border;
48
+ border-radius: @border-radius-base;
49
+ .box-shadow(0 6px 12px rgba(0,0,0,.175));
50
+ background-clip: padding-box;
62
51
 
63
52
  // Aligns the dropdown menu to right
64
53
  &.pull-right {
@@ -68,7 +57,7 @@
68
57
 
69
58
  // Dividers (basically an hr) within the dropdown
70
59
  .divider {
71
- .nav-divider(@dropdownDividerTop, @dropdownDividerBottom);
60
+ .nav-divider(@dropdown-divider-bg);
72
61
  }
73
62
 
74
63
  // Links within the dropdown menu
@@ -77,92 +66,108 @@
77
66
  padding: 3px 20px;
78
67
  clear: both;
79
68
  font-weight: normal;
80
- line-height: @baseLineHeight;
81
- color: @dropdownLinkColor;
82
- white-space: nowrap;
69
+ line-height: @line-height-base;
70
+ color: @dropdown-link-color;
71
+ white-space: nowrap; // prevent links from randomly breaking onto new lines
83
72
  }
84
73
  }
85
74
 
86
75
  // Hover/Focus state
87
- // -----------
88
- .dropdown-menu > li > a:hover,
89
- .dropdown-menu > li > a:focus,
90
- .dropdown-submenu:hover > a,
91
- .dropdown-submenu:focus > a {
92
- text-decoration: none;
93
- color: @dropdownLinkColorHover;
94
- #gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover, 5%));
76
+ .dropdown-menu > li > a {
77
+ &:hover,
78
+ &:focus {
79
+ text-decoration: none;
80
+ color: @dropdown-link-hover-color;
81
+ background-color: @dropdown-link-hover-bg;
82
+ }
95
83
  }
96
84
 
97
85
  // Active state
98
- // ------------
99
- .dropdown-menu > .active > a,
100
- .dropdown-menu > .active > a:hover,
101
- .dropdown-menu > .active > a:focus {
102
- color: @dropdownLinkColorActive;
103
- text-decoration: none;
104
- outline: 0;
105
- #gradient > .vertical(@dropdownLinkBackgroundActive, darken(@dropdownLinkBackgroundActive, 5%));
86
+ .dropdown-menu > .active > a {
87
+ &,
88
+ &:hover,
89
+ &:focus {
90
+ color: @dropdown-link-active-color;
91
+ text-decoration: none;
92
+ outline: 0;
93
+ background-color: @dropdown-link-active-bg;
94
+ }
106
95
  }
107
96
 
108
97
  // Disabled state
109
- // --------------
98
+ //
110
99
  // Gray out text and ensure the hover/focus state remains gray
111
- .dropdown-menu > .disabled > a,
112
- .dropdown-menu > .disabled > a:hover,
113
- .dropdown-menu > .disabled > a:focus {
114
- color: @grayLight;
100
+
101
+ .dropdown-menu > .disabled > a {
102
+ &,
103
+ &:hover,
104
+ &:focus {
105
+ color: @dropdown-link-disabled-color;
106
+ }
115
107
  }
116
108
  // Nuke hover/focus effects
117
- .dropdown-menu > .disabled > a:hover,
118
- .dropdown-menu > .disabled > a:focus {
119
- text-decoration: none;
120
- background-color: transparent;
121
- background-image: none; // Remove CSS gradient
122
- .reset-filter();
123
- cursor: default;
109
+ .dropdown-menu > .disabled > a {
110
+ &:hover,
111
+ &:focus {
112
+ text-decoration: none;
113
+ background-color: transparent;
114
+ background-image: none; // Remove CSS gradient
115
+ .reset-filter();
116
+ cursor: not-allowed;
117
+ }
124
118
  }
125
119
 
126
120
  // Open state for the dropdown
127
- // ---------------------------
128
121
  .open {
129
- // IE7's z-index only goes to the nearest positioned ancestor, which would
130
- // make the menu appear below buttons that appeared later on the page
131
- *z-index: @zindexDropdown;
132
-
133
- & > .dropdown-menu {
122
+ // Show the menu
123
+ > .dropdown-menu {
134
124
  display: block;
135
125
  }
126
+
127
+ // Remove the outline when :focus is triggered
128
+ > a {
129
+ outline: 0;
130
+ }
131
+ }
132
+
133
+ // Dropdown section headers
134
+ .dropdown-header {
135
+ display: block;
136
+ padding: 3px 20px;
137
+ font-size: @font-size-small;
138
+ line-height: @line-height-base;
139
+ color: @dropdown-header-color;
136
140
  }
137
141
 
138
142
  // Backdrop to catch body clicks on mobile, etc.
139
- // ---------------------------
140
143
  .dropdown-backdrop {
141
144
  position: fixed;
142
145
  left: 0;
143
146
  right: 0;
144
147
  bottom: 0;
145
148
  top: 0;
146
- z-index: @zindexDropdown - 10;
149
+ z-index: @zindex-dropdown - 10;
147
150
  }
148
151
 
149
152
  // Right aligned dropdowns
150
- // ---------------------------
151
153
  .pull-right > .dropdown-menu {
152
154
  right: 0;
153
155
  left: auto;
154
156
  }
155
157
 
156
158
  // Allow for dropdowns to go bottom up (aka, dropup-menu)
157
- // ------------------------------------------------------
159
+ //
158
160
  // Just add .dropup after the standard .dropdown class and you're set, bro.
159
161
  // TODO: abstract this so that the navbar fixed styles are not placed here?
162
+
160
163
  .dropup,
161
164
  .navbar-fixed-bottom .dropdown {
162
165
  // Reverse the caret
163
166
  .caret {
164
- border-top: 0;
165
- border-bottom: 4px solid @black;
167
+ // Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once this
168
+ // gets fixed, restore `border-top: 0;`.
169
+ border-top: 0 dotted;
170
+ border-bottom: 4px solid @dropdown-caret-color;
166
171
  content: "";
167
172
  }
168
173
  // Different positioning for bottom up menu
@@ -173,76 +178,16 @@
173
178
  }
174
179
  }
175
180
 
176
- // Sub menus
177
- // ---------------------------
178
- .dropdown-submenu {
179
- position: relative;
180
- }
181
- // Default dropdowns
182
- .dropdown-submenu > .dropdown-menu {
183
- top: 0;
184
- left: 100%;
185
- margin-top: -6px;
186
- margin-left: -1px;
187
- .border-radius(0 6px 6px 6px);
188
- }
189
- .dropdown-submenu:hover > .dropdown-menu {
190
- display: block;
191
- }
192
181
 
193
- // Dropups
194
- .dropup .dropdown-submenu > .dropdown-menu {
195
- top: auto;
196
- bottom: 0;
197
- margin-top: 0;
198
- margin-bottom: -2px;
199
- .border-radius(5px 5px 5px 0);
200
- }
201
-
202
- // Caret to indicate there is a submenu
203
- .dropdown-submenu > a:after {
204
- display: block;
205
- content: " ";
206
- float: right;
207
- width: 0;
208
- height: 0;
209
- border-color: transparent;
210
- border-style: solid;
211
- border-width: 5px 0 5px 5px;
212
- border-left-color: darken(@dropdownBackground, 20%);
213
- margin-top: 5px;
214
- margin-right: -10px;
215
- }
216
- .dropdown-submenu:hover > a:after {
217
- border-left-color: @dropdownLinkColorHover;
218
- }
219
-
220
- // Left aligned submenus
221
- .dropdown-submenu.pull-left {
222
- // Undo the float
223
- // Yes, this is awkward since .pull-left adds a float, but it sticks to our conventions elsewhere.
224
- float: none;
182
+ // Component alignment
183
+ //
184
+ // Reiterate per navbar.less and the modified component alignment there.
225
185
 
226
- // Positioning the submenu
227
- > .dropdown-menu {
228
- left: -100%;
229
- margin-left: 10px;
230
- .border-radius(6px 0 6px 6px);
186
+ @media (min-width: @grid-float-breakpoint) {
187
+ .navbar-right {
188
+ .dropdown-menu {
189
+ .pull-right > .dropdown-menu();
190
+ }
231
191
  }
232
192
  }
233
193
 
234
- // Tweak nav headers
235
- // -----------------
236
- // Increase padding from 15px to 20px on sides
237
- .dropdown .dropdown-menu .nav-header {
238
- padding-left: 20px;
239
- padding-right: 20px;
240
- }
241
-
242
- // Typeahead
243
- // ---------
244
- .typeahead {
245
- z-index: 1051;
246
- margin-top: 2px; // give it some space to breathe
247
- .border-radius(@baseBorderRadius);
248
- }