bootstrapped 1.0.1 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. data/.gitmodules +3 -0
  2. data/README.rdoc +7 -1
  3. data/bootstrapped.gemspec +1 -1
  4. data/lib/bootstrapped/engine.rb +1 -1
  5. data/lib/bootstrapped/version.rb +2 -1
  6. data/vendor/assets/javascripts/bootstrap-alert.js +28 -29
  7. data/vendor/assets/javascripts/bootstrap-button.js +32 -34
  8. data/vendor/assets/javascripts/bootstrap-carousel.js +34 -19
  9. data/vendor/assets/javascripts/bootstrap-collapse.js +47 -26
  10. data/vendor/assets/javascripts/bootstrap-dropdown.js +18 -10
  11. data/vendor/assets/javascripts/bootstrap-modal.js +26 -18
  12. data/vendor/assets/javascripts/bootstrap-popover.js +13 -10
  13. data/vendor/assets/javascripts/bootstrap-scrollspy.js +43 -17
  14. data/vendor/assets/javascripts/bootstrap-tab.js +12 -7
  15. data/vendor/assets/javascripts/bootstrap-tooltip.js +40 -35
  16. data/vendor/assets/javascripts/bootstrap-transition.js +31 -21
  17. data/vendor/assets/javascripts/bootstrap-typeahead.js +30 -16
  18. data/vendor/assets/stylesheets/twitter/bootstrap/static/bootstrap-responsive.css +808 -0
  19. data/vendor/assets/stylesheets/twitter/bootstrap/static/bootstrap.css +2314 -850
  20. data/vendor/less/twitter/bootstrap/less/accordion.less +5 -0
  21. data/vendor/less/twitter/bootstrap/less/alerts.less +2 -14
  22. data/vendor/less/twitter/bootstrap/less/bootstrap.less +2 -2
  23. data/vendor/less/twitter/bootstrap/less/breadcrumbs.less +3 -1
  24. data/vendor/less/twitter/bootstrap/less/button-groups.less +78 -34
  25. data/vendor/less/twitter/bootstrap/less/buttons.less +53 -27
  26. data/vendor/less/twitter/bootstrap/less/carousel.less +0 -0
  27. data/vendor/less/twitter/bootstrap/less/close.less +12 -1
  28. data/vendor/less/twitter/bootstrap/less/code.less +18 -5
  29. data/vendor/less/twitter/bootstrap/less/component-animations.less +9 -7
  30. data/vendor/less/twitter/bootstrap/less/dropdowns.less +59 -47
  31. data/vendor/less/twitter/bootstrap/less/forms.less +167 -98
  32. data/vendor/less/twitter/bootstrap/less/grid.less +2 -5
  33. data/vendor/less/twitter/bootstrap/less/hero-unit.less +3 -1
  34. data/vendor/less/twitter/bootstrap/less/labels-badges.less +55 -0
  35. data/vendor/less/twitter/bootstrap/less/layouts.less +1 -1
  36. data/vendor/less/twitter/bootstrap/less/mixins.less +261 -167
  37. data/vendor/less/twitter/bootstrap/less/modals.less +22 -4
  38. data/vendor/less/twitter/bootstrap/less/navbar.less +147 -75
  39. data/vendor/less/twitter/bootstrap/less/navs.less +72 -53
  40. data/vendor/less/twitter/bootstrap/less/pager.less +6 -0
  41. data/vendor/less/twitter/bootstrap/less/pagination.less +1 -0
  42. data/vendor/less/twitter/bootstrap/less/popovers.less +0 -0
  43. data/vendor/less/twitter/bootstrap/less/progress-bars.less +27 -5
  44. data/vendor/less/twitter/bootstrap/less/reset.less +4 -4
  45. data/vendor/less/twitter/bootstrap/less/responsive-1200px-min.less +26 -0
  46. data/vendor/less/twitter/bootstrap/less/responsive-767px-max.less +149 -0
  47. data/vendor/less/twitter/bootstrap/less/responsive-768px-979px.less +17 -0
  48. data/vendor/less/twitter/bootstrap/less/responsive-navbar.less +146 -0
  49. data/vendor/less/twitter/bootstrap/less/responsive-utilities.less +41 -0
  50. data/vendor/less/twitter/bootstrap/less/responsive.less +14 -289
  51. data/vendor/less/twitter/bootstrap/less/scaffolding.less +4 -4
  52. data/vendor/less/twitter/bootstrap/less/sprites.less +47 -12
  53. data/vendor/less/twitter/bootstrap/less/tables.less +59 -22
  54. data/vendor/less/twitter/bootstrap/less/thumbnails.less +15 -3
  55. data/vendor/less/twitter/bootstrap/less/tooltip.less +0 -0
  56. data/vendor/less/twitter/bootstrap/less/type.less +30 -12
  57. data/vendor/less/twitter/bootstrap/less/utilities.less +0 -0
  58. data/vendor/less/twitter/bootstrap/less/variables.less +119 -13
  59. data/vendor/less/twitter/bootstrap/less/wells.less +10 -0
  60. metadata +30 -22
