rbootstrap 1.1.2

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 (111) hide show
  1. data/README.md +282 -0
  2. data/Rakefile +14 -0
  3. data/app/helpers/bootstrap_flash_helper.rb +17 -0
  4. data/app/helpers/flash_block_helper.rb +17 -0
  5. data/app/helpers/glyph_helper.rb +12 -0
  6. data/app/helpers/modal_helper.rb +42 -0
  7. data/app/helpers/twitter_breadcrumbs_helper.rb +5 -0
  8. data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +14 -0
  9. data/lib/generators/bootstrap/install/install_generator.rb +57 -0
  10. data/lib/generators/bootstrap/install/templates/application.css +7 -0
  11. data/lib/generators/bootstrap/install/templates/application.js +10 -0
  12. data/lib/generators/bootstrap/install/templates/bootstrap.coffee +4 -0
  13. data/lib/generators/bootstrap/install/templates/bootstrap.js +5 -0
  14. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +31 -0
  15. data/lib/generators/bootstrap/layout/layout_generator.rb +23 -0
  16. data/lib/generators/bootstrap/layout/templates/layout.html.erb +108 -0
  17. data/lib/generators/bootstrap/layout/templates/layout.html.haml +68 -0
  18. data/lib/generators/bootstrap/layout/templates/layout.html.slim +68 -0
  19. data/lib/generators/bootstrap/partial/partial_generator.rb +20 -0
  20. data/lib/generators/bootstrap/partial/templates/_login.html.erb +29 -0
  21. data/lib/generators/bootstrap/partial/templates/_navbar.html.erb +13 -0
  22. data/lib/generators/bootstrap/themed/templates/_form.html.erb +16 -0
  23. data/lib/generators/bootstrap/themed/templates/_form.html.haml +10 -0
  24. data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -0
  25. data/lib/generators/bootstrap/themed/templates/edit.html.erb +6 -0
  26. data/lib/generators/bootstrap/themed/templates/edit.html.haml +4 -0
  27. data/lib/generators/bootstrap/themed/templates/edit.html.slim +4 -0
  28. data/lib/generators/bootstrap/themed/templates/index.html.erb +40 -0
  29. data/lib/generators/bootstrap/themed/templates/index.html.haml +25 -0
  30. data/lib/generators/bootstrap/themed/templates/index.html.slim +27 -0
  31. data/lib/generators/bootstrap/themed/templates/new.html.erb +6 -0
  32. data/lib/generators/bootstrap/themed/templates/new.html.haml +4 -0
  33. data/lib/generators/bootstrap/themed/templates/new.html.slim +4 -0
  34. data/lib/generators/bootstrap/themed/templates/show.html.erb +23 -0
  35. data/lib/generators/bootstrap/themed/templates/show.html.haml +15 -0
  36. data/lib/generators/bootstrap/themed/templates/show.html.slim +17 -0
  37. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +14 -0
  38. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +11 -0
  39. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +12 -0
  40. data/lib/generators/bootstrap/themed/themed_generator.rb +110 -0
  41. data/lib/twitter-bootstrap-rails.rb +10 -0
  42. data/lib/twitter/bootstrap/rails/bootstrap.rb +2 -0
  43. data/lib/twitter/bootstrap/rails/engine.rb +29 -0
  44. data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +30 -0
  45. data/lib/twitter/bootstrap/rails/version.rb +7 -0
  46. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  47. data/vendor/assets/fonts/fontawesome-webfont.svg +255 -0
  48. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  49. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  50. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  51. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  52. data/vendor/assets/javascripts/twitter/bootstrap.js +13 -0
  53. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +106 -0
  54. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +88 -0
  55. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +94 -0
  56. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +176 -0
  57. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +156 -0
  58. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +148 -0
  59. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +234 -0
  60. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +103 -0
  61. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +151 -0
  62. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +133 -0
  63. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +276 -0
  64. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +60 -0
  65. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +311 -0
  66. data/vendor/assets/javascripts/twitter/bootstrap_ujs.js +11 -0
  67. data/vendor/toolkit/font-awesome-ie7.less +245 -0
  68. data/vendor/toolkit/fontawesome.less +328 -0
  69. data/vendor/toolkit/twitter/bootstrap/accordion.less +34 -0
  70. data/vendor/toolkit/twitter/bootstrap/alerts.less +65 -0
  71. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +63 -0
  72. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +24 -0
  73. data/vendor/toolkit/twitter/bootstrap/button-groups.less +242 -0
  74. data/vendor/toolkit/twitter/bootstrap/buttons.less +232 -0
  75. data/vendor/toolkit/twitter/bootstrap/carousel.less +131 -0
  76. data/vendor/toolkit/twitter/bootstrap/close.less +31 -0
  77. data/vendor/toolkit/twitter/bootstrap/code.less +59 -0
  78. data/vendor/toolkit/twitter/bootstrap/component-animations.less +22 -0
  79. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +237 -0
  80. data/vendor/toolkit/twitter/bootstrap/forms.less +683 -0
  81. data/vendor/toolkit/twitter/bootstrap/grid.less +21 -0
  82. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +25 -0
  83. data/vendor/toolkit/twitter/bootstrap/labels-badges.less +74 -0
  84. data/vendor/toolkit/twitter/bootstrap/layouts.less +16 -0
  85. data/vendor/toolkit/twitter/bootstrap/media.less +55 -0
  86. data/vendor/toolkit/twitter/bootstrap/mixins.less +686 -0
  87. data/vendor/toolkit/twitter/bootstrap/modals.less +94 -0
  88. data/vendor/toolkit/twitter/bootstrap/navbar.less +472 -0
  89. data/vendor/toolkit/twitter/bootstrap/navs.less +385 -0
  90. data/vendor/toolkit/twitter/bootstrap/pager.less +41 -0
  91. data/vendor/toolkit/twitter/bootstrap/pagination.less +121 -0
  92. data/vendor/toolkit/twitter/bootstrap/popovers.less +117 -0
  93. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +122 -0
  94. data/vendor/toolkit/twitter/bootstrap/reset.less +138 -0
  95. data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +28 -0
  96. data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +193 -0
  97. data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +19 -0
  98. data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +185 -0
  99. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +43 -0
  100. data/vendor/toolkit/twitter/bootstrap/responsive.less +48 -0
  101. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +52 -0
  102. data/vendor/toolkit/twitter/bootstrap/sprites.less +193 -0
  103. data/vendor/toolkit/twitter/bootstrap/tables.less +236 -0
  104. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +52 -0
  105. data/vendor/toolkit/twitter/bootstrap/tooltip.less +70 -0
  106. data/vendor/toolkit/twitter/bootstrap/type.less +230 -0
  107. data/vendor/toolkit/twitter/bootstrap/utilities.less +30 -0
  108. data/vendor/toolkit/twitter/bootstrap/variables.less +301 -0
  109. data/vendor/toolkit/twitter/bootstrap/wells.less +29 -0
  110. data/vendor/toolkit/twitter/bootstrap_base.less +2 -0
  111. metadata +224 -0
