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
  // GENERAL STYLES
6
6
  // --------------
@@ -19,12 +19,12 @@ legend
19
19
  display: block
20
20
  width: 100%
21
21
  padding: 0
22
- margin-bottom: $baseLineHeight * 1.5
22
+ margin-bottom: $baseLineHeight
23
23
  font-size: $baseFontSize * 1.5
24
24
  line-height: $baseLineHeight * 2
25
25
  color: $grayDark
26
26
  border: 0
27
- border-bottom: 1px solid #eee
27
+ border-bottom: 1px solid #e5e5e5
28
28
  // Small
29
29
  small
30
30
  font-size: $baseLineHeight * 0.75
@@ -37,7 +37,7 @@ input,
37
37
  button,
38
38
  select,
39
39
  textarea
40
- +bootstrap-font-shorthand($baseFontSize, normal, $baseLineHeight)
40
+ +ctb-font-shorthand($baseFontSize, normal, $baseLineHeight)
41
41
  // Set size, weight, line-height here
42
42
 
43
43
  input,
@@ -51,95 +51,122 @@ textarea
51
51
  label
52
52
  display: block
53
53
  margin-bottom: 5px
54
- color: $grayDark
55
54
 
56
- // Inputs, Textareas, Selects
55
+ // Form controls
56
+ // -------------------------
57
+
58
+ // Shared size and type resets
57
59
 
58
- input,
59
- textarea,
60
60
  select,
61
+ textarea,
62
+ input[type="text"],
63
+ input[type="password"],
64
+ input[type="datetime"],
65
+ input[type="datetime-local"],
66
+ input[type="date"],
67
+ input[type="month"],
68
+ input[type="time"],
69
+ input[type="week"],
70
+ input[type="number"],
71
+ input[type="email"],
72
+ input[type="url"],
73
+ input[type="search"],
74
+ input[type="tel"],
75
+ input[type="color"],
61
76
  .uneditable-input
62
77
  display: inline-block
63
- width: 210px
64
78
  height: $baseLineHeight
65
- padding: 4px
66
- margin-bottom: 9px
79
+ padding: 4px 6px
80
+ margin-bottom: $baseLineHeight / 2
67
81
  font-size: $baseFontSize
68
82
  line-height: $baseLineHeight
69
83
  color: $gray
70
- background-color: $inputBackground
71
- border: 1px solid $inputBorder
72
- +bootstrap-border-radius($inputBorderRadius)
84
+ +ctb-border-radius($inputBorderRadius)
85
+ vertical-align: middle
73
86
 
74
- .uneditable-textarea
75
- width: auto
87
+ // Reset appearance properties for textual inputs and textarea
88
+ // Declare width for legacy (can't be on input[type=*] selectors or it's too specific)
89
+
90
+ input,
91
+ textarea,
92
+ .uneditable-input
93
+ width: 206px
94
+ // plus 12px padding and 2px border
95
+
96
+ // Reset height since textareas have rows
97
+ textarea
76
98
  height: auto
77
99
 
78
- // Inputs within a label
100
+ // Everything else
79
101
 