@@ -2,6 +2,7 @@
2
2
  // --------------
3
3
 
4
4
  // Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
5
+ .dropup,
5
6
  .dropdown {
6
7
  position: relative;
7
8
  }
@@ -13,78 +14,64 @@
13
14
  .open .dropdown-toggle {
14
15
  outline: 0;
15
16
  }
17
+
16
18
  // Dropdown arrow/caret
19
+ // --------------------
17
20
  .caret {
18
21
  display: inline-block;
19
22
  width: 0;
20
23
  height: 0;
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;
25
24
  vertical-align: top;
26
- border-left: 4px solid transparent;
27
- border-right: 4px solid transparent;
28
25
  border-top: 4px solid @black;
26
+ border-right: 4px solid transparent;
27
+ border-left: 4px solid transparent;
28
+ content: "";
29
29
  .opacity(30);
30
- content: "\2193";
31
30
  }
31
+
32
+ // Place the caret
32
33
  .dropdown .caret {
33
34
  margin-top: 8px;
34
35
  margin-left: 2px;
35
36
  }
36
37
  .dropdown:hover .caret,
37
- .open.dropdown .caret {
38
+ .open .caret {
38
39
  .opacity(100);
39
40
  }
41
+
40
42
  // The dropdown menu (ul)
43
+ // ----------------------
41
44
  .dropdown-menu {
42
45
  position: absolute;
43
46
  top: 100%;
44
47
  left: 0;
45
48
  z-index: @zindexDropdown;
46
- float: left;
47
49
  display: none; // none by default, but block on "open" of the menu
50
+ float: left;
48
51
  min-width: 160px;
49
- max-width: 220px;
50
- _width: 160px;
51
52
  padding: 4px 0;
52
- margin: 0; // override default ul
53
+ margin: 1px 0 0; // override default ul
53
54
  list-style: none;
54
- background-color: @white;
55
- border-color: #ccc;
56
- border-color: rgba(0,0,0,.2);
57
- border-style: solid;
58
- border-width: 1px;
59
- .border-radius(0 0 5px 5px);
55
+ background-color: @dropdownBackground;
56
+ border: 1px solid #ccc;
57
+ border: 1px solid rgba(0,0,0,.2);
58
+ *border-right-width: 2px;
59
+ *border-bottom-width: 2px;
60
+ .border-radius(5px);
60
61
  .box-shadow(0 5px 10px rgba(0,0,0,.2));
61
62
  -webkit-background-clip: padding-box;
62
63
  -moz-background-clip: padding;
63
64
  background-clip: padding-box;
64
- *border-right-width: 2px;
65
- *border-bottom-width: 2px;
66
65
 
67
- // Allow for dropdowns to go bottom up (aka, dropup-menu)
68
- &.bottom-up {
69
- top: auto;
70
- bottom: 100%;
71
- margin-bottom: 2px;
66
+ // Aligns the dropdown menu to right
67
+ &.pull-right {
68
+ right: 0;
69
+ left: auto;
72
70
  }
73
71
 
74
72
  // Dividers (basically an hr) within the dropdown
75
73
  .divider {
76
- height: 1px;
77
- margin: 5px 1px;
78
- overflow: hidden;
79
- background-color: #e5e5e5;
80
- border-bottom: 1px solid @white;
81
-
82
- // IE7 needs a set width since we gave a height. Restricting just
83
- // to IE7 to keep the 1px left/right space in other browsers.
84
- // It is unclear where IE is getting the extra space that we need
85
- // to negative-margin away, but so it goes.
86
- *width: 100%;
87
- *margin: -5px 0 5px;
74
+ .nav-divider();
88
75
  }
89
76
 
90
77
  // Links within the dropdown menu
@@ -93,38 +80,63 @@
93
80
  padding: 3px 15px;
94
81
  clear: both;
95
82
  font-weight: normal;
96
- line-height: 18px;
97
- color: @gray;
83
+ line-height: @baseLineHeight;
84
+ color: @dropdownLinkColor;
98
85
  white-space: nowrap;
99
86
  }
100
87
  }
101
88
 
102
89
  // Hover state
90
+ // -----------
103
91
  .dropdown-menu li > a:hover,
104
92
  .dropdown-menu .active > a,
105
93
  .dropdown-menu .active > a:hover {
106
- color: @white;
94
+ color: @dropdownLinkColorHover;
107
95
  text-decoration: none;
108
- background-color: @linkColor;
96
+ background-color: @dropdownLinkBackgroundHover;
109
97
  }
110
98
 
111
99
  // Open state for the dropdown
112
- .dropdown.open {
100
+ // ---------------------------
101
+ .open {
113
102
  // IE7's z-index only goes to the nearest positioned ancestor, which would
114
103
  // make the menu appear below buttons that appeared later on the page
115
104
  *z-index: @zindexDropdown;
116
105
 
117
- .dropdown-toggle {
118
- color: @white;
119
- background: #ccc;
120
- background: rgba(0,0,0,.3);
121
- }
122
106
  .dropdown-menu {
123
107
  display: block;
124
108
  }
125
109
  }
126
110
 
111
+ // Right aligned dropdowns
112
+ // ---------------------------
113
+ .pull-right .dropdown-menu {
114
+ right: 0;
115
+ left: auto;
116
+ }
117
+
118
+ // Allow for dropdowns to go bottom up (aka, dropup-menu)
119
+ // ------------------------------------------------------
120
+ // Just add .dropup after the standard .dropdown class and you're set, bro.
121
+ // TODO: abstract this so that the navbar fixed styles are not placed here?
122
+ .dropup,
123
+ .navbar-fixed-bottom .dropdown {
124
+ // Reverse the caret
125
+ .caret {
126
+ border-top: 0;
127
+ border-bottom: 4px solid @black;
128
+ content: "\2191";
129
+ }
130
+ // Different positioning for bottom up menu
131
+ .dropdown-menu {
132
+ top: auto;
133
+ bottom: 100%;
134
+ margin-bottom: 1px;
135
+ }
136
+ }
137
+
127
138
  // Typeahead
139
+ // ---------
128
140
  .typeahead {
129
141
  margin-top: 2px; // give it some space to breathe
130
142
  .border-radius(4px);
@@ -28,6 +28,12 @@ legend {
28
28
  color: @grayDark;
29
29
  border: 0;
30
30
  border-bottom: 1px solid #eee;
31
+
32
+ // Small
33
+ small {
34
+ font-size: @baseLineHeight * .75;
35
+ color: @grayLight;
36
+ }
31
37
  }
32
38
 
33
39
  // Set font for forms
@@ -36,7 +42,13 @@ input,
36
42
  button,
37
43
  select,
38
44
  textarea {
39
- #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: @baseFontFamily; // And only set font-family here for those that need it (note the missing label element)
40
52
  }
41
53
 
42
54
  // Identify controls by their labels
@@ -59,8 +71,9 @@ select,
59
71
  font-size: @baseFontSize;
60
72
  line-height: @baseLineHeight;
61
73
  color: @gray;
62
- border: 1px solid #ccc;
63
- .border-radius(3px);
74
+ background-color: @inputBackground;
75
+ border: 1px solid @inputBorder;
76
+ .border-radius(@inputBorderRadius);
64
77
  }
65
78
  .uneditable-textarea {
66
79
  width: auto;
@@ -84,18 +97,23 @@ input[type="radio"] {
84
97
  margin: 3px 0;
85
98
  *margin-top: 0; /* IE7 */
86
99
  line-height: normal;
87
- border: 0;
88
100
  cursor: pointer;
101
+ background-color: transparent;
102
+ border: 0 \9; /* IE9 and down */
89
103
  .border-radius(0);
90
104
  }
105
+ input[type="image"] {
106
+ border: 0;
107
+ }
91
108
 
92
109
  // Reset the file input to browser defaults
93
110
  input[type="file"] {
111
+ width: auto;
94
112
  padding: initial;
95
113
  line-height: initial;
96
- border: initial;
97
- background-color: @white;
114
+ background-color: @inputBackground;
98
115
  background-color: initial;
116
+ border: initial;
99
117
  .box-shadow(none);
100
118
  }
101
119
 
@@ -115,10 +133,15 @@ input[type="file"] {
115
133
  line-height: 28px;
116
134
  }
117
135
 
136
+ // Reset line-height for IE
137
+ input[type="file"] {
138
+ line-height: 18px \9;
139
+ }
140
+
118
141
  // Chrome on Linux and Mobile Safari need background-color
119
142
  select {
120
143
  width: 220px; // default input width + 10px of padding that doesn't get applied
121
- background-color: @white;
144
+ background-color: @inputBackground;
122
145
  }
123
146
 
124
147
  // Make multiple select elements height not fixed
@@ -150,6 +173,7 @@ input[type="hidden"] {
150
173
  // Indent the labels to position radios/checkboxes as hanging
151
174
  .radio,
152
175
  .checkbox {
176
+ min-height: 18px; // clear the floating input if there is no label text
153
177
  padding-left: 18px;
154
178
  }
155
179
  .radio input[type="radio"],
@@ -165,9 +189,11 @@ input[type="hidden"] {
165
189
  }
166
190
 
167
191
  // Radios and checkboxes on same line
192
+ // TODO v3: Convert .inline to .control-inline
168
193
  .radio.inline,
169
194
  .checkbox.inline {
170
195
  display: inline-block;
196
+ padding-top: 5px;
171
197
  margin-bottom: 0;
172
198
  vertical-align: middle;
173
199
  }
@@ -175,11 +201,6 @@ input[type="hidden"] {
175
201
  .checkbox.inline + .checkbox.inline {
176
202
  margin-left: 10px; // space out consecutive inline controls
177
203
  }
178
- // But don't forget to remove their padding on first-child
179
- .controls > .radio.inline:first-child,
180
- .controls > .checkbox.inline:first-child {
181
- padding-top: 0;
182
- }
183
204
 
184
205
 
185
206
 
@@ -195,16 +216,16 @@ textarea {
195
216
  input:focus,
196
217
  textarea:focus {
197
218
  border-color: rgba(82,168,236,.8);
198
- @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
199
- .box-shadow(@shadow);
200
219
  outline: 0;
201
- outline: thin dotted \9; /* IE6-8 */
220
+ outline: thin dotted \9; /* IE6-9 */
221
+ .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
202
222
  }
203
223
  input[type="file"]:focus,
224
+ input[type="radio"]:focus,
204
225
  input[type="checkbox"]:focus,
205
226
  select:focus {
206
- .box-shadow(none); // override for file inputs
207
227
  .tab-focus();
228
+ .box-shadow(none); // override for file inputs
208
229
  }
209
230
 
210
231
 
@@ -224,7 +245,12 @@ select:focus {
224
245
  input[class*="span"],
225
246
  select[class*="span"],
226
247
  textarea[class*="span"],
227
- .uneditable-input {
248
+ .uneditable-input[class*="span"],
249
+ // Redeclare since the fluid row class is more specific
250
+ .row-fluid input[class*="span"],
251
+ .row-fluid select[class*="span"],
252
+ .row-fluid textarea[class*="span"],
253
+ .row-fluid .uneditable-input[class*="span"] {
228
254
  float: none;
229
255
  margin-left: 0;
230
256
  }
@@ -234,7 +260,7 @@ textarea[class*="span"],
234
260
  // GRID SIZING FOR INPUTS
235
261
  // ----------------------
236
262
 
237
- #inputGridSystem > .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth);
263
+ #grid > .input (@gridColumnWidth, @gridGutterWidth);
238
264
 
239
265
 
240
266
 
@@ -249,9 +275,16 @@ textarea[disabled],
249
275
  input[readonly],
250
276
  select[readonly],
251
277
  textarea[readonly] {
252
- background-color: #f5f5f5;
253
- border-color: #ddd;
254
278
  cursor: not-allowed;
279
+ background-color: @inputDisabledBackground;
280
+ border-color: #ddd;
281
+ }
282
+ // Explicitly reset the colors here
283
+ input[type="radio"][disabled],
284
+ input[type="checkbox"][disabled],
285
+ input[type="radio"][readonly],
286
+ input[type="checkbox"][readonly] {
287
+ background-color: transparent;
255
288
  }
256
289
 
257
290
 
@@ -260,33 +293,6 @@ textarea[readonly] {
260
293
  // FORM FIELD FEEDBACK STATES
261
294
  // --------------------------
262
295
 
263
- // Mixin for form field states
264
- .formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) {
265
- // Set the text color
266
- > label,
267
- .help-block,
268
- .help-inline {
269
- color: @textColor;
270
- }
271
- // Style inputs accordingly
272
- input,
273
- select,
274
- textarea {
275
- color: @textColor;
276
- border-color: @borderColor;
277
- &:focus {
278
- border-color: darken(@borderColor, 10%);
279
- .box-shadow(0 0 6px lighten(@borderColor, 20%));
280
- }
281
- }
282
- // Give a small background color for input-prepend/-append
283
- .input-prepend .add-on,
284
- .input-append .add-on {
285
- color: @textColor;
286
- background-color: @backgroundColor;
287
- border-color: @textColor;
288
- }
289
- }
290
296
  // Warning
291
297
  .control-group.warning {
292
298
  .formFieldState(@warningText, @warningText, @warningBackground);
@@ -309,7 +315,7 @@ select:focus:required:invalid {
309
315
  border-color: #ee5f5b;
310
316
  &:focus {
311
317
  border-color: darken(#ee5f5b, 10%);
312
- .box-shadow(0 0 6px lighten(#ee5f5b, 20%));
318
+ .box-shadow(0 0 6px lighten(#ee5f5b, 20%));
313
319
  }
314
320
  }
315
321
 
@@ -322,17 +328,19 @@ select:focus:required:invalid {
322
328
  padding: (@baseLineHeight - 1) 20px @baseLineHeight;
323
329
  margin-top: @baseLineHeight;
324
330
  margin-bottom: @baseLineHeight;
325
- background-color: #f5f5f5;
331
+ background-color: @formActionsBackground;
326
332
  border-top: 1px solid #ddd;
333
+ .clearfix(); // Adding clearfix to allow for .pull-right button containers
327
334
  }
328
335
 
329
336
  // For text that needs to appear as an input but should not be an input
330
337
  .uneditable-input {
331
- display: block;
332
- background-color: @white;
338
+ overflow: hidden; // prevent text from wrapping, but still cut it off like an input does
339
+ white-space: nowrap;
340
+ cursor: not-allowed;
341
+ background-color: @inputBackground;
333
342
  border-color: #eee;
334
343
  .box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
335
- cursor: not-allowed;
336
344
  }
337
345
 
338
346
  // Placeholder text gets special styles; can't be bundled together though for some reason
@@ -343,16 +351,19 @@ select:focus:required:invalid {
343
351
  // HELP TEXT
344
352
  // ---------
345
353
 
354
+ .help-block,
355
+ .help-inline {
356
+ color: @gray; // lighten the text some for contrast
357
+ }
358
+
346
359
  .help-block {
347
- margin-top: 5px;
348
- margin-bottom: 0;
349
- color: @grayLight;
360
+ display: block; // account for any element using help-block
361
+ margin-bottom: @baseLineHeight / 2;
350
362
  }
351
363
 
352
364
  .help-inline {
353
365
  display: inline-block;
354
366
  .ie7-inline-block();
355
- margin-bottom: 9px;
356
367
  vertical-align: middle;
357
368
  padding-left: 5px;
358
369
  }
@@ -366,12 +377,16 @@ select:focus:required:invalid {
366
377
  .input-prepend,
367
378
  .input-append {
368
379
  margin-bottom: 5px;
369
- .clearfix(); // Clear the float to prevent wrapping
370
380
  input,
381
+ select,
371
382
  .uneditable-input {
372
- .border-radius(0 3px 3px 0);
383
+ position: relative; // placed here by default so that on :focus we can place the input above the .add-on for full border and box-shadow goodness
384
+ margin-bottom: 0; // prevent bottom margin from screwing up alignment in stacked forms
385
+ *margin-left: 0;
386
+ vertical-align: middle;
387
+ .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
388
+ // Make input on top when focused so blue border and shadow always show
373
389
  &:focus {
374
- position: relative;
375
390
  z-index: 2;
376
391
  }
377
392
  }
@@ -379,21 +394,23 @@ select:focus:required:invalid {
379
394
  border-left-color: #ccc;
380
395
  }
381
396
  .add-on {
382
- float: left;
383
- display: block;
397
+ display: inline-block;
384
398
  width: auto;
385
- min-width: 16px;
386
399
  height: @baseLineHeight;
387
- margin-right: -1px;
400
+ min-width: 16px;
388
401
  padding: 4px 5px;
389
402
  font-weight: normal;
390
403
  line-height: @baseLineHeight;
391
- color: @grayLight;
392
404
  text-align: center;
393
405
  text-shadow: 0 1px 0 @white;
394
- background-color: #f5f5f5;
406
+ vertical-align: middle;
407
+ background-color: @grayLighter;
395
408
  border: 1px solid #ccc;
396
- .border-radius(3px 0 0 3px);
409
+ }
410
+ .add-on,
411
+ .btn {
412
+ margin-left: -1px;
413
+ .border-radius(0);
397
414
  }
398
415
  .active {
399
416
  background-color: lighten(@green, 30);
@@ -401,32 +418,46 @@ select:focus:required:invalid {
401
418
  }
402
419
  }
403
420
  .input-prepend {
404
- .add-on {
405
- *margin-top: 1px; /* IE6-7 */
421
+ .add-on,
422
+ .btn {
423
+ margin-right: -1px;
424
+ }
425
+ .add-on:first-child,
426
+ .btn:first-child {
427
+ .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
406
428
  }
407
429
  }
408
430
  .input-append {
409
431
  input,
432
+ select,
410
433
  .uneditable-input {
411
- float: left;
412
- .border-radius(3px 0 0 3px);
434
+ .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
413
435
  }
414
436
  .uneditable-input {
415
- border-right-color: #ccc;
437
+ border-right-color: #ccc;
438
+ border-left-color: #eee;
416
439
  }
417
- .add-on {
418
- margin-right: 0;
419
- margin-left: -1px;
420
- .border-radius(0 3px 3px 0);
440
+ .add-on:last-child,
441
+ .btn:last-child {
442
+ .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
421
443
  }
422
- input:first-child {
423
- // In IE7, having a hasLayout container (from clearfix's zoom:1) can make the first input
424
- // inherit the sum of its ancestors' margins.
425
- *margin-left: -160px;
426
-
427
- &+.add-on {
428
- *margin-left: -21px;
429
- }
444
+ }
445
+ // Remove all border-radius for inputs with both prepend and append
446
+ .input-prepend.input-append {
447
+ input,
448
+ select,
449
+ .uneditable-input {
450
+ .border-radius(0);
451
+ }
452
+ .add-on:first-child,
453
+ .btn:first-child {
454
+ margin-right: -1px;
455
+ .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
456
+ }
457
+ .add-on:last-child,
458
+ .btn:last-child {
459
+ margin-left: -1px;
460
+ .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
430
461
  }
431
462
  }
432
463
 
@@ -436,8 +467,10 @@ select:focus:required:invalid {
436
467
  // -----------
437
468
 
438
469
  .search-query {
439
- padding-left: 14px;
440
470
  padding-right: 14px;
471
+ padding-right: 4px \9;
472
+ padding-left: 14px;
473
+ padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */
441
474
  margin-bottom: 0; // remove the default margin on all inputs
442
475
  .border-radius(14px);
443
476
  }
@@ -457,48 +490,71 @@ select:focus:required:invalid {
457
490
  textarea,
458
491
  select,
459
492
  .help-inline,
460
- .uneditable-input {
493
+ .uneditable-input,
494
+ .input-prepend,
495
+ .input-append {
461
496
  display: inline-block;
497
+ .ie7-inline-block();
462
498
  margin-bottom: 0;
463
499
  }
500
+ // Re-hide hidden elements due to specifity
501
+ .hide {
502
+ display: none;
503
+ }
464
504
  }
465
505
  .form-search label,
466
- .form-inline label,
506
+ .form-inline label {
507
+ display: inline-block;
508
+ }
509
+ // Remove margin for input-prepend/-append
467
510
  .form-search .input-append,
468
511
  .form-inline .input-append,
469
512
  .form-search .input-prepend,
470
513
  .form-inline .input-prepend {
471
- display: inline-block;
514
+ margin-bottom: 0;
472
515
  }
473
- // Make the prepend and append add-on vertical-align: middle;
474
- .form-search .input-append .add-on,
475
- .form-inline .input-prepend .add-on,
476
- .form-search .input-append .add-on,
477
- .form-inline .input-prepend .add-on {
516
+ // Inline checkbox/radio labels (remove padding on left)
517
+ .form-search .radio,
518
+ .form-search .checkbox,
519
+ .form-inline .radio,
520
+ .form-inline .checkbox {
521
+ padding-left: 0;
522
+ margin-bottom: 0;
478
523
  vertical-align: middle;
479
524
  }
525
+ // Remove float and margin, set to inline-block
526
+ .form-search .radio input[type="radio"],
527
+ .form-search .checkbox input[type="checkbox"],
528
+ .form-inline .radio input[type="radio"],
529
+ .form-inline .checkbox input[type="checkbox"] {
530
+ float: left;
531
+ margin-right: 3px;
532
+ margin-left: 0;
533
+ }
534
+
480
535
 
481
536
  // Margin to space out fieldsets
482
537
  .control-group {
483
538
  margin-bottom: @baseLineHeight / 2;
484
539
  }
485
540
 
541
+ // Legend collapses margin, so next element is responsible for spacing
542
+ legend + .control-group {
543
+ margin-top: @baseLineHeight;
544
+ -webkit-margin-top-collapse: separate;
545
+ }
546
+
486
547
  // Horizontal-specific styles
487
548
  // --------------------------
488
549
 
489
550
  .form-horizontal {
490
- // Legend collapses margin, so we're relegated to padding
491
- legend + .control-group {
492
- margin-top: @baseLineHeight;
493
- -webkit-margin-top-collapse: separate;
494
- }
495
551
  // Increase spacing between groups
496
552
  .control-group {
497
553
  margin-bottom: @baseLineHeight;
498
554
  .clearfix();
499
555
  }
500
556
  // Float the labels left
501
- .control-group > label {
557
+ .control-label {
502
558
  float: left;
503
559
  width: 140px;
504
560
  padding-top: 5px;
@@ -506,7 +562,20 @@ select:focus:required:invalid {
506
562
  }
507
563
  // Move over all input controls and content
508
564
  .controls {
565
+ // Super jank IE7 fix to ensure the inputs in .input-append and input-prepend
566
+ // don't inherit the margin of the parent, in this case .controls
567
+ *display: inline-block;
568
+ *padding-left: 20px;
509
569
  margin-left: 160px;
570
+ *margin-left: 0;
571
+ &:first-child {
572
+ *padding-left: 160px;
573
+ }
574
+ }
575
+ // Remove bottom margin on block level help text since that's accounted for on .control-group
576
+ .help-block {
577
+ margin-top: @baseLineHeight / 2;
578
+ margin-bottom: 0;
510
579
  }
511
580
  // Move over buttons in .form-actions to align with .controls
512
581
  .form-actions {
@@ -1,8 +1,5 @@
1
- // GRID SYSTEM
2
- // -----------
3
-
4
1
  // Fixed (940px)
5
- #gridSystem > .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth);
2
+ #grid > .core(@gridColumnWidth, @gridGutterWidth);
6
3
 
7
4
  // Fluid (940px)
8
- #fluidGridSystem > .generate(@gridColumns, @fluidGridColumnWidth, @fluidGridGutterWidth);
5
+ #grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth);