bootstrap-generators 2.0.1 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. data/README.md +258 -33
  2. data/Rakefile +0 -59
  3. data/lib/bootstrap/generators/engine.rb +6 -1
  4. data/lib/bootstrap/generators/version.rb +1 -1
  5. data/lib/generators/bootstrap/install/install_generator.rb +10 -2
  6. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.css.scss +120 -15
  7. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less +206 -0
  8. data/lib/generators/bootstrap/install/templates/assets/stylesheets/fluid.css +2 -0
  9. data/lib/generators/bootstrap/install/templates/assets/stylesheets/fluid.css.less +5 -4
  10. data/lib/generators/bootstrap/install/templates/assets/stylesheets/fluid.css.scss +3 -2
  11. data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css +2 -0
  12. data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.less +5 -4
  13. data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.scss +3 -2
  14. data/lib/generators/bootstrap/install/templates/config/initializers/simple_form.rb +3 -0
  15. data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.erb +3 -3
  16. data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml +2 -2
  17. data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.erb +1 -1
  18. data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.haml +1 -1
  19. data/test/fixtures/application.js +3 -0
  20. data/test/lib/generators/bootstrap/install_generator_test.rb +4 -3
  21. data/test/test_helper.rb +8 -1
  22. data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
  23. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  24. data/vendor/assets/javascripts/bootstrap-alert.js +28 -32
  25. data/vendor/assets/javascripts/bootstrap-button.js +29 -33
  26. data/vendor/assets/javascripts/bootstrap-carousel.js +33 -21
  27. data/vendor/assets/javascripts/bootstrap-collapse.js +47 -26
  28. data/vendor/assets/javascripts/bootstrap-dropdown.js +18 -10
  29. data/vendor/assets/javascripts/bootstrap-modal.js +25 -17
  30. data/vendor/assets/javascripts/bootstrap-popover.js +13 -10
  31. data/vendor/assets/javascripts/bootstrap-scrollspy.js +44 -18
  32. data/vendor/assets/javascripts/bootstrap-tab.js +12 -7
  33. data/vendor/assets/javascripts/bootstrap-tooltip.js +40 -35
  34. data/vendor/assets/javascripts/bootstrap-transition.js +30 -20
  35. data/vendor/assets/javascripts/bootstrap-typeahead.js +29 -15
  36. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/accordion.less +5 -0
  37. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/alerts.less +2 -14
  38. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/bootstrap.less +2 -2
  39. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/breadcrumbs.less +2 -0
  40. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/button-groups.less +76 -33
  41. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/buttons.less +32 -24
  42. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/carousel.less +0 -0
  43. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/close.less +12 -1
  44. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/code.less +6 -6
  45. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/component-animations.less +7 -5
  46. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/dropdowns.less +58 -45
  47. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/forms.less +205 -144
  48. data/vendor/twitter/bootstrap/less/grid.less +5 -0
  49. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/hero-unit.less +3 -1
  50. data/vendor/twitter/bootstrap/less/labels-badges.less +55 -0
  51. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/layouts.less +1 -1
  52. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/mixins.less +235 -179
  53. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/modals.less +13 -6
  54. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/navbar.less +131 -72
  55. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/navs.less +53 -43
  56. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/pager.less +6 -0
  57. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/pagination.less +1 -0
  58. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/popovers.less +0 -0
  59. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/progress-bars.less +27 -5
  60. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/reset.less +8 -3
  61. data/vendor/twitter/bootstrap/less/responsive-1200px-min.less +26 -0
  62. data/vendor/twitter/bootstrap/less/responsive-767px-max.less +149 -0
  63. data/vendor/twitter/bootstrap/less/responsive-768px-979px.less +17 -0
  64. data/vendor/twitter/bootstrap/less/responsive-navbar.less +153 -0
  65. data/vendor/twitter/bootstrap/less/responsive-utilities.less +41 -0
  66. data/vendor/twitter/bootstrap/less/responsive.less +48 -0
  67. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/scaffolding.less +4 -4
  68. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/sprites.less +42 -9
  69. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/tables.less +46 -20
  70. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/thumbnails.less +14 -2
  71. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/tooltip.less +0 -0
  72. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/type.less +27 -13
  73. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/utilities.less +0 -0
  74. data/vendor/twitter/bootstrap/less/variables.less +206 -0
  75. data/vendor/{assets/stylesheets → twitter/bootstrap}/less/wells.less +10 -0
  76. data/vendor/{assets/stylesheets/scss/accordion.scss → twitter/bootstrap/sass/_accordion.scss} +5 -0
  77. data/vendor/{assets/stylesheets/scss/alerts.scss → twitter/bootstrap/sass/_alerts.scss} +3 -15
  78. data/vendor/{assets/stylesheets/scss/breadcrumbs.scss → twitter/bootstrap/sass/_breadcrumbs.scss} +2 -0
  79. data/vendor/{assets/stylesheets/scss/button-groups.scss → twitter/bootstrap/sass/_button-groups.scss} +76 -33
  80. data/vendor/{assets/stylesheets/scss/buttons.scss → twitter/bootstrap/sass/_buttons.scss} +33 -25
  81. data/vendor/{assets/stylesheets/scss/carousel.scss → twitter/bootstrap/sass/_carousel.scss} +1 -1
  82. data/vendor/{assets/stylesheets/scss/close.scss → twitter/bootstrap/sass/_close.scss} +12 -1
  83. data/vendor/{assets/stylesheets/scss/code.scss → twitter/bootstrap/sass/_code.scss} +7 -7
  84. data/vendor/{assets/stylesheets/scss/component-animations.scss → twitter/bootstrap/sass/_component-animations.scss} +9 -7
  85. data/vendor/{assets/stylesheets/scss/dropdowns.scss → twitter/bootstrap/sass/_dropdowns.scss} +58 -45
  86. data/vendor/{assets/stylesheets/scss/forms.scss → twitter/bootstrap/sass/_forms.scss} +205 -145
  87. data/vendor/twitter/bootstrap/sass/_grid.scss +5 -0
  88. data/vendor/{assets/stylesheets/scss/hero-unit.scss → twitter/bootstrap/sass/_hero-unit.scss} +3 -1
  89. data/vendor/twitter/bootstrap/sass/_labels-badges.scss +52 -0
  90. data/vendor/{assets/stylesheets/scss/layouts.scss → twitter/bootstrap/sass/_layouts.scss} +2 -2
  91. data/vendor/{assets/stylesheets/scss/mixins.scss → twitter/bootstrap/sass/_mixins.scss} +246 -182
  92. data/vendor/{assets/stylesheets/scss/modals.scss → twitter/bootstrap/sass/_modals.scss} +14 -7
  93. data/vendor/{assets/stylesheets/scss/navbar.scss → twitter/bootstrap/sass/_navbar.scss} +132 -73
  94. data/vendor/{assets/stylesheets/scss/navs.scss → twitter/bootstrap/sass/_navs.scss} +53 -43
  95. data/vendor/{assets/stylesheets/scss/pager.scss → twitter/bootstrap/sass/_pager.scss} +6 -0
  96. data/vendor/{assets/stylesheets/scss/pagination.scss → twitter/bootstrap/sass/_pagination.scss} +1 -0
  97. data/vendor/{assets/stylesheets/scss/popovers.scss → twitter/bootstrap/sass/_popovers.scss} +0 -0
  98. data/vendor/{assets/stylesheets/scss/progress-bars.scss → twitter/bootstrap/sass/_progress-bars.scss} +27 -5
  99. data/vendor/{assets/stylesheets/scss/reset.scss → twitter/bootstrap/sass/_reset.scss} +8 -3
  100. data/vendor/twitter/bootstrap/sass/_responsive-1200px-min.scss +26 -0
  101. data/vendor/twitter/bootstrap/sass/_responsive-767px-max.scss +149 -0
  102. data/vendor/twitter/bootstrap/sass/_responsive-768px-979px.scss +17 -0
  103. data/vendor/twitter/bootstrap/sass/_responsive-navbar.scss +153 -0
  104. data/vendor/twitter/bootstrap/sass/_responsive-utilities.scss +41 -0
  105. data/vendor/{assets/stylesheets/scss/scaffolding.scss → twitter/bootstrap/sass/_scaffolding.scss} +4 -4
  106. data/vendor/{assets/stylesheets/scss/sprites.scss → twitter/bootstrap/sass/_sprites.scss} +40 -7
  107. data/vendor/{assets/stylesheets/scss/tables.scss → twitter/bootstrap/sass/_tables.scss} +37 -32
  108. data/vendor/{assets/stylesheets/scss/thumbnails.scss → twitter/bootstrap/sass/_thumbnails.scss} +14 -2
  109. data/vendor/{assets/stylesheets/scss/tooltip.scss → twitter/bootstrap/sass/_tooltip.scss} +1 -1
  110. data/vendor/{assets/stylesheets/scss/type.scss → twitter/bootstrap/sass/_type.scss} +27 -13
  111. data/vendor/{assets/stylesheets/scss/utilities.scss → twitter/bootstrap/sass/_utilities.scss} +0 -0
  112. data/vendor/twitter/bootstrap/sass/_variables.scss +204 -0
  113. data/vendor/{assets/stylesheets/scss/wells.scss → twitter/bootstrap/sass/_wells.scss} +10 -0
  114. data/vendor/{assets/stylesheets/scss → twitter/bootstrap/sass}/bootstrap.scss +3 -3
  115. data/vendor/twitter/bootstrap/sass/responsive.scss +48 -0
  116. metadata +93 -84
  117. data/lib/generators/bootstrap/install/templates/assets/javascripts/bootstrap-generators.js +0 -1
  118. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.css.less +0 -98
  119. data/vendor/assets/stylesheets/bootstrap.css +0 -3363
  120. data/vendor/assets/stylesheets/less/grid.less +0 -8
  121. data/vendor/assets/stylesheets/less/labels.less +0 -32
  122. data/vendor/assets/stylesheets/less/responsive.less +0 -327
  123. data/vendor/assets/stylesheets/less/variables.less +0 -107
  124. data/vendor/assets/stylesheets/scss/grid.scss +0 -8
  125. data/vendor/assets/stylesheets/scss/labels.scss +0 -32
  126. data/vendor/assets/stylesheets/scss/responsive.scss +0 -327
  127. data/vendor/assets/stylesheets/scss/variables.scss +0 -107