@@ -0,0 +1,683 @@
1
+ //
2
+ // Forms
3
+ // --------------------------------------------------
4
+
5
+
6
+ // GENERAL STYLES
7
+ // --------------
8
+
9
+ // Make all forms have space below them
10
+ form {
11
+ margin: 0 0 @baseLineHeight;
12
+ }
13
+
14
+ fieldset {
15
+ padding: 0;
16
+ margin: 0;
17
+ border: 0;
18
+ }
19
+
20
+ // Groups of fields with labels on top (legends)
21
+ legend {
22
+ display: block;
23
+ width: 100%;
24
+ padding: 0;
25
+ margin-bottom: @baseLineHeight;
26
+ font-size: @baseFontSize * 1.5;
27
+ line-height: @baseLineHeight * 2;
28
+ color: @grayDark;
29
+ border: 0;
30
+ border-bottom: 1px solid #e5e5e5;
31
+
32
+ // Small
33
+ small {
34
+ font-size: @baseLineHeight * .75;
35
+ color: @grayLight;
36
+ }
37
+ }
38
+
39
+ // Set font for forms
40
+ label,
41
+ input,
42
+ button,
43
+ select,
44
+ textarea {
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)
52
+ }
53
+
54
+ // Identify controls by their labels
55
+ label {
56
+ display: block;
57
+ margin-bottom: 5px;
58
+ }
59
+
60
+ // Form controls
61
+ // -------------------------
62
+
63
+ // Shared size and type resets
64
+ select,
65
+ textarea,
66
+ input[type="text"],
67
+ input[type="password"],
68
+ input[type="datetime"],
69
+ input[type="datetime-local"],
70
+ input[type="date"],
71
+ input[type="month"],
72
+ input[type="time"],
73
+ input[type="week"],
74
+ input[type="number"],
75
+ input[type="email"],
76
+ input[type="url"],
77
+ input[type="search"],
78
+ input[type="tel"],
79
+ input[type="color"],
80
+ .uneditable-input {
81
+ display: inline-block;
82
+ height: @baseLineHeight;
83
+ padding: 4px 6px;
84
+ margin-bottom: @baseLineHeight / 2;
85
+ font-size: @baseFontSize;
86
+ line-height: @baseLineHeight;
87
+ color: @gray;
88
+ .border-radius(@inputBorderRadius);
89
+ vertical-align: middle;
90
+ }
91
+
92
+ // Reset appearance properties for textual inputs and textarea
93
+ // Declare width for legacy (can't be on input[type=*] selectors or it's too specific)
94
+ input,
95
+ textarea,
96
+ .uneditable-input {
97
+ width: 206px; // plus 12px padding and 2px border
98
+ }
99
+ // Reset height since textareas have rows
100
+ textarea {
101
+ height: auto;
102
+ }
103
+ // Everything else
104
+ textarea,
105
+ input[type="text"],
106
+ input[type="password"],
107
+ input[type="datetime"],
108
+ input[type="datetime-local"],
109
+ input[type="date"],
110
+ input[type="month"],
111
+ input[type="time"],
112
+ input[type="week"],
113
+ input[type="number"],
114
+ input[type="email"],
115
+ input[type="url"],
116
+ input[type="search"],
117
+ input[type="tel"],
118
+ input[type="color"],
119
+ .uneditable-input {
120
+ background-color: @inputBackground;
121
+ border: 1px solid @inputBorder;
122
+ .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
123
+ .transition(~"border linear .2s, box-shadow linear .2s");
124
+
125
+ // Focus state
126
+ &:focus {
127
+ border-color: rgba(82,168,236,.8);
128
+ outline: 0;
129
+ outline: thin dotted \9; /* IE6-9 */
130
+ .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
131
+ }
132
+ }
133
+
134
+ // Position radios and checkboxes better
135
+ input[type="radio"],
136
+ input[type="checkbox"] {
137
+ margin: 4px 0 0;
138
+ *margin-top: 0; /* IE7 */
139
+ margin-top: 1px \9; /* IE8-9 */
140
+ line-height: normal;
141
+ cursor: pointer;
142
+ }
143
+
144
+ // Reset width of input images, buttons, radios, checkboxes
145
+ input[type="file"],
146
+ input[type="image"],
147
+ input[type="submit"],
148
+ input[type="reset"],
149
+ input[type="button"],
150
+ input[type="radio"],
151
+ input[type="checkbox"] {
152
+ width: auto; // Override of generic input selector
153
+ }
154
+
155
+ // Set the height of select and file controls to match text inputs
156
+ select,
157
+ input[type="file"] {
158
+ height: @inputHeight; /* In IE7, the height of the select element cannot be changed by height, only font-size */
159
+ *margin-top: 4px; /* For IE7, add top margin to align select with labels */
160
+ line-height: @inputHeight;
161
+ }
162
+
163
+ // Make select elements obey height by applying a border
164
+ select {
165
+ width: 220px; // default input width + 10px of padding that doesn't get applied
166
+ border: 1px solid @inputBorder;
167
+ background-color: @inputBackground; // Chrome on Linux and Mobile Safari need background-color
168
+ }
169
+
170
+ // Make multiple select elements height not fixed
171
+ select[multiple],
172
+ select[size] {
173
+ height: auto;
174
+ }
175
+
176
+ // Focus for select, file, radio, and checkbox
177
+ select:focus,
178
+ input[type="file"]:focus,
179
+ input[type="radio"]:focus,
180
+ input[type="checkbox"]:focus {
181
+ .tab-focus();
182
+ }
183
+
184
+
185
+ // Uneditable inputs
186
+ // -------------------------
187
+
188
+ // Make uneditable inputs look inactive
189
+ .uneditable-input,
190
+ .uneditable-textarea {
191
+ color: @grayLight;
192
+ background-color: darken(@inputBackground, 1%);
193
+ border-color: @inputBorder;
194
+ .box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
195
+ cursor: not-allowed;
196
+ }
197
+
198
+ // For text that needs to appear as an input but should not be an input
199
+ .uneditable-input {
200
+ overflow: hidden; // prevent text from wrapping, but still cut it off like an input does
201
+ white-space: nowrap;
202
+ }
203
+
204
+ // Make uneditable textareas behave like a textarea
205
+ .uneditable-textarea {
206
+ width: auto;
207
+ height: auto;
208
+ }
209
+
210
+
211
+ // Placeholder
212
+ // -------------------------
213
+
214
+ // Placeholder text gets special styles because when browsers invalidate entire lines if it doesn't understand a selector
215
+ input,
216
+ textarea {
217
+ .placeholder();
218
+ }
219
+
220
+
221
+ // CHECKBOXES & RADIOS
222
+ // -------------------
223
+
224
+ // Indent the labels to position radios/checkboxes as hanging
225
+ .radio,
226
+ .checkbox {
227
+ min-height: @baseLineHeight; // clear the floating input if there is no label text
228
+ padding-right: 20px;
229
+ }
230
+ .radio input[type="radio"],
231
+ .checkbox input[type="checkbox"] {
232
+ float: right;
233
+ margin-right: -20px;
234
+ }
235
+
236
+ // Move the options list down to align with labels
237
+ .controls > .radio:first-child,
238
+ .controls > .checkbox:first-child {
239
+ padding-top: 5px; // has to be padding because margin collaspes
240
+ }
241
+
242
+ // Radios and checkboxes on same line
243
+ // TODO v3: Convert .inline to .control-inline
244
+ .radio.inline,
245
+ .checkbox.inline {
246
+ display: inline-block;
247
+ padding-top: 5px;
248
+ margin-bottom: 0;
249
+ vertical-align: middle;
250
+ }
251
+ .radio.inline + .radio.inline,
252
+ .checkbox.inline + .checkbox.inline {
253
+ margin-right: 10px; // space out consecutive inline controls
254
+ }
255
+
256
+
257
+
258
+ // INPUT SIZES
259
+ // -----------
260
+
261
+ // General classes for quick sizes
262
+ .input-mini { width: 60px; }
263
+ .input-small { width: 90px; }
264
+ .input-medium { width: 150px; }
265
+ .input-large { width: 210px; }
266
+ .input-xlarge { width: 270px; }
267
+ .input-xxlarge { width: 530px; }
268
+
269
+ // Grid style input sizes
270
+ input[class*="span"],
271
+ select[class*="span"],
272
+ textarea[class*="span"],
273
+ .uneditable-input[class*="span"],
274
+ // Redeclare since the fluid row class is more specific
275
+ .row-fluid input[class*="span"],
276
+ .row-fluid select[class*="span"],
277
+ .row-fluid textarea[class*="span"],
278
+ .row-fluid .uneditable-input[class*="span"] {
279
+ float: none;
280
+ margin-right: 0;
281
+ }
282
+ // Ensure input-prepend/append never wraps
283
+ .input-append input[class*="span"],
284
+ .input-append .uneditable-input[class*="span"],
285
+ .input-prepend input[class*="span"],
286
+ .input-prepend .uneditable-input[class*="span"],
287
+ .row-fluid input[class*="span"],
288
+ .row-fluid select[class*="span"],
289
+ .row-fluid textarea[class*="span"],
290
+ .row-fluid .uneditable-input[class*="span"],
291
+ .row-fluid .input-prepend [class*="span"],
292
+ .row-fluid .input-append [class*="span"] {
293
+ display: inline-block;
294
+ }
295
+
296
+
297
+
298
+ // GRID SIZING FOR INPUTS
299
+ // ----------------------
300
+
301
+ // Grid sizes
302
+ #grid > .input(@gridColumnWidth, @gridGutterWidth);
303
+
304
+ // Control row for multiple inputs per line
305
+ .controls-row {
306
+ .clearfix(); // Clear the float from controls
307
+ }
308
+
309
+ // Float to collapse white-space for proper grid alignment
310
+ .controls-row [class*="span"],
311
+ // Redeclare the fluid grid collapse since we undo the float for inputs
312
+ .row-fluid .controls-row [class*="span"] {
313
+ float: right;
314
+ }
315
+ // Explicity set top padding on all checkboxes/radios, not just first-child
316
+ .controls-row .checkbox[class*="span"],
317
+ .controls-row .radio[class*="span"] {
318
+ padding-top: 5px;
319
+ }
320
+
321
+
322
+
323
+
324
+ // DISABLED STATE
325
+ // --------------
326
+
327
+ // Disabled and read-only inputs
328
+ input[disabled],
329
+ select[disabled],
330
+ textarea[disabled],
331
+ input[readonly],
332
+ select[readonly],
333
+ textarea[readonly] {
334
+ cursor: not-allowed;
335
+ background-color: @inputDisabledBackground;
336
+ }
337
+ // Explicitly reset the colors here
338
+ input[type="radio"][disabled],
339
+ input[type="checkbox"][disabled],
340
+ input[type="radio"][readonly],
341
+ input[type="checkbox"][readonly] {
342
+ background-color: transparent;
343
+ }
344
+
345
+
346
+
347
+
348
+ // FORM FIELD FEEDBACK STATES
349
+ // --------------------------
350
+
351
+ // Warning
352
+ .control-group.warning {
353
+ .formFieldState(@warningText, @warningText, @warningBackground);
354
+ }
355
+ // Error
356
+ .control-group.error {
357
+ .formFieldState(@errorText, @errorText, @errorBackground);
358
+ }
359
+ // Success
360
+ .control-group.success {
361
+ .formFieldState(@successText, @successText, @successBackground);
362
+ }
363
+ // Success
364
+ .control-group.info {
365
+ .formFieldState(@infoText, @infoText, @infoBackground);
366
+ }
367
+
368
+ // HTML5 invalid states
369
+ // Shares styles with the .control-group.error above
370
+ input:focus:required:invalid,
371
+ textarea:focus:required:invalid,
372
+ select:focus:required:invalid {
373
+ color: #b94a48;
374
+ border-color: #ee5f5b;
375
+ &:focus {
376
+ border-color: darken(#ee5f5b, 10%);
377
+ @shadow: 0 0 6px lighten(#ee5f5b, 20%);
378
+ .box-shadow(@shadow);
379
+ }
380
+ }
381
+
382
+
383
+
384
+ // FORM ACTIONS
385
+ // ------------
386
+
387
+ .form-actions {
388
+ padding: (@baseLineHeight - 1) 20px @baseLineHeight;
389
+ margin-top: @baseLineHeight;
390
+ margin-bottom: @baseLineHeight;
391
+ background-color: @formActionsBackground;
392
+ border-top: 1px solid #e5e5e5;
393
+ .clearfix(); // Adding clearfix to allow for .pull-right button containers
394
+ }
395
+
396
+
397
+
398
+ // HELP TEXT
399
+ // ---------
400
+
401
+ .help-block,
402
+ .help-inline {
403
+ color: lighten(@textColor, 15%); // lighten the text some for contrast
404
+ }
405
+
406
+ .help-block {
407
+ display: block; // account for any element using help-block
408
+ margin-bottom: @baseLineHeight / 2;
409
+ }
410
+
411
+ .help-inline {
412
+ display: inline-block;
413
+ .ie7-inline-block();
414
+ vertical-align: middle;
415
+ padding-right: 5px;
416
+ }
417
+
418
+
419
+
420
+ // INPUT GROUPS
421
+ // ------------
422
+
423
+ // Allow us to put symbols and text within the input field for a cleaner look
424
+ .input-append,
425
+ .input-prepend {
426
+ margin-bottom: 5px;
427
+ font-size: 0; // white space collapse hack
428
+ white-space: nowrap; // Prevent span and input from separating
429
+
430
+ // Reset the white space collapse hack
431
+ input,
432
+ select,
433
+ .uneditable-input,
434
+ .dropdown-menu {
435
+ font-size: @baseFontSize;
436
+ }
437
+
438
+ input,
439
+ select,
440
+ .uneditable-input {
441
+ 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
442
+ margin-bottom: 0; // prevent bottom margin from screwing up alignment in stacked forms
443
+ *margin-right: 0;
444
+ vertical-align: top;
445
+ .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
446
+ // Make input on top when focused so blue border and shadow always show
447
+ &:focus {
448
+ z-index: 2;
449
+ }
450
+ }
451
+ .add-on {
452
+ display: inline-block;
453
+ width: auto;
454
+ height: @baseLineHeight;
455
+ min-width: 16px;
456
+ padding: 4px 5px;
457
+ font-size: @baseFontSize;
458
+ font-weight: normal;
459
+ line-height: @baseLineHeight;
460
+ text-align: center;
461
+ text-shadow: 0 1px 0 @white;
462
+ background-color: @grayLighter;
463
+ border: 1px solid #ccc;
464
+ }
465
+ .add-on,
466
+ .btn {
467
+ vertical-align: top;
468
+ .border-radius(0);
469
+ }
470
+ .active {
471
+ background-color: lighten(@green, 30);
472
+ border-color: @green;
473
+ }
474
+ }
475
+
476
+ .input-prepend {
477
+ .add-on,
478
+ .btn {
479
+ margin-left: -1px;
480
+ }
481
+ .add-on:first-child,
482
+ .btn:first-child {
483
+ // FYI, `.btn:first-child` accounts for a button group that's prepended
484
+ .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
485
+ }
486
+ }
487
+
488
+ .input-append {
489
+ input,
490
+ select,
491
+ .uneditable-input {
492
+ .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
493
+ + .btn-group .btn {
494
+ .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
495
+ }
496
+ }
497
+ .add-on,
498
+ .btn,
499
+ .btn-group {
500
+ margin-right: -1px;
501
+ }
502
+ .add-on:last-child,
503
+ .btn:last-child {
504
+ .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
505
+ }
506
+ }
507
+
508
+ // Remove all border-radius for inputs with both prepend and append
509
+ .input-prepend.input-append {
510
+ input,
511
+ select,
512
+ .uneditable-input {
513
+ .border-radius(0);
514
+ + .btn-group .btn {
515
+ .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
516
+ }
517
+ }
518
+ .add-on:first-child,
519
+ .btn:first-child {
520
+ margin-left: -1px;
521
+ .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
522
+ }
523
+ .add-on:last-child,
524
+ .btn:last-child {
525
+ margin-right: -1px;
526
+ .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
527
+ }
528
+ .btn-group:first-child {
529
+ margin-left: 0;
530
+ }
531
+ }
532
+
533
+
534
+
535
+
536
+ // SEARCH FORM
537
+ // -----------
538
+
539
+ input.search-query {
540
+ padding-right: 14px;
541
+ padding-right: 4px \9;
542
+ padding-left: 14px;
543
+ padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */
544
+ margin-bottom: 0; // Remove the default margin on all inputs
545
+ .border-radius(15px);
546
+ }
547
+
548
+ /* Allow for input prepend/append in search forms */
549
+ .form-search .input-append .search-query,
550
+ .form-search .input-prepend .search-query {
551
+ .border-radius(0); // Override due to specificity
552
+ }
553
+ .form-search .input-append .search-query {
554
+ .border-radius(0 14px 14px 0);
555
+ }
556
+ .form-search .input-append .btn {
557
+ .border-radius(14px 0 0 14px);
558
+ }
559
+ .form-search .input-prepend .search-query {
560
+ .border-radius(14px 0 0 14px);
561
+ }
562
+ .form-search .input-prepend .btn {
563
+ .border-radius(0 14px 14px 0);
564
+ }
565
+
566
+
567
+
568
+
569
+ // HORIZONTAL & VERTICAL FORMS
570
+ // ---------------------------
571
+
572
+ // Common properties
573
+ // -----------------
574
+
575
+ .form-search,
576
+ .form-inline,
577
+ .form-horizontal {
578
+ input,
579
+ textarea,
580
+ select,
581
+ .help-inline,
582
+ .uneditable-input,
583
+ .input-prepend,
584
+ .input-append {
585
+ display: inline-block;
586
+ .ie7-inline-block();
587
+ margin-bottom: 0;
588
+ vertical-align: middle;
589
+ }
590
+ // Re-hide hidden elements due to specifity
591
+ .hide {
592
+ display: none;
593
+ }
594
+ }
595
+ .form-search label,
596
+ .form-inline label,
597
+ .form-search .btn-group,
598
+ .form-inline .btn-group {
599
+ display: inline-block;
600
+ }
601
+ // Remove margin for input-prepend/-append
602
+ .form-search .input-append,
603
+ .form-inline .input-append,
604
+ .form-search .input-prepend,
605
+ .form-inline .input-prepend {
606
+ margin-bottom: 0;
607
+ }
608
+ // Inline checkbox/radio labels (remove padding on right)
609
+ .form-search .radio,
610
+ .form-search .checkbox,
611
+ .form-inline .radio,
612
+ .form-inline .checkbox {
613
+ padding-right: 0;
614
+ margin-bottom: 0;
615
+ vertical-align: middle;
616
+ }
617
+ // Remove float and margin, set to inline-block
618
+ .form-search .radio input[type="radio"],
619
+ .form-search .checkbox input[type="checkbox"],
620
+ .form-inline .radio input[type="radio"],
621
+ .form-inline .checkbox input[type="checkbox"] {
622
+ float: right;
623
+ margin-left: 3px;
624
+ margin-right: 0;
625
+ }
626
+
627
+
628
+ // Margin to space out fieldsets
629
+ .control-group {
630
+ margin-bottom: @baseLineHeight / 2;
631
+ }
632
+
633
+ // Legend collapses margin, so next element is responsible for spacing
634
+ legend + .control-group {
635
+ margin-top: @baseLineHeight;
636
+ -webkit-margin-top-collapse: separate;
637
+ }
638
+
639
+ // Horizontal-specific styles
640
+ // --------------------------
641
+
642
+ .form-horizontal {
643
+ // Increase spacing between groups
644
+ .control-group {
645
+ margin-bottom: @baseLineHeight;
646
+ .clearfix();
647
+ }
648
+ // Float the labels right
649
+ .control-label {
650
+ float: right;
651
+ width: @horizontalComponentOffset - 20;
652
+ padding-top: 5px;
653
+ text-align: left;
654
+ }
655
+ // Move over all input controls and content
656
+ .controls {
657
+ // Super jank IE7 fix to ensure the inputs in .input-append and input-prepend
658
+ // don't inherit the margin of the parent, in this case .controls
659
+ *display: inline-block;
660
+ *padding-right: 20px;
661
+ margin-right: @horizontalComponentOffset;
662
+ *margin-right: 0;
663
+ &:first-child {
664
+ *padding-right: @horizontalComponentOffset;
665
+ }
666
+ }
667
+ // Remove bottom margin on block level help text since that's accounted for on .control-group
668
+ .help-block {
669
+ margin-bottom: 0;
670
+ }
671
+ // And apply it only to .help-block instances that follow a form control
672
+ input,
673
+ select,
674
+ textarea {
675
+ + .help-block {
676
+ margin-top: @baseLineHeight / 2;
677
+ }
678
+ }
679
+ // Move over buttons in .form-actions to align with .controls
680
+ .form-actions {
681
+ padding-right: @horizontalComponentOffset;
682
+ }
683
+ }