compass_twitter_bootstrap 2.0.3 → 2.2.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 (113) hide show
  1. data/CHANGELOG.md +6 -0
  2. data/README.md +41 -7
  3. data/build/convert.rb +27 -11
  4. data/lib/compass_twitter_bootstrap/version.rb +1 -1
  5. data/stylesheets/_compass_twitter_bootstrap.scss +2 -1
  6. data/stylesheets/_compass_twitter_bootstrap_awesome.scss +1 -1
  7. data/stylesheets/_compass_twitter_bootstrap_responsive.scss +1 -1
  8. data/stylesheets/compass_twitter_bootstrap/_accordion.scss +4 -3
  9. data/stylesheets/compass_twitter_bootstrap/_alerts.scss +31 -10
  10. data/stylesheets/compass_twitter_bootstrap/_breadcrumbs.scss +14 -14
  11. data/stylesheets/compass_twitter_bootstrap/_button-groups.scss +91 -55
  12. data/stylesheets/compass_twitter_bootstrap/_buttons.scss +126 -84
  13. data/stylesheets/compass_twitter_bootstrap/_carousel.scss +33 -23
  14. data/stylesheets/compass_twitter_bootstrap/_close.scss +7 -5
  15. data/stylesheets/compass_twitter_bootstrap/_code.scss +12 -8
  16. data/stylesheets/compass_twitter_bootstrap/_component-animations.scss +9 -7
  17. data/stylesheets/compass_twitter_bootstrap/_dropdowns.scss +112 -22
  18. data/stylesheets/compass_twitter_bootstrap/_font-awesome.scss +258 -196
  19. data/stylesheets/compass_twitter_bootstrap/_forms.scss +262 -161
  20. data/stylesheets/compass_twitter_bootstrap/_grid.scss +18 -2
  21. data/stylesheets/compass_twitter_bootstrap/_hero-unit.scss +11 -8
  22. data/stylesheets/compass_twitter_bootstrap/_labels-badges.scss +42 -26
  23. data/stylesheets/compass_twitter_bootstrap/_layouts.scss +3 -4
  24. data/stylesheets/compass_twitter_bootstrap/_media.scss +55 -0
  25. data/stylesheets/compass_twitter_bootstrap/_mixins.scss +243 -189
  26. data/stylesheets/compass_twitter_bootstrap/_modals.scss +28 -23
  27. data/stylesheets/compass_twitter_bootstrap/_navbar.scss +269 -143
  28. data/stylesheets/compass_twitter_bootstrap/_navs.scss +59 -46
  29. data/stylesheets/compass_twitter_bootstrap/_pager.scss +17 -12
  30. data/stylesheets/compass_twitter_bootstrap/_pagination.scss +92 -27
  31. data/stylesheets/compass_twitter_bootstrap/_popovers.scss +116 -36
  32. data/stylesheets/compass_twitter_bootstrap/_progress-bars.scss +35 -30
  33. data/stylesheets/compass_twitter_bootstrap/_reset.scss +101 -11
  34. data/stylesheets/compass_twitter_bootstrap/_responsive-1200px-min.scss +9 -7
  35. data/stylesheets/compass_twitter_bootstrap/_responsive-767px-max.scss +115 -71
  36. data/stylesheets/compass_twitter_bootstrap/_responsive-768px-979px.scss +8 -6
  37. data/stylesheets/compass_twitter_bootstrap/_responsive-navbar.scss +53 -14
  38. data/stylesheets/compass_twitter_bootstrap/_responsive-utilities.scss +17 -15
  39. data/stylesheets/compass_twitter_bootstrap/_responsive.scss +48 -0
  40. data/stylesheets/compass_twitter_bootstrap/_scaffolding.scss +27 -4
  41. data/stylesheets/compass_twitter_bootstrap/_sprites.scss +24 -22
  42. data/stylesheets/compass_twitter_bootstrap/_tables.scss +122 -61
  43. data/stylesheets/compass_twitter_bootstrap/_thumbnails.scss +12 -7
  44. data/stylesheets/compass_twitter_bootstrap/_tooltip.scss +50 -15
  45. data/stylesheets/compass_twitter_bootstrap/_type.scss +93 -93
  46. data/stylesheets/compass_twitter_bootstrap/_utilities.scss +9 -2
  47. data/stylesheets/compass_twitter_bootstrap/_variables.scss +134 -38
  48. data/stylesheets/compass_twitter_bootstrap/_wells.scss +11 -10
  49. data/stylesheets_sass/_compass_twitter_bootstrap.sass +2 -1
  50. data/stylesheets_sass/_compass_twitter_bootstrap_awesome.sass +1 -1
  51. data/stylesheets_sass/_compass_twitter_bootstrap_responsive.sass +1 -1
  52. data/stylesheets_sass/compass_twitter_bootstrap/_accordion.sass +4 -3
  53. data/stylesheets_sass/compass_twitter_bootstrap/_alerts.sass +27 -9
  54. data/stylesheets_sass/compass_twitter_bootstrap/_breadcrumbs.sass +12 -13
  55. data/stylesheets_sass/compass_twitter_bootstrap/_button-groups.sass +93 -55
  56. data/stylesheets_sass/compass_twitter_bootstrap/_buttons.sass +113 -88
  57. data/stylesheets_sass/compass_twitter_bootstrap/_carousel.sass +31 -23
  58. data/stylesheets_sass/compass_twitter_bootstrap/_close.sass +5 -4
  59. data/stylesheets_sass/compass_twitter_bootstrap/_code.sass +12 -9
  60. data/stylesheets_sass/compass_twitter_bootstrap/_component-animations.sass +7 -6
  61. data/stylesheets_sass/compass_twitter_bootstrap/_dropdowns.sass +105 -21
  62. data/stylesheets_sass/compass_twitter_bootstrap/_font-awesome.sass +228 -31
  63. data/stylesheets_sass/compass_twitter_bootstrap/_forms.sass +255 -155
  64. data/stylesheets_sass/compass_twitter_bootstrap/_grid.sass +16 -2
  65. data/stylesheets_sass/compass_twitter_bootstrap/_hero-unit.sass +10 -7
  66. data/stylesheets_sass/compass_twitter_bootstrap/_labels-badges.sass +38 -31
  67. data/stylesheets_sass/compass_twitter_bootstrap/_layouts.sass +3 -4
  68. data/stylesheets_sass/compass_twitter_bootstrap/_media.sass +48 -0
  69. data/stylesheets_sass/compass_twitter_bootstrap/_mixins.sass +215 -174
  70. data/stylesheets_sass/compass_twitter_bootstrap/_modals.sass +25 -26
  71. data/stylesheets_sass/compass_twitter_bootstrap/_navbar.sass +229 -134
  72. data/stylesheets_sass/compass_twitter_bootstrap/_navs.sass +53 -46
  73. data/stylesheets_sass/compass_twitter_bootstrap/_pager.sass +16 -12
  74. data/stylesheets_sass/compass_twitter_bootstrap/_pagination.sass +78 -23
  75. data/stylesheets_sass/compass_twitter_bootstrap/_popovers.sass +106 -40
  76. data/stylesheets_sass/compass_twitter_bootstrap/_progress-bars.sass +35 -30
  77. data/stylesheets_sass/compass_twitter_bootstrap/_reset.sass +80 -12
  78. data/stylesheets_sass/compass_twitter_bootstrap/_responsive-1200px-min.sass +8 -7
  79. data/stylesheets_sass/compass_twitter_bootstrap/_responsive-767px-max.sass +89 -54
  80. data/stylesheets_sass/compass_twitter_bootstrap/_responsive-768px-979px.sass +7 -6
  81. data/stylesheets_sass/compass_twitter_bootstrap/_responsive-navbar.sass +38 -13
  82. data/stylesheets_sass/compass_twitter_bootstrap/_responsive-utilities.sass +18 -17
  83. data/stylesheets_sass/compass_twitter_bootstrap/_responsive.sass +44 -0
  84. data/stylesheets_sass/compass_twitter_bootstrap/_scaffolding.sass +24 -4
  85. data/stylesheets_sass/compass_twitter_bootstrap/_sprites.sass +25 -8
  86. data/stylesheets_sass/compass_twitter_bootstrap/_tables.sass +110 -83
  87. data/stylesheets_sass/compass_twitter_bootstrap/_thumbnails.sass +11 -7
  88. data/stylesheets_sass/compass_twitter_bootstrap/_tooltip.sass +43 -19
  89. data/stylesheets_sass/compass_twitter_bootstrap/_type.sass +123 -75
  90. data/stylesheets_sass/compass_twitter_bootstrap/_utilities.sass +7 -2
  91. data/stylesheets_sass/compass_twitter_bootstrap/_variables.sass +141 -37
  92. data/stylesheets_sass/compass_twitter_bootstrap/_wells.sass +10 -9
  93. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  94. data/vendor/assets/fonts/fontawesome-webfont.svg +247 -167
  95. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  96. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  97. data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
  98. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  99. data/vendor/assets/javascripts/bootstrap-affix.js +117 -0
  100. data/vendor/assets/javascripts/bootstrap-alert.js +13 -4
  101. data/vendor/assets/javascripts/bootstrap-all.js +2 -1
  102. data/vendor/assets/javascripts/bootstrap-button.js +17 -8
  103. data/vendor/assets/javascripts/bootstrap-carousel.js +30 -14
  104. data/vendor/assets/javascripts/bootstrap-collapse.js +24 -14
  105. data/vendor/assets/javascripts/bootstrap-dropdown.js +80 -19
  106. data/vendor/assets/javascripts/bootstrap-modal.js +111 -84
  107. data/vendor/assets/javascripts/bootstrap-popover.js +21 -5
  108. data/vendor/assets/javascripts/bootstrap-scrollspy.js +21 -10
  109. data/vendor/assets/javascripts/bootstrap-tab.js +17 -8
  110. data/vendor/assets/javascripts/bootstrap-tooltip.js +36 -24
  111. data/vendor/assets/javascripts/bootstrap-transition.js +6 -7
  112. data/vendor/assets/javascripts/bootstrap-typeahead.js +87 -49
  113. metadata +17 -7