@@ -0,0 +1,206 @@
1
+ // Variables.less
2
+ // Variables to customize the look and feel of Bootstrap
3
+ // -----------------------------------------------------
4
+
5
+
6
+
7
+ // GLOBAL VALUES
8
+ // --------------------------------------------------
9
+
10
+
11
+ // Grays
12
+ // -------------------------
13
+ @black: #000;
14
+ @grayDarker: #222;
15
+ @grayDark: #333;
16
+ @gray: #555;
17
+ @grayLight: #999;
18
+ @grayLighter: #eee;
19
+ @white: #fff;
20
+
21
+
22
+ // Accent colors
23
+ // -------------------------
24
+ @blue: #049cdb;
25
+ @blueDark: #0064cd;
26
+ @green: #46a546;
27
+ @red: #9d261d;
28
+ @yellow: #ffc40d;
29
+ @orange: #f89406;
30
+ @pink: #c3325f;
31
+ @purple: #7a43b6;
32
+
33
+
34
+ // Scaffolding
35
+ // -------------------------
36
+ @bodyBackground: @white;
37
+ @textColor: @grayDark;
38
+
39
+
40
+ // Links
41
+ // -------------------------
42
+ @linkColor: #08c;
43
+ @linkColorHover: darken(@linkColor, 15%);
44
+
45
+
46
+ // Typography
47
+ // -------------------------
48
+ @sansFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif;
49
+ @serifFontFamily: Georgia, "Times New Roman", Times, serif;
50
+ @monoFontFamily: Menlo, Monaco, Consolas, "Courier New", monospace;
51
+
52
+ @baseFontSize: 13px;
53
+ @baseFontFamily: @sansFontFamily;
54
+ @baseLineHeight: 18px;
55
+ @altFontFamily: @serifFontFamily;
56
+
57
+ @headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily
58
+ @headingsFontWeight: bold; // instead of browser default, bold
59
+ @headingsColor: inherit; // empty to use BS default, @textColor
60
+
61
+
62
+ // Tables
63
+ // -------------------------
64
+ @tableBackground: transparent; // overall background-color
65
+ @tableBackgroundAccent: #f9f9f9; // for striping
66
+ @tableBackgroundHover: #f5f5f5; // for hover
67
+ @tableBorder: #ddd; // table and cell border
68
+
69
+
70
+ // Buttons
71
+ // -------------------------
72
+ @btnBackground: @white;
73
+ @btnBackgroundHighlight: darken(@white, 10%);
74
+ @btnBorder: #ccc;
75
+
76
+ @btnPrimaryBackground: @linkColor;
77
+ @btnPrimaryBackgroundHighlight: spin(@btnPrimaryBackground, 15%);
78
+
79
+ @btnInfoBackground: #5bc0de;
80
+ @btnInfoBackgroundHighlight: #2f96b4;
81
+
82
+ @btnSuccessBackground: #62c462;
83
+ @btnSuccessBackgroundHighlight: #51a351;
84
+
85
+ @btnWarningBackground: lighten(@orange, 15%);
86
+ @btnWarningBackgroundHighlight: @orange;
87
+
88
+ @btnDangerBackground: #ee5f5b;
89
+ @btnDangerBackgroundHighlight: #bd362f;
90
+
91
+ @btnInverseBackground: @gray;
92
+ @btnInverseBackgroundHighlight: @grayDarker;
93
+
94
+
95
+ // Forms
96
+ // -------------------------
97
+ @inputBackground: @white;
98
+ @inputBorder: #ccc;
99
+ @inputBorderRadius: 3px;
100
+ @inputDisabledBackground: @grayLighter;
101
+ @formActionsBackground: #f5f5f5;
102
+
103
+ // Dropdowns
104
+ // -------------------------
105
+ @dropdownBackground: @white;
106
+ @dropdownBorder: rgba(0,0,0,.2);
107
+ @dropdownLinkColor: @grayDark;
108
+ @dropdownLinkColorHover: @white;
109
+ @dropdownLinkBackgroundHover: @linkColor;
110
+ @dropdownDividerTop: #e5e5e5;
111
+ @dropdownDividerBottom: @white;
112
+
113
+
114
+
115
+ // COMPONENT VARIABLES
116
+ // --------------------------------------------------
117
+
118
+ // Z-index master list
119
+ // -------------------------
120
+ // Used for a bird's eye view of components dependent on the z-axis
121
+ // Try to avoid customizing these :)
122
+ @zindexDropdown: 1000;
123
+ @zindexPopover: 1010;
124
+ @zindexTooltip: 1020;
125
+ @zindexFixedNavbar: 1030;
126
+ @zindexModalBackdrop: 1040;
127
+ @zindexModal: 1050;
128
+
129
+
130
+ // Sprite icons path
131
+ // -------------------------
132
+ @iconSpritePath: "glyphicons-halflings.png";
133
+ @iconWhiteSpritePath: "glyphicons-halflings-white.png";
134
+
135
+
136
+ // Input placeholder text color
137
+ // -------------------------
138
+ @placeholderText: @grayLight;
139
+
140
+
141
+ // Hr border color
142
+ // -------------------------
143
+ @hrBorder: @grayLighter;
144
+
145
+
146
+ // Navbar
147
+ // -------------------------
148
+ @navbarHeight: 40px;
149
+ @navbarBackground: @grayDarker;
150
+ @navbarBackgroundHighlight: @grayDark;
151
+
152
+ @navbarText: @grayLight;
153
+ @navbarLinkColor: @grayLight;
154
+ @navbarLinkColorHover: @white;
155
+ @navbarLinkColorActive: @navbarLinkColorHover;
156
+ @navbarLinkBackgroundHover: transparent;
157
+ @navbarLinkBackgroundActive: @navbarBackground;
158
+
159
+ @navbarSearchBackground: lighten(@navbarBackground, 25%);
160
+ @navbarSearchBackgroundFocus: @white;
161
+ @navbarSearchBorder: darken(@navbarSearchBackground, 30%);
162
+ @navbarSearchPlaceholderColor: #ccc;
163
+ @navbarBrandColor: @navbarLinkColor;
164
+
165
+
166
+ // Hero unit
167
+ // -------------------------
168
+ @heroUnitBackground: @grayLighter;
169
+ @heroUnitHeadingColor: inherit;
170
+ @heroUnitLeadColor: inherit;
171
+
172
+
173
+ // Form states and alerts
174
+ // -------------------------
175
+ @warningText: #c09853;
176
+ @warningBackground: #fcf8e3;
177
+ @warningBorder: darken(spin(@warningBackground, -10), 3%);
178
+
179
+ @errorText: #b94a48;
180
+ @errorBackground: #f2dede;
181
+ @errorBorder: darken(spin(@errorBackground, -10), 3%);
182
+
183
+ @successText: #468847;
184
+ @successBackground: #dff0d8;
185
+ @successBorder: darken(spin(@successBackground, -10), 5%);
186
+
187
+ @infoText: #3a87ad;
188
+ @infoBackground: #d9edf7;
189
+ @infoBorder: darken(spin(@infoBackground, -10), 7%);
190
+
191
+
192
+
193
+ // GRID
194
+ // --------------------------------------------------
195
+
196
+ // Default 940px grid
197
+ // -------------------------
198
+ @gridColumns: 12;
199
+ @gridColumnWidth: 60px;
200
+ @gridGutterWidth: 20px;
201
+ @gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
202
+
203
+ // Fluid grid
204
+ // -------------------------
205
+ @fluidGridColumnWidth: 6.382978723%;
206
+ @fluidGridGutterWidth: 2.127659574%;
@@ -15,3 +15,13 @@
15
15
  border-color: rgba(0,0,0,.15);
