twitter-bootstrap-rails 2.0 → 2.0.1.0

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 (77) hide show
  1. data/README.md +31 -37
  2. data/Rakefile +11 -0
  3. data/lib/generators/bootstrap/install/install_generator.rb +37 -13
  4. data/lib/generators/bootstrap/install/templates/application.css +0 -1
  5. data/lib/generators/bootstrap/install/templates/bootstrap.coffee +6 -15
  6. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +13 -0
  7. data/lib/generators/bootstrap/layout/layout_generator.rb +4 -4
  8. data/lib/generators/bootstrap/layout/templates/layout.html.erb +96 -49
  9. data/lib/generators/bootstrap/layout/templates/layout.html.haml +76 -0
  10. data/lib/generators/bootstrap/layout/templates/layout.html.slim +77 -0
  11. data/lib/generators/bootstrap/themed/templates/_form.html.erb +5 -4
  12. data/lib/generators/bootstrap/themed/templates/_form.html.haml +11 -0
  13. data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -0
  14. data/lib/generators/bootstrap/themed/templates/edit.html.erb +1 -2
  15. data/lib/generators/bootstrap/themed/templates/edit.html.haml +3 -0
  16. data/lib/generators/bootstrap/themed/templates/edit.html.slim +3 -0
  17. data/lib/generators/bootstrap/themed/templates/index.html.erb +27 -28
  18. data/lib/generators/bootstrap/themed/templates/index.html.haml +25 -0
  19. data/lib/generators/bootstrap/themed/templates/index.html.slim +25 -0
  20. data/lib/generators/bootstrap/themed/templates/new.html.haml +2 -0
  21. data/lib/generators/bootstrap/themed/templates/new.html.slim +2 -0
  22. data/lib/generators/bootstrap/themed/templates/show.html.erb +5 -4
  23. data/lib/generators/bootstrap/themed/templates/show.html.haml +9 -0
  24. data/lib/generators/bootstrap/themed/templates/show.html.slim +9 -0
  25. data/lib/generators/bootstrap/themed/themed_generator.rb +13 -13
  26. data/lib/twitter/bootstrap/rails/version.rb +1 -1
  27. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  28. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  29. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +16 -7
  30. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +3 -3
  31. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +7 -4
  32. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +7 -5
  33. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +16 -7
  34. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +12 -7
  35. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +5 -5
  36. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +4 -3
  37. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +11 -6
  38. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +2 -2
  39. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +3 -3
  40. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +40 -21
  41. data/vendor/toolkit/twitter/bootstrap/accordion.less +5 -4
  42. data/vendor/toolkit/twitter/bootstrap/alerts.less +1 -0
  43. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +10 -8
  44. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +1 -1
  45. data/vendor/toolkit/twitter/bootstrap/button-groups.less +49 -17
  46. data/vendor/toolkit/twitter/bootstrap/buttons.less +156 -89
  47. data/vendor/toolkit/twitter/bootstrap/carousel.less +12 -5
  48. data/vendor/toolkit/twitter/bootstrap/code.less +57 -0
  49. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +24 -4
  50. data/vendor/toolkit/twitter/bootstrap/forms.less +117 -91
  51. data/vendor/toolkit/twitter/bootstrap/grid.less +8 -0
  52. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +20 -0
  53. data/vendor/toolkit/twitter/bootstrap/labels.less +23 -7
  54. data/vendor/toolkit/twitter/bootstrap/layouts.less +17 -0
  55. data/vendor/toolkit/twitter/bootstrap/mixins.less +253 -36
  56. data/vendor/toolkit/twitter/bootstrap/modals.less +20 -2
  57. data/vendor/toolkit/twitter/bootstrap/navbar.less +82 -34
  58. data/vendor/toolkit/twitter/bootstrap/navs.less +87 -72
  59. data/vendor/toolkit/twitter/bootstrap/pager.less +7 -2
  60. data/vendor/toolkit/twitter/bootstrap/pagination.less +1 -0
  61. data/vendor/toolkit/twitter/bootstrap/popovers.less +25 -25
  62. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +14 -18
  63. data/vendor/toolkit/twitter/bootstrap/reset.less +3 -4
  64. data/vendor/toolkit/twitter/bootstrap/responsive.less +224 -165
  65. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +6 -89
  66. data/vendor/toolkit/twitter/bootstrap/sprites.less +139 -99
  67. data/vendor/toolkit/twitter/bootstrap/tables.less +15 -57
  68. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +4 -2
  69. data/vendor/toolkit/twitter/bootstrap/type.less +15 -44
  70. data/vendor/toolkit/twitter/bootstrap/variables.less +38 -21
  71. data/vendor/toolkit/twitter/bootstrap_base.less +2 -0
  72. metadata +36 -21
  73. data/lib/generators/bootstrap/install/templates/bootstrap.less +0 -5
  74. data/vendor/assets/stylesheets/twitter/bootstrap.css.less +0 -1
  75. data/vendor/toolkit/twitter/bootstrap.less +0 -1
  76. data/vendor/toolkit/twitter/bootstrap/patterns.less +0 -30
  77. data/vendor/toolkit/twitter/bootstrap/print.less +0 -18
