bootstrap-generators 2.0.1 → 2.0.4

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 (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
@@ -27,7 +27,7 @@ legend {
27
27
  line-height: @baseLineHeight * 2;
28
28
  color: @grayDark;
29
29
  border: 0;
30
- border-bottom: 1px solid #eee;
30
+ border-bottom: 1px solid #e5e5e5;
31
31
 
32
32
  // Small
33
33
  small {
@@ -48,77 +48,108 @@ input,
48
48
  button,
49
49
  select,
50
50
  textarea {
51
- #font > #family > .sans-serif(); // And only set font-family here for those that need it (note the missing label element)
51
+ font-family: @baseFontFamily; // And only set font-family here for those that need it (note the missing label element)
52
52
  }
53
53
 
54
54
  // Identify controls by their labels
55
55
  label {
56
56
  display: block;
57
57
  margin-bottom: 5px;
58
- color: @grayDark;
59
58
  }
60
59
 
61
- // Inputs, Textareas, Selects
62
- input,
63
- textarea,
60
+ // Form controls
61
+ // -------------------------
62
+
63
+ // Shared size and type resets
64
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"],
65
80
  .uneditable-input {
66
81
  display: inline-block;
67
- width: 210px;
68
82
  height: @baseLineHeight;
69
83
  padding: 4px;
70
84
  margin-bottom: 9px;
71
85
  font-size: @baseFontSize;
72
86
  line-height: @baseLineHeight;
73
87
  color: @gray;
74
- border: 1px solid #ccc;
75
- .border-radius(3px);
76
88
  }
77
- .uneditable-textarea {
78
- width: auto;
89
+
90
+ // Reset appearance properties for textual inputs and textarea
91
+ // Declare width for legacy (can't be on input[type=*] selectors or it's too specific)
92
+ input,
93
+ textarea {
94
+ width: 210px;
95
+ }
96
+ // Reset height since textareas have rows
97
+ textarea {
79
98
  height: auto;
80
99
  }
100
+ // Everything else
101
+ textarea,
102
+ input[type="text"],
103
+ input[type="password"],
104
+ input[type="datetime"],
105
+ input[type="datetime-local"],
106
+ input[type="date"],
107
+ input[type="month"],
108
+ input[type="time"],
109
+ input[type="week"],
110
+ input[type="number"],
111
+ input[type="email"],
112
+ input[type="url"],
113
+ input[type="search"],
114
+ input[type="tel"],
115
+ input[type="color"],
116
+ .uneditable-input {
117
+ background-color: @inputBackground;
118
+ border: 1px solid @inputBorder;
119
+ .border-radius(@inputBorderRadius);
120
+ .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
121
+ @transition: border linear .2s, box-shadow linear .2s;
122
+ .transition(@transition);
81
123
 
82
- // Inputs within a label
83
- label input,
84
- label textarea,
85
- label select {
86
- display: block;
124
+ // Focus state
125
+ &:focus {
126
+ border-color: rgba(82,168,236,.8);
127
+ outline: 0;
128
+ outline: thin dotted \9; /* IE6-9 */
129
+ .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
130
+ }
87
131
  }
88
132
 
89
- // Mini reset for unique input types
90
- input[type="image"],
91
- input[type="checkbox"],
92
- input[type="radio"] {
93
- width: auto;
94
- height: auto;
95
- padding: 0;
133
+ // Position radios and checkboxes better
134
+ input[type="radio"],
135
+ input[type="checkbox"] {
96
136
  margin: 3px 0;
97
137
  *margin-top: 0; /* IE7 */
98
138
  line-height: normal;
99
139
  cursor: pointer;
100
- .border-radius(0);
101
- border: 0 \9; /* IE9 and down */
102
- }
103
- input[type="image"] {
104
- border: 0;
105
140
  }
106
141
 
107
- // Reset the file input to browser defaults
108
- input[type="file"] {
109
- width: auto;
110
- padding: initial;
111
- line-height: initial;
112
- border: initial;
113
- background-color: @white;
114
- background-color: initial;
115
- .box-shadow(none);
142
+ // Reset width of input buttons, radios, checkboxes
143
+ input[type="submit"],
144
+ input[type="reset"],
145
+ input[type="button"],
146
+ input[type="radio"],
147
+ input[type="checkbox"] {
148
+ width: auto; // Override of generic input selector
116
149
  }
117
150
 
118
- // Help out input buttons
119
- input[type="button"],
120
- input[type="reset"],
121
- input[type="submit"] {
151
+ // Make uneditable textareas behave like a textarea
152
+ .uneditable-textarea {
122
153
  width: auto;
123
154
  height: auto;
124
155
  }
@@ -131,15 +162,10 @@ input[type="file"] {
131
162
  line-height: 28px;
132
163
  }
133
164
 
134
- // Reset line-height for IE
135
- input[type="file"] {
136
- line-height: 18px \9;
137
- }
138
-
139
- // Chrome on Linux and Mobile Safari need background-color
165
+ // Make select elements obey height by applying a border
140
166
  select {
141
167
  width: 220px; // default input width + 10px of padding that doesn't get applied
142
- background-color: @white;
168
+ border: 1px solid #bbb;
143
169
  }
144
170
 
145
171
  // Make multiple select elements height not fixed
@@ -148,19 +174,12 @@ select[size] {
148
174
  height: auto;
149
175
  }
150
176
 
151
- // Remove shadow from image inputs
152
- input[type="image"] {
153
- .box-shadow(none);
154
- }
155
-
156
- // Make textarea height behave
157
- textarea {
158
- height: auto;
159
- }
160
-
161
- // Hidden inputs
162
- input[type="hidden"] {
163
- display: none;
177
+ // Focus for select, file, radio, and checkbox
178
+ select:focus,
179
+ input[type="file"]:focus,
180
+ input[type="radio"]:focus,
181
+ input[type="checkbox"]:focus {
182
+ .tab-focus();
164
183
  }
165
184
 
166
185
 
@@ -171,6 +190,7 @@ input[type="hidden"] {
171
190
  // Indent the labels to position radios/checkboxes as hanging
172
191
  .radio,
173
192
  .checkbox {
193
+ min-height: 18px; // clear the floating input if there is no label text
174
194
  padding-left: 18px;
175
195
  }
176
196
  .radio input[type="radio"],
@@ -201,33 +221,6 @@ input[type="hidden"] {
201
221
 
202
222
 
203
223
 
204
- // FOCUS STATE
205
- // -----------
206
-
207
- input,
208
- textarea {
209
- .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
210
- @transition: border linear .2s, box-shadow linear .2s;
211
- .transition(@transition);
212
- }
213
- input:focus,
214
- textarea:focus {
215
- border-color: rgba(82,168,236,.8);
216
- @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
217
- .box-shadow(@shadow);
218
- outline: 0;
219
- outline: thin dotted \9; /* IE6-9 */
220
- }
221
- input[type="file"]:focus,
222
- input[type="radio"]:focus,
223
- input[type="checkbox"]:focus,
224
- select:focus {
225
- .box-shadow(none); // override for file inputs
226
- .tab-focus();
227
- }
228
-
229
-
230
-
231
224
  // INPUT SIZES
232
225
  // -----------
233
226
 
@@ -243,18 +236,31 @@ select:focus {
243
236
  input[class*="span"],
244
237
  select[class*="span"],
245
238
  textarea[class*="span"],
246
- .uneditable-input {
239
+ .uneditable-input[class*="span"],
240
+ // Redeclare since the fluid row class is more specific
241
+ .row-fluid input[class*="span"],
242
+ .row-fluid select[class*="span"],
243
+ .row-fluid textarea[class*="span"],
244
+ .row-fluid .uneditable-input[class*="span"] {
247
245
  float: none;
248
246
  margin-left: 0;
249
247
  }
248
+ // Ensure input-prepend/append never wraps
249
+ .input-append input[class*="span"],
250
+ .input-append .uneditable-input[class*="span"],
251
+ .input-prepend input[class*="span"],
252
+ .input-prepend .uneditable-input[class*="span"],
253
+ .row-fluid .input-prepend [class*="span"],
254
+ .row-fluid .input-append [class*="span"] {
255
+ display: inline-block;
256
+ }
250
257
 
251
258
 
252
259
 
253
260
  // GRID SIZING FOR INPUTS
254
261
  // ----------------------
255
262
 
256
- #inputGridSystem > .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth);
257
-
263
+ #grid > .input(@gridColumnWidth, @gridGutterWidth);
258
264
 
259
265
 
260
266
 
@@ -268,9 +274,16 @@ textarea[disabled],
268
274
  input[readonly],
269
275
  select[readonly],
270
276
  textarea[readonly] {
271
- background-color: #f5f5f5;
272
- border-color: #ddd;
273
277
  cursor: not-allowed;
278
+ background-color: @inputDisabledBackground;
279
+ border-color: #ddd;
280
+ }
281
+ // Explicitly reset the colors here
282
+ input[type="radio"][disabled],
283
+ input[type="checkbox"][disabled],
284
+ input[type="radio"][readonly],
285
+ input[type="checkbox"][readonly] {
286
+ background-color: transparent;
274
287
  }
275
288
 
276
289
 
@@ -301,7 +314,7 @@ select:focus:required:invalid {
301
314
  border-color: #ee5f5b;
302
315
  &:focus {
303
316
  border-color: darken(#ee5f5b, 10%);
304
- .box-shadow(0 0 6px lighten(#ee5f5b, 20%));
317
+ .box-shadow(0 0 6px lighten(#ee5f5b, 20%));
305
318
  }
306
319
  }
307
320
 
@@ -314,38 +327,42 @@ select:focus:required:invalid {
314
327
  padding: (@baseLineHeight - 1) 20px @baseLineHeight;
315
328
  margin-top: @baseLineHeight;
316
329
  margin-bottom: @baseLineHeight;
317
- background-color: #f5f5f5;
318
- border-top: 1px solid #ddd;
330
+ background-color: @formActionsBackground;
331
+ border-top: 1px solid #e5e5e5;
332
+ .clearfix(); // Adding clearfix to allow for .pull-right button containers
319
333
  }
320
334
 
321
335
  // For text that needs to appear as an input but should not be an input
322
336
  .uneditable-input {
323
- display: block;
324
- background-color: @white;
337
+ overflow: hidden; // prevent text from wrapping, but still cut it off like an input does
338
+ white-space: nowrap;
339
+ cursor: not-allowed;
340
+ background-color: @inputBackground;
325
341
  border-color: #eee;
326
342
  .box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
327
- cursor: not-allowed;
328
343
  }
329
344
 
330
345
  // Placeholder text gets special styles; can't be bundled together though for some reason
331
- .placeholder(@grayLight);
346
+ .placeholder();
332
347
 
333
348
 
334
349
 
335
350
  // HELP TEXT
336
351
  // ---------
337
352
 
353
+ .help-block,
354
+ .help-inline {
355
+ color: @gray; // lighten the text some for contrast
356
+ }
357
+
338
358
  .help-block {
339
359
  display: block; // account for any element using help-block
340
- margin-top: 5px;
341
- margin-bottom: 0;
342
- color: @grayLight;
360
+ margin-bottom: @baseLineHeight / 2;
343
361
  }
344
362
 
345
363
  .help-inline {
346
364
  display: inline-block;
347
365
  .ie7-inline-block();
348
- margin-bottom: 9px;
349
366
  vertical-align: middle;
350
367
  padding-left: 5px;
351
368
  }
@@ -359,12 +376,16 @@ select:focus:required:invalid {
359
376
  .input-prepend,
360
377
  .input-append {
361
378
  margin-bottom: 5px;
362
- .clearfix(); // Clear the float to prevent wrapping
363
379
  input,
380
+ select,
364
381
  .uneditable-input {
365
- .border-radius(0 3px 3px 0);
382
+ 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
383
+ margin-bottom: 0; // prevent bottom margin from screwing up alignment in stacked forms
384
+ *margin-left: 0;
385
+ vertical-align: middle;
386
+ .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
387
+ // Make input on top when focused so blue border and shadow always show
366
388
  &:focus {
367
- position: relative;
368
389
  z-index: 2;
369
390
  }
370
391
  }
@@ -372,21 +393,23 @@ select:focus:required:invalid {
372
393
  border-left-color: #ccc;
373
394
  }
374
395
  .add-on {
375
- float: left;
376
- display: block;
396
+ display: inline-block;
377
397
  width: auto;
378
- min-width: 16px;
379
398
  height: @baseLineHeight;
380
- margin-right: -1px;
399
+ min-width: 16px;
381
400
  padding: 4px 5px;
382
401
  font-weight: normal;
383
402
  line-height: @baseLineHeight;
384
- color: @grayLight;
385
403
  text-align: center;
386
404
  text-shadow: 0 1px 0 @white;
387
- background-color: #f5f5f5;
405
+ vertical-align: middle;
406
+ background-color: @grayLighter;
388
407
  border: 1px solid #ccc;
389
- .border-radius(3px 0 0 3px);
408
+ }
409
+ .add-on,
410
+ .btn {
411
+ margin-left: -1px;
412
+ .border-radius(0);
390
413
  }
391
414
  .active {
392
415
  background-color: lighten(@green, 30);
@@ -394,33 +417,46 @@ select:focus:required:invalid {
394
417
  }
395
418
  }
396
419
  .input-prepend {
397
- .add-on {
398
- *margin-top: 1px; /* IE6-7 */
420
+ .add-on,
421
+ .btn {
422
+ margin-right: -1px;
423
+ }
424
+ .add-on:first-child,
425
+ .btn:first-child {
426
+ .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
399
427
  }
400
428
  }
401
429
  .input-append {
402
430
  input,
431
+ select,
403
432
  .uneditable-input {
404
- float: left;
405
- .border-radius(3px 0 0 3px);
433
+ .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
406
434
  }
407
435
  .uneditable-input {
436
+ border-right-color: #ccc;
408
437
  border-left-color: #eee;
409
- border-right-color: #ccc;
410
438
  }
411
- .add-on {
412
- margin-right: 0;
413
- margin-left: -1px;
414
- .border-radius(0 3px 3px 0);
439
+ .add-on:last-child,
440
+ .btn:last-child {
441
+ .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
415
442
  }
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
- }
443
+ }
444
+ // Remove all border-radius for inputs with both prepend and append
445
+ .input-prepend.input-append {
446
+ input,
447
+ select,
448
+ .uneditable-input {
449
+ .border-radius(0);
450
+ }
451
+ .add-on:first-child,
452
+ .btn:first-child {
453
+ margin-right: -1px;
454
+ .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
455
+ }
456
+ .add-on:last-child,
457
+ .btn:last-child {
458
+ margin-left: -1px;
459
+ .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
424
460
  }
425
461
  }
426
462
 
@@ -430,8 +466,10 @@ select:focus:required:invalid {
430
466
  // -----------
431
467
 
432
468
  .search-query {
433
- padding-left: 14px;
434
469
  padding-right: 14px;
470
+ padding-right: 4px \9;
471
+ padding-left: 14px;
472
+ padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */
435
473
  margin-bottom: 0; // remove the default margin on all inputs
436
474
  .border-radius(14px);
437
475
  }
@@ -451,8 +489,11 @@ select:focus:required:invalid {
451
489
  textarea,
452
490
  select,
453
491
  .help-inline,
454
- .uneditable-input {
492
+ .uneditable-input,
493
+ .input-prepend,
494
+ .input-append {
455
495
  display: inline-block;
496
+ .ie7-inline-block();
456
497
  margin-bottom: 0;
457
498
  }
458
499
  // Re-hide hidden elements due to specifity
@@ -461,28 +502,35 @@ select:focus:required:invalid {
461
502
  }
462
503
  }
463
504
  .form-search label,
464
- .form-inline label,
505
+ .form-inline label {
506
+ display: inline-block;
507
+ }
508
+ // Remove margin for input-prepend/-append
465
509
  .form-search .input-append,
466
510
  .form-inline .input-append,
467
511
  .form-search .input-prepend,
468
512
  .form-inline .input-prepend {
469
- display: inline-block;
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;
513
+ margin-bottom: 0;
477
514
  }
478
- // Inline checkbox/radio labels
515
+ // Inline checkbox/radio labels (remove padding on left)
479
516
  .form-search .radio,
480
- .form-inline .radio,
481
517
  .form-search .checkbox,
518
+ .form-inline .radio,
482
519
  .form-inline .checkbox {
520
+ padding-left: 0;
483
521
  margin-bottom: 0;
484
522
  vertical-align: middle;
485
523
  }
524
+ // Remove float and margin, set to inline-block
525
+ .form-search .radio input[type="radio"],
526
+ .form-search .checkbox input[type="checkbox"],
527
+ .form-inline .radio input[type="radio"],
528
+ .form-inline .checkbox input[type="checkbox"] {
529
+ float: left;
530
+ margin-right: 3px;
531
+ margin-left: 0;
532
+ }
533
+
486
534
 
487
535
  // Margin to space out fieldsets
488
536
  .control-group {
@@ -513,7 +561,20 @@ legend + .control-group {
513
561
  }
514
562
  // Move over all input controls and content
515
563
  .controls {
564
+ // Super jank IE7 fix to ensure the inputs in .input-append and input-prepend
565
+ // don't inherit the margin of the parent, in this case .controls
566
+ *display: inline-block;
567
+ *padding-left: 20px;
516
568
  margin-left: 160px;
569
+ *margin-left: 0;
570
+ &:first-child {
571
+ *padding-left: 160px;
572
+ }
573
+ }
574
+ // Remove bottom margin on block level help text since that's accounted for on .control-group
575
+ .help-block {
576
+ margin-top: @baseLineHeight / 2;
577
+ margin-bottom: 0;
517
578
  }
518
579
  // Move over buttons in .form-actions to align with .controls
519
580
  .form-actions {