16
16
  }
17
17
  }
18
+
19
+ // Sizes
20
+ .well-large {
21
+ padding: 24px;
22
+ .border-radius(6px);
23
+ }
24
+ .well-small {
25
+ padding: 9px;
26
+ .border-radius(3px);
27
+ }
@@ -21,6 +21,11 @@
21
21
  padding: 8px 15px;
22
22
  }
23
23
 
24
+ // General toggle styles
25
+ .accordion-toggle {
26
+ cursor: pointer;
27
+ }
28
+
24
29
  // Inner needs the styles because you can't animate properly with any styles on the element
25
30
  .accordion-inner {
26
31
  padding: 9px 15px;
@@ -9,10 +9,10 @@
9
9
  background-color: $warningBackground;
10
10
  border: 1px solid $warningBorder;
11
11
  @include border-radius(4px);
12
+ color: $warningText;
12
13
  }
13
- .alert,
14
14
  .alert-heading {
15
- color: $warningText;
15
+ color: inherit;
16
16
  }
17
17
 
18
18
  // Adjust close link position
@@ -28,33 +28,21 @@
28
28
 
29
29
  .alert-success {
30
30
  background-color: $successBackground;
31
- border-color: $successBorder;
32
- }
33
- .alert-success,
34
- .alert-success .alert-heading {
31
+ border-color: $successBorder;
35
32
  color: $successText;
36
33
  }