@@ -3,6 +3,7 @@
3
3
 
4
4
  .carousel {
5
5
  position: relative;
6
+ margin-bottom: @baseLineHeight;
6
7
  line-height: 1;
7
8
  }
8
9
 
@@ -26,15 +27,15 @@
26
27
  line-height: 1;
27
28
  }
28
29
 
29
- .active,
30
- .next,
30
+ .active,
31
+ .next,
31
32
  .prev { display: block; }
32
33
 
33
34
  .active {
34
35
  left: 0;
35
36
  }
36
37
 
37
- .next,
38
+ .next,
38
39
  .prev {
39
40
  position: absolute;
40
41
  top: 0;
@@ -47,7 +48,7 @@
47
48
  .prev {
48
49
  left: -100%;
49
50
  }
50
- .next.left,
51
+ .next.left,
51
52
  .prev.right {
52
53
  left: 0;
53
54
  }
@@ -80,7 +81,13 @@
80
81
  border: 3px solid @white;
81
82
  .border-radius(23px);
82
83
  .opacity(50);
83
- .transition(all .2s linear);
84
+
85
+ // we can't have this transition here
86
+ // because webkit cancels the carousel
87
+ // animation if you trip this while
88
+ // in the middle of another animation
89
+ // ;_;
90
+ // .transition(opacity .2s linear);
84
91
 
85
92
  // Reposition the right one
86
93
  &.right {
@@ -0,0 +1,57 @@
1
+ // Code.less
2
+ // Code typography styles for the <code> and <pre> elements
3
+ // --------------------------------------------------------
4
+
5
+ // Inline and block code styles
6
+ code,
7
+ pre {
8
+ padding: 0 3px 2px;
9
+ #font > #family > .monospace;
10
+ font-size: @baseFontSize - 1;
11
+ color: @grayDark;
12
+ .border-radius(3px);
13
+ }
14
+
15
+ // Inline code
16
+ code {
17
+ padding: 3px 4px;
18
+ color: #d14;
19
+ background-color: #f7f7f9;
20
+ border: 1px solid #e1e1e8;
21
+ }
22
+
23
+ // Blocks of code
24
+ pre {
25
+ display: block;
26
+ padding: (@baseLineHeight - 1) / 2;
27
+ margin: 0 0 @baseLineHeight / 2;
28
+ font-size: 12px;
29
+ line-height: @baseLineHeight;
30
+ background-color: #f5f5f5;
31
+ border: 1px solid #ccc; // fallback for IE7-8
32
+ border: 1px solid rgba(0,0,0,.15);
33
+ .border-radius(4px);
34
+ white-space: pre;
35
+ white-space: pre-wrap;
36
+ word-break: break-all;
37
+ word-wrap: break-word;
38
+
39
+ // Make prettyprint styles more spaced out for readability
40
+ &.prettyprint {
41
+ margin-bottom: @baseLineHeight;
42
+ }
43
+
44
+ // Account for some code outputs that place code tags in pre tags
45
+ code {
46
+ padding: 0;
47
+ color: inherit;
48
+ background-color: transparent;
49
+ border: 0;
50
+ }
51
+ }
52
+
53
+ // Enable scrollable blocks of code
54
+ .pre-scrollable {
55
+ max-height: 340px;
56
+ overflow-y: scroll;
57
+ }
@@ -5,12 +5,23 @@
5
5
  .dropdown {
6
6
  position: relative;
7
7
  }
8
+ .dropdown-toggle {
9
+ // The caret makes the toggle a bit too tall in IE7
10
+ *margin-bottom: -3px;
11
+ }
12
+ .dropdown-toggle:active,
13
+ .open .dropdown-toggle {
14
+ outline: 0;
15
+ }
8
16
  // Dropdown arrow/caret
9
17
  .caret {
10
18
  display: inline-block;
11
19
  width: 0;
12
20
  height: 0;
13
21
  text-indent: -99999px;
22
+ // IE7 won't do the border trick if there's a text indent, but it doesn't
23
+ // do the content that text-indent is hiding, either, so we're ok.
24
+ *text-indent: 0;
14
25
  vertical-align: top;
15
26
  border-left: 4px solid transparent;
16
27
  border-right: 4px solid transparent;
@@ -21,7 +32,6 @@
21
32
  .dropdown .caret {
22
33
  margin-top: 8px;
23
34
  margin-left: 2px;
24
- *margin-top: 7px;
25
35
  }
26
36
  .dropdown:hover .caret,
27
37
  .open.dropdown .caret {
@@ -31,11 +41,11 @@
31
41
  .dropdown-menu {
32
42
  position: absolute;
33
43
  top: 100%;
44
+ left: 0;
34
45
  z-index: @zindexDropdown;
35
46
  float: left;
36
47
  display: none; // none by default, but block on "open" of the menu
37
48
  min-width: 160px;
38
- max-width: 220px;
39
49
  _width: 160px;
40
50
  padding: 4px 0;
41
51
  margin: 0; // override default ul
@@ -50,7 +60,6 @@
50
60
  -webkit-background-clip: padding-box;
51
61
  -moz-background-clip: padding;
52
62
  background-clip: padding-box;
53
- zoom: 1; // do we need this?
54
63
  *border-right-width: 2px;
55
64
  *border-bottom-width: 2px;
56
65
 
@@ -68,6 +77,13 @@
68
77
  overflow: hidden;
69
78
  background-color: #e5e5e5;
70
79
  border-bottom: 1px solid @white;
80
+
81
+ // IE7 needs a set width since we gave a height. Restricting just
82
+ // to IE7 to keep the 1px left/right space in other browsers.
83
+ // It is unclear where IE is getting the extra space that we need
84
+ // to negative-margin away, but so it goes.
85
+ *width: 100%;
86
+ *margin: -5px 0 5px;
71
87
  }
72
88
 
73
89
  // Links within the dropdown menu
@@ -76,7 +92,7 @@
76
92
  padding: 3px 15px;
77
93
  clear: both;
78
94
  font-weight: normal;
79
- line-height: 18px;
95
+ line-height: @baseLineHeight;
80
96
  color: @gray;
81
97
  white-space: nowrap;
82
98
  }
@@ -93,6 +109,10 @@
93
109
 
94
110
  // Open state for the dropdown
95
111
  .dropdown.open {
112
+ // IE7's z-index only goes to the nearest positioned ancestor, which would
113
+ // make the menu appear below buttons that appeared later on the page
114
+ *z-index: @zindexDropdown;
115
+
96
116
  .dropdown-toggle {
97
117
  color: @white;
98
118
  background: #ccc;
@@ -28,7 +28,12 @@ legend {
28
28
  color: @grayDark;
29
29
  border: 0;
30
30
  border-bottom: 1px solid #eee;
31
- -webkit-margin-collapse: separate;
31
+
32
+ // Small
33
+ small {
34
+ font-size: @baseLineHeight * .75;
35
+ color: @grayLight;
36
+ }
32
37
  }
33
38
 
34
39
  // Set font for forms
@@ -37,7 +42,13 @@ input,
37
42
  button,
38
43
  select,
39
44
  textarea {
40
- #font > .sans-serif(@baseFontSize,normal,@baseLineHeight);
45
+ #font > .shorthand(@baseFontSize,normal,@baseLineHeight); // Set size, weight, line-height here
46
+ }
47
+ input,
48
+ button,
49
+ select,
50
+ textarea {
51
+ #font > #family > .sans-serif(); // And only set font-family here for those that need it (note the missing label element)
41
52
  }
42
53
 
43
54
  // Identify controls by their labels
@@ -68,22 +79,34 @@ select,
68
79
  height: auto;
69
80
  }
70
81
 
82
+ // Inputs within a label
83
+ label input,
84
+ label textarea,
85
+ label select {
86
+ display: block;
87
+ }
88
+
71
89
  // Mini reset for unique input types
72
- input[type=image],
73
- input[type=checkbox],
74
- input[type=radio] {
90
+ input[type="image"],
91
+ input[type="checkbox"],
92
+ input[type="radio"] {
75
93
  width: auto;
76
94
  height: auto;
77
95
  padding: 0;
78
96
  margin: 3px 0;
79
97
  *margin-top: 0; /* IE7 */
80
98
  line-height: normal;
81
- border: none;
82
99
  cursor: pointer;
100
+ .border-radius(0);
101
+ border: 0 \9; /* IE9 and down */
102
+ }
103
+ input[type="image"] {
104
+ border: 0;
83
105
  }
84
106
 
85
107
  // Reset the file input to browser defaults
86
- input[type=file] {
108
+ input[type="file"] {
109
+ width: auto;
87
110
  padding: initial;
88
111
  line-height: initial;
89
112
  border: initial;
@@ -93,25 +116,29 @@ input[type=file] {
93
116
  }
94
117
 
95
118
  // Help out input buttons
96
- input[type=button],
97
- input[type=reset],
98
- input[type=submit] {
119
+ input[type="button"],
120
+ input[type="reset"],
121
+ input[type="submit"] {
99
122
  width: auto;
100
123
  height: auto;
101
124
  }
102
125
 
103
126
  // Set the height of select and file controls to match text inputs
104
127
  select,
105
- input[type=file] {
128
+ input[type="file"] {
106
129
  height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */
107
130
  *margin-top: 4px; /* For IE7, add top margin to align select with labels */
108
131
  line-height: 28px;
109
132
  }
110
133
 
134
+ // Reset line-height for IE
135
+ input[type="file"] {
136
+ line-height: 18px \9;
137
+ }
138
+
111
139
  // Chrome on Linux and Mobile Safari need background-color
112
140
  select {
113
141
  width: 220px; // default input width + 10px of padding that doesn't get applied
114
- vertical-align: baseline;
115
142
  background-color: @white;
116
143
  }
117
144
 
@@ -122,14 +149,20 @@ select[size] {
122
149
  }
123
150
 
124
151
  // Remove shadow from image inputs
125
- input[type=image] {
152
+ input[type="image"] {
126
153
  .box-shadow(none);
127
154
  }
128
155
 
156
+ // Make textarea height behave
129
157
  textarea {
130
158
  height: auto;
131
159
  }
132
160
 
161
+ // Hidden inputs
162
+ input[type="hidden"] {
163
+ display: none;
164
+ }
165
+
133
166
 
134
167
 
135
168
  // CHECKBOXES & RADIOS
@@ -140,8 +173,8 @@ textarea {
140
173
  .checkbox {
141
174
  padding-left: 18px;
142
175
  }
143
- .radio input[type=radio],
144
- .checkbox input[type=checkbox] {
176
+ .radio input[type="radio"],
177
+ .checkbox input[type="checkbox"] {
145
178
  float: left;
146
179
  margin-left: -18px;
147
180
  }
@@ -149,14 +182,17 @@ textarea {
149
182
  // Move the options list down to align with labels
150
183
  .controls > .radio:first-child,
151
184
  .controls > .checkbox:first-child {
152
- padding-top: 6px; // has to be padding because margin collaspes
185
+ padding-top: 5px; // has to be padding because margin collaspes
153
186
  }
154
187
 
155
188
  // Radios and checkboxes on same line
189
+ // TODO v3: Convert .inline to .control-inline
156
190
  .radio.inline,
157
191
  .checkbox.inline {
158
192
  display: inline-block;
193
+ padding-top: 5px;
159
194
  margin-bottom: 0;
195
+ vertical-align: middle;
160
196
  }
161
197
  .radio.inline + .radio.inline,
162
198
  .checkbox.inline + .checkbox.inline {
@@ -180,12 +216,14 @@ textarea:focus {
180
216
  @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
181
217
  .box-shadow(@shadow);
182
218
  outline: 0;
219
+ outline: thin dotted \9; /* IE6-9 */
183
220
  }
184
- input[type=file]:focus,
185
- input[type=checkbox]:focus,
221
+ input[type="file"]:focus,
222
+ input[type="radio"]:focus,
223
+ input[type="checkbox"]:focus,
186
224
  select:focus {
187
225
  .box-shadow(none); // override for file inputs
188
- outline: 1px dotted #666; // Selet elements don't get box-shadow styles, so instead we do outline
226
+ .tab-focus();
189
227
  }
190
228
 
191
229
 
@@ -210,45 +248,13 @@ textarea[class*="span"],
210
248
  margin-left: 0;
211
249
  }
212
250
 
213
- // This is a duplication of the main grid .columns() mixin, but subtracts 10px to account for input padding and border
214
- .inputColumns(@columnSpan: 1) {
215
- width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 10;
216
- }
217
- input,
218
- textarea,
219
- .uneditable-input {
220
- // Default columns
221
- &.span1 { .inputColumns(1); }
222
- &.span2 { .inputColumns(2); }
223
- &.span3 { .inputColumns(3); }
224
- &.span4 { .inputColumns(4); }
225
- &.span5 { .inputColumns(5); }
226
- &.span6 { .inputColumns(6); }
227
- &.span7 { .inputColumns(7); }
228
- &.span8 { .inputColumns(8); }
229
- &.span9 { .inputColumns(9); }
230
- &.span10 { .inputColumns(10); }
231
- &.span11 { .inputColumns(11); }
232
- &.span12 { .inputColumns(12); }
233
- }
234
-
235
- .selectColumns(@columnSpan: 1) {
236
- width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) + 10;
237
- }
238
- select {
239
- &.span1 { .selectColumns(1); }
240
- &.span2 { .selectColumns(2); }
241
- &.span3 { .selectColumns(3); }
242
- &.span4 { .selectColumns(4); }
243
- &.span5 { .selectColumns(5); }
244
- &.span6 { .selectColumns(6); }
245
- &.span7 { .selectColumns(7); }
246
- &.span8 { .selectColumns(8); }
247
- &.span9 { .selectColumns(9); }
248
- &.span10 { .selectColumns(10); }
249
- &.span11 { .selectColumns(11); }
250
- &.span12 { .selectColumns(12); }
251
- }
251
+
252
+
253
+ // GRID SIZING FOR INPUTS
254
+ // ----------------------
255
+
256
+ #inputGridSystem > .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth);
257
+
252
258
 
253
259
 
254
260
 
@@ -273,33 +279,6 @@ textarea[readonly] {
273
279
  // FORM FIELD FEEDBACK STATES
274
280
  // --------------------------
275
281
 
276
- // Mixin for form field states
277
- .formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) {
278
- // Set the text color
279
- > label,
280
- .help-block,
281
- .help-inline {
282
- color: @textColor;
283
- }
284
- // Style inputs accordingly
285
- input,
286
- select,
287
- textarea {
288
- color: @textColor;
289
- border-color: @borderColor;
290
- &:focus {
291
- border-color: darken(@borderColor, 10%);
292
- .box-shadow(0 0 6px lighten(@borderColor, 20%));
293
- }
294
- }
295
- // Give a small background color for input-prepend/-append
296
- .input-prepend .add-on,
297
- .input-append .add-on {
298
- color: @textColor;
299
- background-color: @backgroundColor;
300
- border-color: @textColor;
301
- }
302
- }
303
282
  // Warning
304
283
  .control-group.warning {
305
284
  .formFieldState(@warningText, @warningText, @warningBackground);
@@ -357,15 +336,17 @@ select:focus:required:invalid {
357
336
  // ---------
358
337
 
359
338
  .help-block {
339
+ display: block; // account for any element using help-block
360
340
  margin-top: 5px;
361
341
  margin-bottom: 0;
362
342
  color: @grayLight;
363
343
  }
364
344
 
365
345
  .help-inline {
366
- *position: relative; /* IE6-7 */
367
- *top: -5px; /* IE6-7 */
368
- display: inline;
346
+ display: inline-block;
347
+ .ie7-inline-block();
348
+ margin-bottom: 9px;
349
+ vertical-align: middle;
369
350
  padding-left: 5px;
370
351
  }
371
352
 
@@ -382,6 +363,10 @@ select:focus:required:invalid {
382
363
  input,
383
364
  .uneditable-input {
384
365
  .border-radius(0 3px 3px 0);
366
+ &:focus {
367
+ position: relative;
368
+ z-index: 2;
369
+ }
385
370
  }
386
371
  .uneditable-input {
387
372
  border-left-color: #ccc;
@@ -393,7 +378,7 @@ select:focus:required:invalid {
393
378
  min-width: 16px;
394
379
  height: @baseLineHeight;
395
380
  margin-right: -1px;
396
- padding: 4px 4px 4px 5px;
381
+ padding: 4px 5px;
397
382
  font-weight: normal;
398
383
  line-height: @baseLineHeight;
399
384
  color: @grayLight;
@@ -420,6 +405,7 @@ select:focus:required:invalid {
420
405
  .border-radius(3px 0 0 3px);
421
406
  }
422
407
  .uneditable-input {
408
+ border-left-color: #eee;
423
409
  border-right-color: #ccc;
424
410
  }
425
411
  .add-on {
@@ -427,6 +413,15 @@ select:focus:required:invalid {
427
413
  margin-left: -1px;
428
414
  .border-radius(0 3px 3px 0);
429
415
  }
416
+ input:first-child {
417
+ // In IE7, having a hasLayout container (from clearfix's zoom:1) can make the first input
418
+ // inherit the sum of its ancestors' margins.
419
+ *margin-left: -160px;
420
+
421
+ &+.add-on {
422
+ *margin-left: -21px;
423
+ }
424
+ }
430
425
  }
431
426
 
432
427
 
@@ -455,21 +450,51 @@ select:focus:required:invalid {
455
450
  input,
456
451
  textarea,
457
452
  select,
453
+ .help-inline,
458
454
  .uneditable-input {
459
455
  display: inline-block;
460
456
  margin-bottom: 0;
461
457
  }
458
+ // Re-hide hidden elements due to specifity
459
+ .hide {
460
+ display: none;
461
+ }
462
462
  }
463
463
  .form-search label,
464
- .form-inline label {
464
+ .form-inline label,
465
+ .form-search .input-append,
466
+ .form-inline .input-append,
467
+ .form-search .input-prepend,
468
+ .form-inline .input-prepend {
465
469
  display: inline-block;
466
470
  }
471
+ // Make the prepend and append add-on vertical-align: middle;
472
+ .form-search .input-append .add-on,
473
+ .form-inline .input-prepend .add-on,
474
+ .form-search .input-append .add-on,
475
+ .form-inline .input-prepend .add-on {
476
+ vertical-align: middle;
477
+ }
478
+ // Inline checkbox/radio labels
479
+ .form-search .radio,
480
+ .form-inline .radio,
481
+ .form-search .checkbox,
482
+ .form-inline .checkbox {
483
+ margin-bottom: 0;
484
+ vertical-align: middle;
485
+ }
467
486
 
468
487
  // Margin to space out fieldsets
469
488
  .control-group {
470
489
  margin-bottom: @baseLineHeight / 2;
471
490
  }
472
491
 
492
+ // Legend collapses margin, so next element is responsible for spacing
493
+ legend + .control-group {
494
+ margin-top: @baseLineHeight;
495
+ -webkit-margin-top-collapse: separate;
496
+ }
497
+
473
498
  // Horizontal-specific styles
474
499
  // --------------------------
475
500
 
@@ -477,9 +502,10 @@ select:focus:required:invalid {
477
502
  // Increase spacing between groups
478
503
  .control-group {
479
504
  margin-bottom: @baseLineHeight;
505
+ .clearfix();
480
506
  }
481
507
  // Float the labels left
482
- .control-group > label {
508
+ .control-label {
483
509
  float: left;
484
510
  width: 140px;
485
511
  padding-top: 5px;