@@ -1,6 +1,6 @@
1
- // Forms.less
2
- // Base styles for various input types, form layouts, and states
3
- // -------------------------------------------------------------
1
+ //
2
+ // Forms
3
+ // --------------------------------------------------
4
4
 
5
5
 
6
6
  // GENERAL STYLES
@@ -22,12 +22,12 @@ legend {
22
22
  display: block;
23
23
  width: 100%;
24
24
  padding: 0;
25
- margin-bottom: $baseLineHeight * 1.5;
25
+ margin-bottom: $baseLineHeight;
26
26
  font-size: $baseFontSize * 1.5;
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 {
@@ -42,7 +42,7 @@ input,
42
42
  button,
43
43
  select,
44
44
  textarea {
45
- @include bootstrap-font-shorthand($baseFontSize,normal,$baseLineHeight); // Set size, weight, line-height here
45
+ @include ctb-font-shorthand($baseFontSize,normal,$baseLineHeight); // Set size, weight, line-height here
46
46
  }
47
47
  input,
48
48
  button,
@@ -55,93 +55,115 @@ textarea {
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
- padding: 4px;
70
- margin-bottom: 9px;
83
+ padding: 4px 6px;
84
+ margin-bottom: $baseLineHeight / 2;
71
85
  font-size: $baseFontSize;
72
86
  line-height: $baseLineHeight;
73
87
  color: $gray;
74
- background-color: $inputBackground;
75
- border: 1px solid $inputBorder;
76
- @include bootstrap-border-radius($inputBorderRadius);
88
+ @include ctb-border-radius($inputBorderRadius);
89
+ vertical-align: middle;
77
90
  }
78
- .uneditable-textarea {
79
- width: auto;
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 {
80
101
  height: auto;
81
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
+ @include ctb-box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
123
+ @include ctb-transition(#{border linear .2s, box-shadow linear .2s});
82
124
 
83
- // Inputs within a label
84
- label input,
85
- label textarea,
86
- label select {
87
- display: block;
125
+ // Focus state
126
+ &:focus {
127
+ border-color: rgba(82,168,236,.8);
128
+ outline: 0;
129
+ outline: thin dotted \9; /* IE6-9 */
130
+ @include ctb-box-shadow(#{inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)});
131
+ }
88
132
  }
89
133
 
90
- // Mini reset for unique input types
91
- input[type="image"],
92
- input[type="checkbox"],
93
- input[type="radio"] {
94
- width: auto;
95
- height: auto;
96
- padding: 0;
97
- margin: 3px 0;
134
+ // Position radios and checkboxes better
135
+ input[type="radio"],
136
+ input[type="checkbox"] {
137
+ margin: 4px 0 0;
98
138
  *margin-top: 0; /* IE7 */
139
+ margin-top: 1px \9; /* IE8-9 */
99
140
  line-height: normal;
100
- cursor: pointer;
101
- background-color: transparent;
102
- border: 0 \9; /* IE9 and down */
103
- @include bootstrap-border-radius(0);
104
- }
105
- input[type="image"] {
106
- border: 0;
107
- }
108
-
109
- // Reset the file input to browser defaults
110
- input[type="file"] {
111
- width: auto;
112
- padding: initial;
113
- line-height: initial;
114
- background-color: $inputBackground;
115
- background-color: initial;
116
- border: initial;
117
- @include bootstrap-box-shadow(none);
118
141
  }
119
142
 
120
- // Help out input buttons
121
- input[type="button"],
143
+ // Reset width of input images, buttons, radios, checkboxes
144
+ input[type="file"],
145
+ input[type="image"],
146
+ input[type="submit"],
122
147
  input[type="reset"],
123
- input[type="submit"] {
124
- width: auto;
125
- height: auto;
148
+ input[type="button"],
149
+ input[type="radio"],
150
+ input[type="checkbox"] {
151
+ width: auto; // Override of generic input selector
126
152
  }
127
153
 
128
154
  // Set the height of select and file controls to match text inputs
129
155
  select,
130
156
  input[type="file"] {
131
- height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */
157
+ height: $inputHeight; /* In IE7, the height of the select element cannot be changed by height, only font-size */
132
158
  *margin-top: 4px; /* For IE7, add top margin to align select with labels */
133
- line-height: 28px;
159
+ line-height: $inputHeight;
134
160
  }
135
161
 
136
- // Reset line-height for IE
137
- input[type="file"] {
138
- line-height: 18px \9;
139
- }
140
-
141
- // Chrome on Linux and Mobile Safari need background-color
162
+ // Make select elements obey height by applying a border
142
163
  select {
143
164
  width: 220px; // default input width + 10px of padding that doesn't get applied
144
- background-color: $inputBackground;
165
+ border: 1px solid $inputBorder;
166
+ background-color: $inputBackground; // Chrome on Linux and Mobile Safari need background-color
145
167
  }
146
168
 
147
169
  // Make multiple select elements height not fixed
@@ -150,22 +172,50 @@ select[size] {
150
172
  height: auto;
151
173
  }
152
174
 
153
- // Remove shadow from image inputs
154
- input[type="image"] {
155
- @include bootstrap-box-shadow(none);
175
+ // Focus for select, file, radio, and checkbox
176
+ select:focus,
177
+ input[type="file"]:focus,
178
+ input[type="radio"]:focus,
179
+ input[type="checkbox"]:focus {
180
+ @include ctb-tab-focus();
156
181
  }
157
182
 
158
- // Make textarea height behave
159
- textarea {
160
- height: auto;
183
+
184
+ // Uneditable inputs
185
+ // -------------------------
186
+
187
+ // Make uneditable inputs look inactive
188
+ .uneditable-input,
189
+ .uneditable-textarea {
190
+ color: $grayLight;
191
+ background-color: darken($inputBackground, 1%);
192
+ border-color: $inputBorder;
193
+ @include ctb-box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
194
+ cursor: not-allowed;
161
195
  }
162
196
 
163
- // Hidden inputs
164
- input[type="hidden"] {
165
- display: none;
197
+ // For text that needs to appear as an input but should not be an input
198
+ .uneditable-input {
199
+ overflow: hidden; // prevent text from wrapping, but still cut it off like an input does
200
+ white-space: nowrap;
201
+ }
202
+
203
+ // Make uneditable textareas behave like a textarea
204
+ .uneditable-textarea {
205
+ width: auto;
206
+ height: auto;
166
207
  }
167
208
 
168
209
 
210
+ // Placeholder
211
+ // -------------------------
212
+
213
+ // Placeholder text gets special styles because when browsers invalidate entire lines if it doesn't understand a selector
214
+ input,
215
+ textarea {
216
+ @include ctb-placeholder();
217
+ }
218
+
169
219
 
170
220
  // CHECKBOXES & RADIOS
171
221
  // -------------------
@@ -173,14 +223,13 @@ input[type="hidden"] {
173
223
  // Indent the labels to position radios/checkboxes as hanging
174
224
  .radio,
175
225
  .checkbox {
176
- min-height: 18px; // clear the floating input if there is no label text
177
- padding-left: 18px;
226
+ min-height: $baseLineHeight; // clear the floating input if there is no label text
227
+ padding-left: 20px;
178
228
  }
179
-
180
229
  .radio input[type="radio"],
181
230
  .checkbox input[type="checkbox"] {
182
231
  float: left;
183
- margin-left: -18px;
232
+ margin-left: -20px;
184
233
  }
185
234
 
186
235
  // Move the options list down to align with labels
@@ -205,32 +254,6 @@ input[type="hidden"] {
205
254
 
206
255
 
207
256
 
208
- // FOCUS STATE
209
- // -----------
210
-
211
- input,
212
- textarea {
213
- @include bootstrap-box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
214
- $transition: border linear .2s, box-shadow linear .2s;
215
- @include bootstrap-transition($transition);
216
- }
217
- input:focus,
218
- textarea:focus {
219
- border-color: rgba(82,168,236,.8);
220
- outline: 0;
221
- outline: thin dotted \9; /* IE6-9 */
222
- @include bootstrap-box-shadow("inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
223
- }
224
- input[type="file"]:focus,
225
- input[type="radio"]:focus,
226
- input[type="checkbox"]:focus,
227
- select:focus {
228
- @include bootstrap-tab-focus();
229
- @include bootstrap-box-shadow(none); // override for file inputs
230
- }
231
-
232
-
233
-
234
257
  // INPUT SIZES
235
258
  // -----------
236
259
 
@@ -255,13 +278,44 @@ textarea[class*="span"],
255
278
  float: none;
256
279
  margin-left: 0;
257
280
  }
281
+ // Ensure input-prepend/append never wraps
282
+ .input-append input[class*="span"],
283
+ .input-append .uneditable-input[class*="span"],
284
+ .input-prepend input[class*="span"],
285
+ .input-prepend .uneditable-input[class*="span"],
286
+ .row-fluid input[class*="span"],
287
+ .row-fluid select[class*="span"],
288
+ .row-fluid textarea[class*="span"],
289
+ .row-fluid .uneditable-input[class*="span"],
290
+ .row-fluid .input-prepend [class*="span"],
291
+ .row-fluid .input-append [class*="span"] {
292
+ display: inline-block;
293
+ }
258
294
 
259
295
 
260
296
 
261
297
  // GRID SIZING FOR INPUTS
262
298
  // ----------------------
263
299
 
264
- @include bootstrap-grid-input($gridColumnWidth, $gridGutterWidth);
300
+ // Grid sizes
301
+ @include ctb-grid-input($gridColumnWidth, $gridGutterWidth);
302
+
303
+ // Control row for multiple inputs per line
304
+ .controls-row {
305
+ @include ctb-clearfix(); // Clear the float from controls
306
+ }
307
+
308
+ // Float to collapse white-space for proper grid alignment
309
+ .controls-row [class*="span"],
310
+ // Redeclare the fluid grid collapse since we undo the float for inputs
311
+ .row-fluid .controls-row [class*="span"] {
312
+ float: left;
313
+ }
314
+ // Explicity set top padding on all checkboxes/radios, not just first-child
315
+ .controls-row .checkbox[class*="span"],
316
+ .controls-row .radio[class*="span"] {
317
+ padding-top: 5px;
318
+ }
265
319
 
266
320
 
267
321
 
@@ -278,7 +332,6 @@ select[readonly],
278
332
  textarea[readonly] {
279
333
  cursor: not-allowed;
280
334
  background-color: $inputDisabledBackground;
281
- border-color: #ddd;
282
335
  }
283
336
  // Explicitly reset the colors here
284
337
  input[type="radio"][disabled],
@@ -296,27 +349,32 @@ input[type="checkbox"][readonly] {
296
349
 
297
350
  // Warning
298
351
  .control-group.warning {
299
- @include bootstrap-formFieldState($warningText, $warningText, $warningBackground);
352
+ @include ctb-formFieldState($warningText, $warningText, $warningBackground);
300
353
  }
301
354
  // Error
302
355
  .control-group.error {
303
- @include bootstrap-formFieldState($errorText, $errorText, $errorBackground);
356
+ @include ctb-formFieldState($errorText, $errorText, $errorBackground);
304
357
  }
305
358
  // Success
306
359
  .control-group.success {
307
- @include bootstrap-formFieldState($successText, $successText, $successBackground);
360
+ @include ctb-formFieldState($successText, $successText, $successBackground);
361
+ }
362
+ // Success
363
+ .control-group.info {
364
+ @include ctb-formFieldState($infoText, $infoText, $infoBackground);
308
365
  }
309
366
 
310
367
  // HTML5 invalid states
311
368
  // Shares styles with the .control-group.error above
312
- input:focus:required:invalid,
313
- textarea:focus:required:invalid,
314
- select:focus:required:invalid {
369
+ input:focus:invalid,
370
+ textarea:focus:invalid,
371
+ select:focus:invalid {
315
372
  color: #b94a48;
316
373
  border-color: #ee5f5b;
317
374
  &:focus {
318
375
  border-color: darken(#ee5f5b, 10%);
319
- @include bootstrap-box-shadow(0 0 6px lighten(#ee5f5b, 20%));
376
+ $shadow: 0 0 6px lighten(#ee5f5b, 20%);
377
+ @include ctb-box-shadow($shadow);
320
378
  }
321
379
  }
322
380
 
@@ -330,23 +388,10 @@ select:focus:required:invalid {
330
388
  margin-top: $baseLineHeight;
331
389
  margin-bottom: $baseLineHeight;
332
390
  background-color: $formActionsBackground;
333
- border-top: 1px solid #ddd;
334
- @include bootstrap-clearfix(); // Adding clearfix to allow for .pull-right button containers
335
- }
336
-
337
- // For text that needs to appear as an input but should not be an input
338
- .uneditable-input {
339
- overflow: hidden; // prevent text from wrapping, but still cut it off like an input does
340
- white-space: nowrap;
341
- cursor: not-allowed;
342
- background-color: $inputBackground;
343
- border-color: #eee;
344
- @include bootstrap-box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
391
+ border-top: 1px solid #e5e5e5;
392
+ @include ctb-clearfix(); // Adding clearfix to allow for .pull-right button containers
345
393
  }
346
394
 
347
- // Placeholder text gets special styles; can't be bundled together though for some reason
348
- @include bootstrap-placeholder($grayLight);
349
-
350
395
 
351
396
 
352
397
  // HELP TEXT
@@ -354,7 +399,7 @@ select:focus:required:invalid {
354
399
 
355
400
  .help-block,
356
401
  .help-inline {
357
- color: $gray; // lighten the text some for contrast
402
+ color: lighten($textColor, 15%); // lighten the text some for contrast
358
403
  }
359
404
 
360
405
  .help-block {
@@ -364,7 +409,7 @@ select:focus:required:invalid {
364
409
 
365
410
  .help-inline {
366
411
  display: inline-block;
367
- @include bootstrap-ie7-inline-block();
412
+ @include ctb-ie7-inline-block();
368
413
  vertical-align: middle;
369
414
  padding-left: 5px;
370
415
  }
@@ -375,50 +420,59 @@ select:focus:required:invalid {
375
420
  // ------------
376
421
 
377
422
  // Allow us to put symbols and text within the input field for a cleaner look
378
- .input-prepend,
379
- .input-append {
423
+ .input-append,
424
+ .input-prepend {
380
425
  margin-bottom: 5px;
381
- @include bootstrap-clearfix(); // Clear the float to prevent wrapping
426
+ font-size: 0; // white space collapse hack
427
+ white-space: nowrap; // Prevent span and input from separating
428
+
429
+ // Reset the white space collapse hack
430
+ input,
431
+ select,
432
+ .uneditable-input,
433
+ .dropdown-menu {
434
+ font-size: $baseFontSize;
435
+ }
436
+
382
437
  input,
383
438
  select,
384
439
  .uneditable-input {
385
440
  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
386
441
  margin-bottom: 0; // prevent bottom margin from screwing up alignment in stacked forms
387
442
  *margin-left: 0;
388
- vertical-align: middle;
389
- @include bootstrap-border-radius(0 $inputBorderRadius $inputBorderRadius 0);
443
+ vertical-align: top;
444
+ @include ctb-border-radius(0 $inputBorderRadius $inputBorderRadius 0);
390
445
  // Make input on top when focused so blue border and shadow always show
391
446
  &:focus {
392
447
  z-index: 2;
393
448
  }
394
449
  }
395
- .uneditable-input {
396
- border-left-color: #ccc;
397
- }
398
450
  .add-on {
399
451
  display: inline-block;
400
452
  width: auto;
401
453
  height: $baseLineHeight;
402
454
  min-width: 16px;
403
455
  padding: 4px 5px;
456
+ font-size: $baseFontSize;
404
457
  font-weight: normal;
405
458
  line-height: $baseLineHeight;
406
459
  text-align: center;
407
460
  text-shadow: 0 1px 0 $white;
408
- vertical-align: middle;
409
461
  background-color: $grayLighter;
410
462
  border: 1px solid #ccc;
411
463
  }
412
464
  .add-on,
413
- .btn {
414
- margin-left: -1px;
415
- @include bootstrap-border-radius(0);
465
+ .btn,
466
+ .btn-group > .dropdown-toggle {
467
+ vertical-align: top;
468
+ @include ctb-border-radius(0);
416
469
  }
417
470
  .active {
418
471
  background-color: lighten($green, 30);
419
472
  border-color: $green;
420
473
  }
421
474
  }
475
+
422
476
  .input-prepend {
423
477
  .add-on,
424
478
  .btn {
@@ -426,56 +480,90 @@ select:focus:required:invalid {
426
480
  }
427
481
  .add-on:first-child,
428
482
  .btn:first-child {
429
- @include bootstrap-border-radius($inputBorderRadius 0 0 $inputBorderRadius);
483
+ // FYI, `.btn:first-child` accounts for a button group that's prepended
484
+ @include ctb-border-radius($inputBorderRadius 0 0 $inputBorderRadius);
430
485
  }
431
486
  }
487
+
432
488
  .input-append {
433
489
  input,
434
490
  select,
435
491
  .uneditable-input {
436
- @include bootstrap-border-radius($inputBorderRadius 0 0 $inputBorderRadius);
492
+ @include ctb-border-radius($inputBorderRadius 0 0 $inputBorderRadius);
493
+ + .btn-group .btn:last-child {
494
+ @include ctb-border-radius(0 $inputBorderRadius $inputBorderRadius 0);
495
+ }
437
496
  }
438
- .uneditable-input {
439
- border-right-color: #ccc;
440
- border-left-color: #eee;
497
+ .add-on,
498
+ .btn,
499
+ .btn-group {
500
+ margin-left: -1px;
441
501
  }
442
502
  .add-on:last-child,
443
- .btn:last-child {
444
- @include bootstrap-border-radius(0 $inputBorderRadius $inputBorderRadius 0);
503
+ .btn:last-child,
504
+ .btn-group:last-child > .dropdown-toggle {
505
+ @include ctb-border-radius(0 $inputBorderRadius $inputBorderRadius 0);
445
506
  }
446
507
  }
508
+
447
509
  // Remove all border-radius for inputs with both prepend and append
448
510
  .input-prepend.input-append {
449
511
  input,
450
512
  select,
451
513
  .uneditable-input {
452
- @include bootstrap-border-radius(0);
514
+ @include ctb-border-radius(0);
515
+ + .btn-group .btn {
516
+ @include ctb-border-radius(0 $inputBorderRadius $inputBorderRadius 0);
517
+ }
453
518
  }
454
519
  .add-on:first-child,
455
520
  .btn:first-child {
456
521
  margin-right: -1px;
457
- @include bootstrap-border-radius($inputBorderRadius 0 0 $inputBorderRadius);
522
+ @include ctb-border-radius($inputBorderRadius 0 0 $inputBorderRadius);
458
523
  }
459
524
  .add-on:last-child,
460
525
  .btn:last-child {
461
526
  margin-left: -1px;
462
- @include bootstrap-border-radius(0 $inputBorderRadius $inputBorderRadius 0);
527
+ @include ctb-border-radius(0 $inputBorderRadius $inputBorderRadius 0);
528
+ }
529
+ .btn-group:first-child {
530
+ margin-left: 0;
463
531
  }
464
532
  }
465
533
 
466
534
 
467
535
 
536
+
468
537
  // SEARCH FORM
469
538
  // -----------
470
539
 
471
- .search-query {
540
+ input.search-query {
472
541
  padding-right: 14px;
473
542
  padding-right: 4px \9;
474
543
  padding-left: 14px;
475
544
  padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */
476
- margin-bottom: 0; // remove the default margin on all inputs
477
- @include bootstrap-border-radius(14px);
545
+ margin-bottom: 0; // Remove the default margin on all inputs
546
+ @include ctb-border-radius(15px);
547
+ }
548
+
549
+ /* Allow for input prepend/append in search forms */
550
+ .form-search .input-append .search-query,
551
+ .form-search .input-prepend .search-query {
552
+ @include ctb-border-radius(0); // Override due to specificity
553
+ }
554
+ .form-search .input-append .search-query {
555
+ @include ctb-border-radius(14px 0 0 14px);
478
556
  }
557
+ .form-search .input-append .btn {
558
+ @include ctb-border-radius(0 14px 14px 0);
559
+ }
560
+ .form-search .input-prepend .search-query {
561
+ @include ctb-border-radius(0 14px 14px 0);
562
+ }
563
+ .form-search .input-prepend .btn {
564
+ @include ctb-border-radius(14px 0 0 14px);
565
+ }
566
+
479
567
 
480
568
 
481
569
 
@@ -496,8 +584,9 @@ select:focus:required:invalid {
496
584
  .input-prepend,
497
585
  .input-append {
498
586
  display: inline-block;
499
- @include bootstrap-ie7-inline-block();
587
+ @include ctb-ie7-inline-block();
500
588
  margin-bottom: 0;
589
+ vertical-align: middle;
501
590
  }
502
591
  // Re-hide hidden elements due to specifity
503
592
  .hide {
@@ -505,7 +594,9 @@ select:focus:required:invalid {
505
594
  }
506
595
  }
507
596
  .form-search label,
508
- .form-inline label {
597
+ .form-inline label,
598
+ .form-search .btn-group,
599
+ .form-inline .btn-group {
509
600
  display: inline-block;
510
601
  }
511
602
  // Remove margin for input-prepend/-append
@@ -553,12 +644,12 @@ legend + .control-group {
553
644
  // Increase spacing between groups
554
645
  .control-group {
555
646
  margin-bottom: $baseLineHeight;
556
- @include bootstrap-clearfix();
647
+ @include ctb-clearfix();
557
648
  }
558
649
  // Float the labels left
559
650
  .control-label {
560
651
  float: left;
561
- width: 140px;
652
+ width: $horizontalComponentOffset - 20;
562
653
  padding-top: 5px;
563
654
  text-align: right;
564
655
  }
@@ -568,19 +659,29 @@ legend + .control-group {
568
659
  // don't inherit the margin of the parent, in this case .controls
569
660
  *display: inline-block;
570
661
  *padding-left: 20px;
571
- margin-left: 160px;
662
+ margin-left: $horizontalComponentOffset;
572
663
  *margin-left: 0;
573
664
  &:first-child {
574
- *padding-left: 160px;
665
+ *padding-left: $horizontalComponentOffset;
575
666
  }
576
667
  }
577
668
  // Remove bottom margin on block level help text since that's accounted for on .control-group
578
669
  .help-block {
579
- margin-top: $baseLineHeight / 2;
580
670
  margin-bottom: 0;
581
671
  }
672
+ // And apply it only to .help-block instances that follow a form control
673
+ input,
674
+ select,
675
+ textarea,
676
+ .uneditable-input,
677
+ .input-prepend,
678
+ .input-append {
679
+ + .help-block {
680
+ margin-top: $baseLineHeight / 2;
681
+ }
682
+ }
582
683
  // Move over buttons in .form-actions to align with .controls
583
684
  .form-actions {
584
- padding-left: 160px;
685
+ padding-left: $horizontalComponentOffset;
585
686
  }
586
687
  }