37
34
  .alert-danger,
38
35
  .alert-error {
39
36
  background-color: $errorBackground;
40
37
  border-color: $errorBorder;
41
- }
42
- .alert-danger,
43
- .alert-error,
44
- .alert-danger .alert-heading,
45
- .alert-error .alert-heading {
46
38
  color: $errorText;
47
39
  }
48
40
  .alert-info {
49
41
  background-color: $infoBackground;
50
42
  border-color: $infoBorder;
51
- }
52
- .alert-info,
53
- .alert-info .alert-heading {
54
43
  color: $infoText;
55
44
  }
56
45
 
57
-
58
46
  // Block alerts
59
47
  // ------------------------
60
48
  .alert-block {
@@ -4,12 +4,14 @@
4
4
  .breadcrumb {
5
5
  padding: 7px 14px;
6
6
  margin: 0 0 $baseLineHeight;
7
+ list-style: none;
7
8
  @include gradient-vertical($white, #f5f5f5);
8
9
  border: 1px solid #ddd;
9
10
  @include border-radius(3px);
10
11
  @include box-shadow(inset 0 1px 0 $white);
11
12
  li {
12
13
  display: inline-block;
14
+ @include ie7-inline-block();
13
15
  text-shadow: 0 1px 0 $white;
14
16
  }
15
17
  .divider {
@@ -25,14 +25,14 @@
25
25
  }
26
26
 
27
27
  // Float them, remove border radius, then re-add to first and last elements
28
- .btn-group .btn {
28
+ .btn-group > .btn {
29
29
  position: relative;
30
30
  float: left;
31
31
  margin-left: -1px;
32
32
  @include border-radius(0);
33
33
  }
34
34
  // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
35
- .btn-group .btn:first-child {
35
+ .btn-group > .btn:first-child {
36
36
  margin-left: 0;
37
37
  -webkit-border-top-left-radius: 4px;
38
38
  -moz-border-radius-topleft: 4px;
@@ -41,8 +41,9 @@
41
41
  -moz-border-radius-bottomleft: 4px;
42
42
  border-bottom-left-radius: 4px;
43
43
  }
44
- .btn-group .btn:last-child,
45
- .btn-group .dropdown-toggle {
44
+ // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
45
+ .btn-group > .btn:last-child,
46
+ .btn-group > .dropdown-toggle {
46
47
  -webkit-border-top-right-radius: 4px;
47
48
  -moz-border-radius-topright: 4px;
48
49
  border-top-right-radius: 4px;
@@ -51,7 +52,7 @@
51
52
  border-bottom-right-radius: 4px;
52
53
  }
53
54
  // Reset corners for large buttons
54
- .btn-group .btn.large:first-child {
55
+ .btn-group > .btn.large:first-child {
55
56
  margin-left: 0;
56
57
  -webkit-border-top-left-radius: 6px;
57
58
  -moz-border-radius-topleft: 6px;
@@ -60,8 +61,8 @@
60
61
  -moz-border-radius-bottomleft: 6px;
61
62
  border-bottom-left-radius: 6px;
62
63
  }
63
- .btn-group .btn.large:last-child,
64
- .btn-group .large.dropdown-toggle {
64
+ .btn-group > .btn.large:last-child,
65
+ .btn-group > .large.dropdown-toggle {
65
66
  -webkit-border-top-right-radius: 6px;
66
67
  -moz-border-radius-topright: 6px;
67
68
  border-top-right-radius: 6px;
@@ -71,10 +72,10 @@
71
72
  }
72
73
 
73
74
  // On hover/focus/active, bring the proper btn to front
74
- .btn-group .btn:hover,
75
- .btn-group .btn:focus,
76
- .btn-group .btn:active,
77
- .btn-group .btn.active {
75
+ .btn-group > .btn:hover,
76
+ .btn-group > .btn:focus,
77
+ .btn-group > .btn:active,
78
+ .btn-group > .btn.active {
78
79
  z-index: 2;
79
80
  }
80
81
 
@@ -90,34 +91,60 @@
90
91
  // ----------------------
91
92
 
92
93
  // Give the line between buttons some depth
93
- .btn-group .dropdown-toggle {
94
+ .btn-group > .dropdown-toggle {
94
95
  padding-left: 8px;
95
96
  padding-right: 8px;
96
- $shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
97
- @include box-shadow($shadow);
98
- *padding-top: 5px;
99
- *padding-bottom: 5px;
97
+ @include box-shadow(#{inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)});
98
+ *padding-top: 4px;
99
+ *padding-bottom: 4px;
100
+ }
101
+ .btn-group > .btn-mini.dropdown-toggle {
102
+ padding-left: 5px;
103
+ padding-right: 5px;
104
+ }
105
+ .btn-group > .btn-small.dropdown-toggle {
106
+ *padding-top: 4px;
107
+ *padding-bottom: 4px;
108
+ }
109
+ .btn-group > .btn-large.dropdown-toggle {
110
+ padding-left: 12px;
111
+ padding-right: 12px;
100
112
  }
101
113
 
102
114
  .btn-group.open {
103
- // IE7's z-index only goes to the nearest positioned ancestor, which would
104
- // make the menu appear below buttons that appeared later on the page
105
- *z-index: $zindexDropdown;
106
-
107
- // Reposition menu on open and round all corners
108
- .dropdown-menu {
109
- display: block;
110
- margin-top: 1px;
111
- @include border-radius(5px);
112
- }
113
115
 
116
+ // The clickable button for toggling the menu
117
+ // Remove the gradient and set the same inset shadow as the :active state
114
118
  .dropdown-toggle {
115
119
  background-image: none;
116
- $shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
117
- @include box-shadow($shadow);
120
+ @include box-shadow(#{inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)});
121
+ }
122
+
123
+ // Keep the hover's background when dropdown is open
124
+ .btn.dropdown-toggle {
125
+ background-color: $btnBackgroundHighlight;
126
+ }
127
+ .btn-primary.dropdown-toggle {
128
+ background-color: $btnPrimaryBackgroundHighlight;
129
+ }
130
+ .btn-warning.dropdown-toggle {
131
+ background-color: $btnWarningBackgroundHighlight;
132
+ }
133
+ .btn-danger.dropdown-toggle {
134
+ background-color: $btnDangerBackgroundHighlight;
135
+ }
136
+ .btn-success.dropdown-toggle {
137
+ background-color: $btnSuccessBackgroundHighlight;
138
+ }
139
+ .btn-info.dropdown-toggle {
140
+ background-color: $btnInfoBackgroundHighlight;
141
+ }
142
+ .btn-inverse.dropdown-toggle {
143
+ background-color: $btnInverseBackgroundHighlight;
118
144
  }
119
145
  }
120
146
 
147
+
121
148
  // Reposition the caret
122
149
  .btn .caret {
123
150
  margin-top: 7px;
@@ -127,22 +154,38 @@
127
154
  .open.btn-group .caret {
128
155
  @include opacity(100);
129
156
  }
157
+ // Carets in other button sizes
158
+ .btn-mini .caret {
159
+ margin-top: 5px;
160
+ }
161
+ .btn-small .caret {
162
+ margin-top: 6px;
163
+ }
164
+ .btn-large .caret {
165
+ margin-top: 6px;
166
+ border-left-width: 5px;
167
+ border-right-width: 5px;
168
+ border-top-width: 5px;
169
+ }
170
+ // Upside down carets for .dropup
171
+ .dropup .btn-large .caret {
172
+ border-bottom: 5px solid $black;
173
+ border-top: 0;
174
+ }
175
+
130
176
 
131
177
 
132
178
  // Account for other colors
133
179
  .btn-primary,
180
+ .btn-warning,
134
181
  .btn-danger,
135
182
  .btn-info,
136
183
  .btn-success,
137
184
  .btn-inverse {
138
185
  .caret {
139
186
  border-top-color: $white;
187
+ border-bottom-color: $white;
140
188
  @include opacity(75);
141
189
  }
142
190
  }
143
191
 
144
- // Small button dropdowns
145
- .btn-small .caret {
146
- margin-top: 4px;
147
- }
148
-