80
- label input,
81
- label textarea,
82
- label select
83
- display: block
102
+ textarea,
103
+ input[type="text"],
104
+ input[type="password"],
105
+ input[type="datetime"],
106
+ input[type="datetime-local"],
107
+ input[type="date"],
108
+ input[type="month"],
109
+ input[type="time"],
110
+ input[type="week"],
111
+ input[type="number"],
112
+ input[type="email"],
113
+ input[type="url"],
114
+ input[type="search"],
115
+ input[type="tel"],
116
+ input[type="color"],
117
+ .uneditable-input
118
+ background-color: $inputBackground
119
+ border: 1px solid $inputBorder
120
+ +ctb-box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.075))
121
+ +ctb-transition(#{border linear 0.2s, box-shadow linear 0.2s})
122
+ // Focus state
123
+ &:focus
124
+ border-color: rgba(82, 168, 236, 0.8)
125
+ outline: 0
126
+ outline: thin dotted \9
127
+ /* IE6-9
128
+ +ctb-box-shadow(#{inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6)})
84
129
 
85
- // Mini reset for unique input types
130
+ // Position radios and checkboxes better
86
131
 
87
- input[type="image"],
88
- input[type="checkbox"],
89
- input[type="radio"]
90
- width: auto
91
- height: auto
92
- padding: 0
93
- margin: 3px 0
132
+ input[type="radio"],
133
+ input[type="checkbox"]
134
+ margin: 4px 0 0
94
135
  *margin-top: 0
95
136
  /* IE7
137
+ margin-top: 1px \9
138
+ /* IE8-9
96
139
  line-height: normal
97
- cursor: pointer
98
- background-color: transparent
99
- border: 0 \9
100
- /* IE9 and down
101
- +bootstrap-border-radius(0)
102
140
 
103
- input[type="image"]
104
- border: 0
141
+ // Reset width of input images, buttons, radios, checkboxes
105
142
 
106
- // Reset the file input to browser defaults
107
- input[type="file"]
108
- width: auto
109
- padding: initial
110
- line-height: initial
111
- background-color: $inputBackground
112
- background-color: initial
113
- border: initial
114
- +bootstrap-box-shadow(none)
115
-
116
- // Help out input buttons
117
-
118
- input[type="button"],
143
+ input[type="file"],
144
+ input[type="image"],
145
+ input[type="submit"],
119
146
  input[type="reset"],
120
- input[type="submit"]
147
+ input[type="button"],
148
+ input[type="radio"],
149
+ input[type="checkbox"]
121
150
  width: auto
122
- height: auto
151
+ // Override of generic input selector
123
152
 
124
153
  // Set the height of select and file controls to match text inputs
125
154
 
126
155
  select,
127
156
  input[type="file"]
128
- height: 28px
157
+ height: $inputHeight
129
158
  /* In IE7, the height of the select element cannot be changed by height, only font-size
130
159
  *margin-top: 4px
131
160
  /* For IE7, add top margin to align select with labels
132
- line-height: 28px
161
+ line-height: $inputHeight
133
162
 
134
- // Reset line-height for IE
135
- input[type="file"]
136
- line-height: 18px \9
137
-
138
- // Chrome on Linux and Mobile Safari need background-color
163
+ // Make select elements obey height by applying a border
139
164
  select
140
165
  width: 220px
141
166
  // default input width + 10px of padding that doesn't get applied
167
+ border: 1px solid $inputBorder
142
168
  background-color: $inputBackground
169
+ // Chrome on Linux and Mobile Safari need background-color
143
170
 
144
171
  // Make multiple select elements height not fixed
145
172
 
@@ -147,17 +174,46 @@ select[multiple],
147
174
  select[size]
148
175
  height: auto
149
176
 
150
- // Remove shadow from image inputs
151
- input[type="image"]
152
- +bootstrap-box-shadow(none)
177
+ // Focus for select, file, radio, and checkbox
153
178
 
154
- // Make textarea height behave
155
- textarea
179
+ select:focus,
180
+ input[type="file"]:focus,
181
+ input[type="radio"]:focus,
182
+ input[type="checkbox"]:focus
183
+ +ctb-tab-focus
184
+
185
+ // Uneditable inputs
186
+ // -------------------------
187
+
188
+ // Make uneditable inputs look inactive
189
+
190
+ .uneditable-input,
191
+ .uneditable-textarea
192
+ color: $grayLight
193
+ background-color: darken($inputBackground, 1%)
194
+ border-color: $inputBorder
195
+ +ctb-box-shadow(inset 0 1px 2px rgba(0, 0, 0, 0.025))
196
+ cursor: not-allowed
197
+
198
+ // For text that needs to appear as an input but should not be an input
199
+ .uneditable-input
200
+ overflow: hidden
201
+ // prevent text from wrapping, but still cut it off like an input does
202
+ white-space: nowrap
203
+
204
+ // Make uneditable textareas behave like a textarea
205
+ .uneditable-textarea
206
+ width: auto
156
207
  height: auto
157
208
 
158
- // Hidden inputs
159
- input[type="hidden"]
160
- display: none
209
+ // Placeholder
210
+ // -------------------------
211
+
212
+ // Placeholder text gets special styles because when browsers invalidate entire lines if it doesn't understand a selector
213
+
214
+ input,
215
+ textarea
216
+ +ctb-placeholder
161
217
 
162
218
  // CHECKBOXES & RADIOS
163
219
  // -------------------
@@ -166,14 +222,14 @@ input[type="hidden"]
166
222
 
167
223
  .radio,
168
224
  .checkbox
169
- min-height: 18px
225
+ min-height: $baseLineHeight
170
226
  // clear the floating input if there is no label text
171
- padding-left: 18px
227
+ padding-left: 20px
172
228
 
173
229
  .radio input[type="radio"],
174
230
  .checkbox input[type="checkbox"]
175
231
  float: left
176
- margin-left: -18px
232
+ margin-left: -20px
177
233
 
178
234
  // Move the options list down to align with labels
179
235
 
@@ -197,31 +253,6 @@ input[type="hidden"]
197
253
  margin-left: 10px
198
254
  // space out consecutive inline controls
199
255
 
200
- // FOCUS STATE
201
- // -----------
202
-
203
- input,
204
- textarea
205
- +bootstrap-box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.075))
206
- $transition: border linear 0.2s, box-shadow linear 0.2s
207
- +bootstrap-transition($transition)
208
-
209
- input:focus,
210
- textarea:focus
211
- border-color: rgba(82, 168, 236, 0.8)
212
- outline: 0
213
- outline: thin dotted \9
214
- /* IE6-9
215
- +bootstrap-box-shadow("inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)")
216
-
217
- input[type="file"]:focus,
218
- input[type="radio"]:focus,
219
- input[type="checkbox"]:focus,
220
- select:focus
221
- +bootstrap-tab-focus
222
- +bootstrap-box-shadow(none)
223
- // override for file inputs
224
-
225
256
  // INPUT SIZES
226
257
  // -----------
227
258
 
@@ -257,10 +288,42 @@ textarea[class*="span"],
257
288
  float: none
258
289
  margin-left: 0
259
290
 
291
+ // Ensure input-prepend/append never wraps
292
+
293
+ .input-append input[class*="span"],
294
+ .input-append .uneditable-input[class*="span"],
295
+ .input-prepend input[class*="span"],
296
+ .input-prepend .uneditable-input[class*="span"],
297
+ .row-fluid input[class*="span"],
298
+ .row-fluid select[class*="span"],
299
+ .row-fluid textarea[class*="span"],
300
+ .row-fluid .uneditable-input[class*="span"],
301
+ .row-fluid .input-prepend [class*="span"],
302
+ .row-fluid .input-append [class*="span"]
303
+ display: inline-block
304
+
260
305
  // GRID SIZING FOR INPUTS
261
306
  // ----------------------
262
307
 
263
- +bootstrap-grid-input($gridColumnWidth, $gridGutterWidth)
308
+ // Grid sizes
309
+ +ctb-grid-input($gridColumnWidth, $gridGutterWidth)
310
+
311
+ // Control row for multiple inputs per line
312
+ .controls-row
313
+ +ctb-clearfix
314
+ // Clear the float from controls
315
+
316
+ // Float to collapse white-space for proper grid alignment
317
+
318
+ .controls-row [class*="span"],
319
+ .row-fluid .controls-row [class*="span"]
320
+ float: left
321
+
322
+ // Explicity set top padding on all checkboxes/radios, not just first-child
323
+
324
+ .controls-row .checkbox[class*="span"],
325
+ .controls-row .radio[class*="span"]
326
+ padding-top: 5px
264
327
 
265
328
  // DISABLED STATE
266
329
  // --------------
@@ -275,7 +338,6 @@ select[readonly],
275
338
  textarea[readonly]
276
339
  cursor: not-allowed
277
340
  background-color: $inputDisabledBackground
278
- border-color: #ddd
279
341
 
280
342
  // Explicitly reset the colors here
281
343
 
@@ -290,27 +352,32 @@ input[type="checkbox"][readonly]
290
352
 
291
353
  // Warning
292
354
  .control-group.warning
293
- +bootstrap-formFieldState($warningText, $warningText, $warningBackground)
355
+ +ctb-formFieldState($warningText, $warningText, $warningBackground)
294
356
 
295
357
  // Error
296
358
  .control-group.error
297
- +bootstrap-formFieldState($errorText, $errorText, $errorBackground)
359
+ +ctb-formFieldState($errorText, $errorText, $errorBackground)
298
360
 
299
361
  // Success
300
362
  .control-group.success
301
- +bootstrap-formFieldState($successText, $successText, $successBackground)
363
+ +ctb-formFieldState($successText, $successText, $successBackground)
364
+
365
+ // Success
366
+ .control-group.info
367
+ +ctb-formFieldState($infoText, $infoText, $infoBackground)
302
368
 
303
369
  // HTML5 invalid states
304
370
  // Shares styles with the .control-group.error above
305
371
 
306
- input:focus:required:invalid,
307
- textarea:focus:required:invalid,
308
- select:focus:required:invalid
372
+ input:focus:invalid,
373
+ textarea:focus:invalid,
374
+ select:focus:invalid
309
375
  color: #b94a48
310
376
  border-color: #ee5f5b
311
377
  &:focus
312
378
  border-color: darken(#ee5f5b, 10%)
313
- +bootstrap-box-shadow(0 0 6px lighten(#ee5f5b, 20%))
379
+ $shadow: 0 0 6px lighten(#ee5f5b, 20%)
380
+ +ctb-box-shadow($shadow)
314
381
 
315
382
  // FORM ACTIONS
316
383
  // ------------
@@ -320,29 +387,16 @@ select:focus:required:invalid
320
387
  margin-top: $baseLineHeight
321
388
  margin-bottom: $baseLineHeight
322
389
  background-color: $formActionsBackground
323
- border-top: 1px solid #ddd
324
- +bootstrap-clearfix
390
+ border-top: 1px solid #e5e5e5
391
+ +ctb-clearfix
325
392
  // Adding clearfix to allow for .pull-right button containers
326
393
 
327
- // For text that needs to appear as an input but should not be an input
328
- .uneditable-input
329
- overflow: hidden
330
- // prevent text from wrapping, but still cut it off like an input does
331
- white-space: nowrap
332
- cursor: not-allowed
333
- background-color: $inputBackground
334
- border-color: #eee
335
- +bootstrap-box-shadow(inset 0 1px 2px rgba(0, 0, 0, 0.025))
336
-
337
- // Placeholder text gets special styles; can't be bundled together though for some reason
338
- +bootstrap-placeholder($grayLight)
339
-
340
394
  // HELP TEXT
341
395
  // ---------
342
396
 
343
397
  .help-block,
344
398
  .help-inline
345
- color: $gray
399
+ color: lighten($textColor, 15%)
346
400
  // lighten the text some for contrast
347
401
 
348
402
  .help-block
@@ -352,7 +406,7 @@ select:focus:required:invalid
352
406
 
353
407
  .help-inline
354
408
  display: inline-block
355
- +bootstrap-ie7-inline-block
409
+ +ctb-ie7-inline-block
356
410
  vertical-align: middle
357
411
  padding-left: 5px
358
412
 
@@ -361,11 +415,19 @@ select:focus:required:invalid
361
415
 
362
416
  // Allow us to put symbols and text within the input field for a cleaner look
363
417
 
364
- .input-prepend,
365
- .input-append
418
+ .input-append,
419
+ .input-prepend
366
420
  margin-bottom: 5px
367
- +bootstrap-clearfix
368
- // Clear the float to prevent wrapping
421
+ font-size: 0
422
+ // white space collapse hack
423
+ white-space: nowrap
424
+ // Prevent span and input from separating
425
+ // Reset the white space collapse hack
426
+ input,
427
+ select,
428
+ .uneditable-input,
429
+ .dropdown-menu
430
+ font-size: $baseFontSize
369
431
  input,
370
432
  select,
371
433
  .uneditable-input
@@ -374,30 +436,29 @@ select:focus:required:invalid
374
436
  margin-bottom: 0
375
437
  // prevent bottom margin from screwing up alignment in stacked forms
376
438
  *margin-left: 0
377
- vertical-align: middle
378
- +bootstrap-border-radius(0 $inputBorderRadius $inputBorderRadius 0)
439
+ vertical-align: top
440
+ +ctb-border-radius(0 $inputBorderRadius $inputBorderRadius 0)
379
441
  // Make input on top when focused so blue border and shadow always show
380
442
  &:focus
381
443
  z-index: 2
382
- .uneditable-input
383
- border-left-color: #ccc
384
444
  .add-on
385
445
  display: inline-block
386
446
  width: auto
387
447
  height: $baseLineHeight
388
448
  min-width: 16px
389
449
  padding: 4px 5px
450
+ font-size: $baseFontSize
390
451
  font-weight: normal
391
452
  line-height: $baseLineHeight
392
453
  text-align: center
393
454
  text-shadow: 0 1px 0 $white
394
- vertical-align: middle
395
455
  background-color: $grayLighter
396
456
  border: 1px solid #ccc
397
457
  .add-on,
398
- .btn
399
- margin-left: -1px
400
- +bootstrap-border-radius(0)
458
+ .btn,
459
+ .btn-group > .dropdown-toggle
460
+ vertical-align: top
461
+ +ctb-border-radius(0)
401
462
  .active
402
463
  background-color: lighten($green, 30)
403
464
  border-color: $green
@@ -408,47 +469,75 @@ select:focus:required:invalid
408
469
  margin-right: -1px
409
470
  .add-on:first-child,
410
471
  .btn:first-child
411
- +bootstrap-border-radius($inputBorderRadius 0 0 $inputBorderRadius)
472
+ // FYI, `.btn:first-child` accounts for a button group that's prepended
473
+ +ctb-border-radius($inputBorderRadius 0 0 $inputBorderRadius)
412
474
 
413
475
  .input-append
414
476
  input,
415
477
  select,
416
478
  .uneditable-input
417
- +bootstrap-border-radius($inputBorderRadius 0 0 $inputBorderRadius)
418
- .uneditable-input
419
- border-right-color: #ccc
420
- border-left-color: #eee
479
+ +ctb-border-radius($inputBorderRadius 0 0 $inputBorderRadius)
480
+ + .btn-group .btn:last-child
481
+ +ctb-border-radius(0 $inputBorderRadius $inputBorderRadius 0)
482
+ .add-on,
483
+ .btn,
484
+ .btn-group
485
+ margin-left: -1px
421
486
  .add-on:last-child,
422
- .btn:last-child
423
- +bootstrap-border-radius(0 $inputBorderRadius $inputBorderRadius 0)
487
+ .btn:last-child,
488
+ .btn-group:last-child > .dropdown-toggle
489
+ +ctb-border-radius(0 $inputBorderRadius $inputBorderRadius 0)
424
490
 
425
491
  // Remove all border-radius for inputs with both prepend and append
426
492
  .input-prepend.input-append
427
493
  input,
428
494
  select,
429
495
  .uneditable-input
430
- +bootstrap-border-radius(0)
496
+ +ctb-border-radius(0)
497
+ + .btn-group .btn
498
+ +ctb-border-radius(0 $inputBorderRadius $inputBorderRadius 0)
431
499
  .add-on:first-child,
432
500
  .btn:first-child
433
501
  margin-right: -1px
434
- +bootstrap-border-radius($inputBorderRadius 0 0 $inputBorderRadius)
502
+ +ctb-border-radius($inputBorderRadius 0 0 $inputBorderRadius)
435
503
  .add-on:last-child,
436
504
  .btn:last-child
437
505
  margin-left: -1px
438
- +bootstrap-border-radius(0 $inputBorderRadius $inputBorderRadius 0)
506
+ +ctb-border-radius(0 $inputBorderRadius $inputBorderRadius 0)
507
+ .btn-group:first-child
508
+ margin-left: 0
439
509
 
440
510
  // SEARCH FORM
441
511
  // -----------
442
512
 
443
- .search-query
513
+ input.search-query
444
514
  padding-right: 14px
445
515
  padding-right: 4px \9
446
516
  padding-left: 14px
447
517
  padding-left: 4px \9
448
518
  /* IE7-8 doesn't have border-radius, so don't indent the padding
449
519
  margin-bottom: 0
450
- // remove the default margin on all inputs
451
- +bootstrap-border-radius(14px)
520
+ // Remove the default margin on all inputs
521
+ +ctb-border-radius(15px)
522
+
523
+ /* Allow for input prepend/append in search forms
524
+
525
+ .form-search .input-append .search-query,
526
+ .form-search .input-prepend .search-query
527
+ +ctb-border-radius(0)
528
+ // Override due to specificity
529
+
530
+ .form-search .input-append .search-query
531
+ +ctb-border-radius(14px 0 0 14px)
532
+
533
+ .form-search .input-append .btn
534
+ +ctb-border-radius(0 14px 14px 0)
535
+
536
+ .form-search .input-prepend .search-query
537
+ +ctb-border-radius(0 14px 14px 0)
538
+
539
+ .form-search .input-prepend .btn
540
+ +ctb-border-radius(14px 0 0 14px)
452
541
 
453
542
  // HORIZONTAL & VERTICAL FORMS
454
543
  // ---------------------------
@@ -467,14 +556,17 @@ select:focus:required:invalid
467
556
  .input-prepend,
468
557
  .input-append
469
558
  display: inline-block
470
- +bootstrap-ie7-inline-block
559
+ +ctb-ie7-inline-block
471
560
  margin-bottom: 0
561
+ vertical-align: middle
472
562
  // Re-hide hidden elements due to specifity
473
563
  .hide
474
564
  display: none
475
565
 
476
566
  .form-search label,
477
- .form-inline label
567
+ .form-inline label,
568
+ .form-search .btn-group,
569
+ .form-inline .btn-group
478
570
  display: inline-block
479
571
 
480
572
  // Remove margin for input-prepend/-append
@@ -521,11 +613,11 @@ legend + .control-group
521
613
  // Increase spacing between groups
522
614
  .control-group
523
615
  margin-bottom: $baseLineHeight
524
- +bootstrap-clearfix
616
+ +ctb-clearfix
525
617
  // Float the labels left
526
618
  .control-label
527
619
  float: left
528
- width: 140px
620
+ width: $horizontalComponentOffset - 20
529
621
  padding-top: 5px
530
622
  text-align: right
531
623
  // Move over all input controls and content
@@ -534,14 +626,22 @@ legend + .control-group
534
626
  // don't inherit the margin of the parent, in this case .controls
535
627
  *display: inline-block
536
628
  *padding-left: 20px
537
- margin-left: 160px
629
+ margin-left: $horizontalComponentOffset
538
630
  *margin-left: 0
539
631
  &:first-child
540
- *padding-left: 160px
632
+ *padding-left: $horizontalComponentOffset
541
633
  // Remove bottom margin on block level help text since that's accounted for on .control-group
542
634
  .help-block
543
- margin-top: $baseLineHeight / 2
544
635
  margin-bottom: 0
636
+ // And apply it only to .help-block instances that follow a form control
637
+ input,
638
+ select,
639
+ textarea,
640
+ .uneditable-input,
641
+ .input-prepend,
642
+ .input-append
643
+ + .help-block
644
+ margin-top: $baseLineHeight / 2
545
645
  // Move over buttons in .form-actions to align with .controls
546
646
  .form-actions
547
- padding-left: 160px
647
+ padding-left: $horizontalComponentOffset