style-guide 0.2.1 → 0.3.0

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 (47) hide show
  1. data/Gemfile.lock +3 -2
  2. data/app/assets/stylesheets/style_guide/example.css +55 -6
  3. data/app/assets/stylesheets/style_guide/header.css +5 -5
  4. data/app/assets/stylesheets/style_guide/layout.css +3 -33
  5. data/app/assets/stylesheets/style_guide/navbar.css +25 -22
  6. data/app/assets/stylesheets/style_guide/sidebar.css +2 -0
  7. data/app/views/layouts/style_guide/application.html.erb +1 -1
  8. data/app/views/style_guide/{partials/_button_disabled_state.erb → bootstrap_base/_button:_disabled_anchor.erb} +0 -0
  9. data/app/views/style_guide/{partials/_button_element.erb → bootstrap_base/_button:_disabled_element.erb} +0 -0
  10. data/app/views/style_guide/{partials → bootstrap_base}/_button_sizes.erb +0 -0
  11. data/app/views/style_guide/{partials/_buttons.erb → bootstrap_base/_button_types.erb} +0 -0
  12. data/app/views/style_guide/bootstrap_base/_code:_blocks.erb +8 -0
  13. data/app/views/style_guide/{partials/_code_inline.erb → bootstrap_base/_code:_inline.erb} +0 -0
  14. data/app/views/style_guide/bootstrap_base/_form_controls:_checkbox_and_radio.erb +13 -0
  15. data/app/views/style_guide/bootstrap_base/_form_controls:_input.erb +1 -0
  16. data/app/views/style_guide/bootstrap_base/_form_controls:_select.erb +15 -0
  17. data/app/views/style_guide/bootstrap_base/_form_controls:_textarea.erb +1 -0
  18. data/app/views/style_guide/bootstrap_base/_forms:_default_styles.erb +12 -0
  19. data/app/views/style_guide/bootstrap_base/_forms:_horizontal.erb +22 -0
  20. data/app/views/style_guide/bootstrap_base/_forms:_inline.erb +8 -0
  21. data/app/views/style_guide/bootstrap_base/_forms:_search.erb +4 -0
  22. data/app/views/style_guide/bootstrap_base/_images.erb +136 -0
  23. data/app/views/style_guide/{partials → bootstrap_base}/_tables.erb +0 -0
  24. data/app/views/style_guide/{partials → bootstrap_base}/_typography.erb +0 -0
  25. data/app/views/style_guide/style/_example.erb +10 -0
  26. data/app/views/style_guide/style/show.html.erb +1 -6
  27. data/config/locales/en.yml +57 -0
  28. data/lib/style_guide/config.rb +1 -1
  29. data/lib/style_guide/engine.rb +2 -0
  30. data/lib/style_guide/section.rb +1 -1
  31. data/lib/style_guide/version.rb +1 -1
  32. data/spec/dummy/app/assets/stylesheets/application.css +0 -37
  33. data/spec/dummy/app/assets/stylesheets/swatches.css +26 -1
  34. data/spec/dummy/app/assets/stylesheets/three_dee.css +4 -0
  35. data/spec/dummy/app/views/styles/_00swatches.erb +8 -8
  36. data/spec/dummy/app/views/styles/_three_dee.erb +1 -0
  37. data/spec/dummy/config/locales/en.yml +6 -4
  38. data/spec/lib/style_guide/config_spec.rb +1 -1
  39. data/spec/lib/style_guide/section_spec.rb +3 -3
  40. data/style-guide.gemspec +1 -0
  41. metadata +41 -16
  42. data/app/assets/stylesheets/docs.css +0 -153
  43. data/app/assets/stylesheets/responsive.css +0 -164
  44. data/app/views/style_guide/partials/_code_blocks.erb +0 -12
  45. data/app/views/style_guide/partials/_forms.erb +0 -714
  46. data/app/views/style_guide/partials/_images.erb +0 -318
  47. data/spec/dummy/app/views/styles/_info-header.erb +0 -1
@@ -1,164 +0,0 @@
1
- @media (min-width: 1200px) {
2
- .bs-docs-container {
3
- max-width: 970px;
4
- }
5
- .bs-docs-sidenav {
6
- width: 258px;
7
- }
8
- .bs-docs-sidenav > li > a {
9
- }
10
- }
11
-
12
- @media (max-width: 980px) {
13
- body > .navbar-fixed-top .brand {
14
- float: left;
15
- margin-left: 0;
16
- padding-left: 10px;
17
- padding-right: 10px;
18
- }
19
-
20
- .quick-links li {
21
- display: inline-block;
22
- margin: 5px;
23
- }
24
-
25
- .bs-docs-sidenav {
26
- top: 0;
27
- margin-top: 30px;
28
- margin-right: 0;
29
- }
30
- }
31
-
32
- @media (min-width: 768px) and (max-width: 980px) {
33
- body {
34
- padding-top: 0;
35
- }
36
- .jumbotron {
37
- }
38
- .bs-docs-sidenav {
39
- width: 166px;
40
- margin-top: 20px;
41
- }
42
- .bs-docs-sidenav.affix {
43
- top: 0;
44
- }
45
- }
46
-
47
- @media (max-width: 767px) {
48
- body {
49
- padding-top: 0;
50
- }
51
-
52
- .jumbotron {
53
- padding: 40px 20px;
54
- margin-right: -20px;
55
- margin-left: -20px;
56
- }
57
- .masthead h1 {
58
- font-size: 90px;
59
- }
60
- .masthead p,
61
- .masthead .btn {
62
- font-size: 24px;
63
- }
64
- .marketing .span4 {
65
- margin-bottom: 40px;
66
- }
67
- .bs-docs-social {
68
- margin: 0 -20px;
69
- }
70
-
71
- .show-grid [class*="span"] {
72
- margin-bottom: 5px;
73
- }
74
-
75
- .bs-docs-sidenav {
76
- width: auto;
77
- margin-bottom: 20px;
78
- }
79
- .bs-docs-sidenav.affix {
80
- position: static;
81
- width: auto;
82
- top: 0;
83
- }
84
-
85
- .footer {
86
- margin-left: -20px;
87
- margin-right: -20px;
88
- padding-left: 20px;
89
- padding-right: 20px;
90
- }
91
- .footer p {
92
- margin-bottom: 9px;
93
- }
94
- }
95
-
96
- @media (max-width: 480px) {
97
- body {
98
- padding-top: 0;
99
- }
100
-
101
- h2 small {
102
- display: block;
103
- }
104
-
105
- .jumbotron h1 {
106
- font-size: 45px;
107
- }
108
- .jumbotron p,
109
- .jumbotron .btn {
110
- font-size: 18px;
111
- }
112
- .jumbotron .btn {
113
- display: block;
114
- margin: 0 auto;
115
- }
116
-
117
- .subhead h1,
118
- .subhead p {
119
- text-align: center;
120
- }
121
-
122
- .marketing h1 {
123
- font-size: 30px;
124
- }
125
- .marketing-byline {
126
- font-size: 18px;
127
- }
128
-
129
- .example-sites {
130
- margin-left: 0;
131
- }
132
- .example-sites > li {
133
- float: none;
134
- display: block;
135
- max-width: 280px;
136
- margin: 0 auto 18px;
137
- text-align: center;
138
- }
139
- .example-sites .thumbnail > img {
140
- max-width: 270px;
141
- }
142
-
143
- table code {
144
- white-space: normal;
145
- word-wrap: break-word;
146
- word-break: break-all;
147
- }
148
-
149
- .modal-example .modal {
150
- position: relative;
151
- top: auto;
152
- right: auto;
153
- bottom: auto;
154
- left: auto;
155
- }
156
-
157
- .footer {
158
- padding-top: 20px;
159
- padding-bottom: 20px;
160
- }
161
- .footer .pull-right {
162
- float: none;
163
- }
164
- }
@@ -1,12 +0,0 @@
1
- <p>
2
- Use <code>&lt;pre&gt;</code> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.
3
- </p>
4
-
5
- <pre>
6
- def find(*file_names)
7
- pathname.ascend do |path|
8
- file_name = file_names.detect { |fn| path.join(fn).file? }
9
- break path.join(file_name) if file_name
10
- end
11
- end
12
- </pre>
@@ -1,714 +0,0 @@
1
-
2
-
3
-
4
- <!-- Forms
5
- ================================================== -->
6
- <section id="forms">
7
- <div class="page-header">
8
- <h1>Forms</h1>
9
- </div>
10
-
11
- <h2>Default styles</h2>
12
- <p>Individual form controls receive styling, but without any required base class on the <code>&lt;form&gt;</code> or large changes in markup. Results in stacked, left-aligned labels on top of form controls.</p>
13
- <form class="bs-docs-example">
14
- <fieldset>
15
- <legend>Legend</legend>
16
- <label>Label name</label>
17
- <input type="text" placeholder="Type something…">
18
- <span class="help-block">Example block-level help text here.</span>
19
- <label class="checkbox">
20
- <input type="checkbox"> Check me out
21
- </label>
22
- <button type="submit" class="btn">Submit</button>
23
- </fieldset>
24
- </form>
25
- <pre class="prettyprint linenums">
26
- &lt;form&gt;
27
- &lt;fieldset&gt;
28
- &lt;legend&gt;Legend&lt;/legend&gt;
29
- &lt;label&gt;Label name&lt;/label&gt;
30
- &lt;input type="text" placeholder="Type something…"&gt;
31
- &lt;span class="help-block"&gt;Example block-level help text here.&lt;/span&gt;
32
- &lt;label class="checkbox"&gt;
33
- &lt;input type="checkbox"&gt; Check me out
34
- &lt;/label&gt;
35
- &lt;button type="submit" class="btn"&gt;Submit&lt;/button&gt;
36
- &lt;/fieldset&gt;
37
- &lt;/form&gt;
38
- </pre>
39
-
40
-
41
- <hr class="bs-docs-separator">
42
-
43
-
44
- <h2>Optional layouts</h2>
45
- <p>Included with Bootstrap are three optional form layouts for common use cases.</p>
46
-
47
- <h3>Search form</h3>
48
- <p>Add <code>.form-search</code> to the form and <code>.search-query</code> to the <code>&lt;input&gt;</code> for an extra-rounded text input.</p>
49
- <form class="bs-docs-example form-search">
50
- <input type="text" class="input-medium search-query">
51
- <button type="submit" class="btn">Search</button>
52
- </form>
53
- <pre class="prettyprint linenums">
54
- &lt;form class="form-search"&gt;
55
- &lt;input type="text" class="input-medium search-query"&gt;
56
- &lt;button type="submit" class="btn"&gt;Search&lt;/button&gt;
57
- &lt;/form&gt;
58
- </pre>
59
-
60
- <h3>Inline form</h3>
61
- <p>Add <code>.form-inline</code> for left-aligned labels and inline-block controls for a compact layout.</p>
62
- <form class="bs-docs-example form-inline">
63
- <input type="text" class="input-small" placeholder="Email">
64
- <input type="password" class="input-small" placeholder="Password">
65
- <label class="checkbox">
66
- <input type="checkbox"> Remember me
67
- </label>
68
- <button type="submit" class="btn">Sign in</button>
69
- </form>
70
- <pre class="prettyprint linenums">
71
- &lt;form class="form-inline"&gt;
72
- &lt;input type="text" class="input-small" placeholder="Email"&gt;
73
- &lt;input type="password" class="input-small" placeholder="Password"&gt;
74
- &lt;label class="checkbox"&gt;
75
- &lt;input type="checkbox"&gt; Remember me
76
- &lt;/label&gt;
77
- &lt;button type="submit" class="btn"&gt;Sign in&lt;/button&gt;
78
- &lt;/form&gt;
79
- </pre>
80
-
81
- <h3>Horizontal form</h3>
82
- <p>Right align labels and float them to the left to make them appear on the same line as controls. Requires the most markup changes from a default form:</p>
83
- <ul>
84
- <li>Add <code>.form-horizontal</code> to the form</li>
85
- <li>Wrap labels and controls in <code>.control-group</code></li>
86
- <li>Add <code>.control-label</code> to the label</li>
87
- <li>Wrap any associated controls in <code>.controls</code> for proper alignment</li>
88
- </ul>
89
- <form class="bs-docs-example form-horizontal">
90
- <div class="control-group">
91
- <label class="control-label" for="inputEmail">Email</label>
92
- <div class="controls">
93
- <input type="text" id="inputEmail" placeholder="Email">
94
- </div>
95
- </div>
96
- <div class="control-group">
97
- <label class="control-label" for="inputPassword">Password</label>
98
- <div class="controls">
99
- <input type="password" id="inputPassword" placeholder="Password">
100
- </div>
101
- </div>
102
- <div class="control-group">
103
- <div class="controls">
104
- <label class="checkbox">
105
- <input type="checkbox"> Remember me
106
- </label>
107
- <button type="submit" class="btn">Sign in</button>
108
- </div>
109
- </div>
110
- </form>
111
- <pre class="prettyprint linenums">
112
- &lt;form class="form-horizontal"&gt;
113
- &lt;div class="control-group"&gt;
114
- &lt;label class="control-label" for="inputEmail"&gt;Email&lt;/label&gt;
115
- &lt;div class="controls"&gt;
116
- &lt;input type="text" id="inputEmail" placeholder="Email"&gt;
117
- &lt;/div&gt;
118
- &lt;/div&gt;
119
- &lt;div class="control-group"&gt;
120
- &lt;label class="control-label" for="inputPassword"&gt;Password&lt;/label&gt;
121
- &lt;div class="controls"&gt;
122
- &lt;input type="password" id="inputPassword" placeholder="Password"&gt;
123
- &lt;/div&gt;
124
- &lt;/div&gt;
125
- &lt;div class="control-group"&gt;
126
- &lt;div class="controls"&gt;
127
- &lt;label class="checkbox"&gt;
128
- &lt;input type="checkbox"&gt; Remember me
129
- &lt;/label&gt;
130
- &lt;button type="submit" class="btn"&gt;Sign in&lt;/button&gt;
131
- &lt;/div&gt;
132
- &lt;/div&gt;
133
- &lt;/form&gt;
134
- </pre>
135
-
136
-
137
- <hr class="bs-docs-separator">
138
-
139
-
140
- <h2>Supported form controls</h2>
141
- <p>Examples of standard form controls supported in an example form layout.</p>
142
-
143
- <h3>Inputs</h3>
144
- <p>Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.</p>
145
- <p>Requires the use of a specified <code>type</code> at all times.</p>
146
- <form class="bs-docs-example form-inline">
147
- <input type="text" placeholder="Text input">
148
- </form>
149
- <pre class="prettyprint linenums">
150
- &lt;input type="text" placeholder="Text input"&gt;
151
- </pre>
152
-
153
- <h3>Textarea</h3>
154
- <p>Form control which supports multiple lines of text. Change <code>rows</code> attribute as necessary.</p>
155
- <form class="bs-docs-example form-inline">
156
- <textarea rows="3"></textarea>
157
- </form>
158
- <pre class="prettyprint linenums">
159
- &lt;textarea rows="3"&gt;&lt;/textarea&gt;
160
- </pre>
161
-
162
- <h3>Checkboxes and radios</h3>
163
- <p>Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.</p>
164
- <h4>Default (stacked)</h4>
165
- <form class="bs-docs-example">
166
- <label class="checkbox">
167
- <input type="checkbox" value="">
168
- Option one is this and that&mdash;be sure to include why it's great
169
- </label>
170
- <br>
171
- <label class="radio">
172
- <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
173
- Option one is this and that&mdash;be sure to include why it's great
174
- </label>
175
- <label class="radio">
176
- <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
177
- Option two can be something else and selecting it will deselect option one
178
- </label>
179
- </form>
180
- <pre class="prettyprint linenums">
181
- &lt;label class="checkbox"&gt;
182
- &lt;input type="checkbox" value=""&gt;
183
- Option one is this and that&mdash;be sure to include why it's great
184
- &lt;/label&gt;
185
-
186
- &lt;label class="radio"&gt;
187
- &lt;input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked&gt;
188
- Option one is this and that&mdash;be sure to include why it's great
189
- &lt;/label&gt;
190
- &lt;label class="radio"&gt;
191
- &lt;input type="radio" name="optionsRadios" id="optionsRadios2" value="option2"&gt;
192
- Option two can be something else and selecting it will deselect option one
193
- &lt;/label&gt;
194
- </pre>
195
-
196
- <h4>Inline checkboxes</h4>
197
- <p>Add the <code>.inline</code> class to a series of checkboxes or radios for controls appear on the same line.</p>
198
- <form class="bs-docs-example">
199
- <label class="checkbox inline">
200
- <input type="checkbox" id="inlineCheckbox1" value="option1"> 1
201
- </label>
202
- <label class="checkbox inline">
203
- <input type="checkbox" id="inlineCheckbox2" value="option2"> 2
204
- </label>
205
- <label class="checkbox inline">
206
- <input type="checkbox" id="inlineCheckbox3" value="option3"> 3
207
- </label>
208
- </form>
209
- <pre class="prettyprint linenums">
210
- &lt;label class="checkbox inline"&gt;
211
- &lt;input type="checkbox" id="inlineCheckbox1" value="option1"&gt; 1
212
- &lt;/label&gt;
213
- &lt;label class="checkbox inline"&gt;
214
- &lt;input type="checkbox" id="inlineCheckbox2" value="option2"&gt; 2
215
- &lt;/label&gt;
216
- &lt;label class="checkbox inline"&gt;
217
- &lt;input type="checkbox" id="inlineCheckbox3" value="option3"&gt; 3
218
- &lt;/label&gt;
219
- </pre>
220
-
221
- <h3>Selects</h3>
222
- <p>Use the default option or specify a <code>multiple="multiple"</code> to show multiple options at once.</p>
223
- <form class="bs-docs-example">
224
- <select>
225
- <option>1</option>
226
- <option>2</option>
227
- <option>3</option>
228
- <option>4</option>
229
- <option>5</option>
230
- </select>
231
- <br>
232
- <select multiple="multiple">
233
- <option>1</option>
234
- <option>2</option>
235
- <option>3</option>
236
- <option>4</option>
237
- <option>5</option>
238
- </select>
239
- </form>
240
- <pre class="prettyprint linenums">
241
- &lt;select&gt;
242
- &lt;option&gt;1&lt;/option&gt;
243
- &lt;option&gt;2&lt;/option&gt;
244
- &lt;option&gt;3&lt;/option&gt;
245
- &lt;option&gt;4&lt;/option&gt;
246
- &lt;option&gt;5&lt;/option&gt;
247
- &lt;/select&gt;
248
-
249
- &lt;select multiple="multiple"&gt;
250
- &lt;option&gt;1&lt;/option&gt;
251
- &lt;option&gt;2&lt;/option&gt;
252
- &lt;option&gt;3&lt;/option&gt;
253
- &lt;option&gt;4&lt;/option&gt;
254
- &lt;option&gt;5&lt;/option&gt;
255
- &lt;/select&gt;
256
- </pre>
257
-
258
-
259
- <hr class="bs-docs-separator">
260
-
261
-
262
- <h2>Extending form controls</h2>
263
- <p>Adding on top of existing browser controls, Bootstrap includes other useful form components.</p>
264
-
265
- <h3>Prepended and appended inputs</h3>
266
- <p>Add text or buttons before or after any text-based input. Do note that <code>select</code> elements are not supported here.</p>
267
-
268
- <h4>Default options</h4>
269
- <p>Wrap an <code>.add-on</code> and an <code>input</code> with one of two classes to prepend or append text to an input.</p>
270
- <form class="bs-docs-example">
271
- <div class="input-prepend">
272
- <span class="add-on">@</span>
273
- <input class="span2" id="prependedInput" type="text" placeholder="Username">
274
- </div>
275
- <br>
276
- <div class="input-append">
277
- <input class="span2" id="appendedInput" type="text">
278
- <span class="add-on">.00</span>
279
- </div>
280
- </form>
281
- <pre class="prettyprint linenums">
282
- &lt;div class="input-prepend"&gt;
283
- &lt;span class="add-on"&gt;@&lt;/span&gt;
284
- &lt;input class="span2" id="prependedInput" type="text" placeholder="Username"&gt;
285
- &lt;/div&gt;
286
- &lt;div class="input-append"&gt;
287
- &lt;input class="span2" id="appendedInput" type="text"&gt;
288
- &lt;span class="add-on"&gt;.00&lt;/span&gt;
289
- &lt;/div&gt;
290
- </pre>
291
-
292
- <h4>Combined</h4>
293
- <p>Use both classes and two instances of <code>.add-on</code> to prepend and append an input.</p>
294
- <form class="bs-docs-example form-inline">
295
- <div class="input-prepend input-append">
296
- <span class="add-on">$</span>
297
- <input class="span2" id="appendedPrependedInput" type="text">
298
- <span class="add-on">.00</span>
299
- </div>
300
- </form>
301
- <pre class="prettyprint linenums">
302
- &lt;div class="input-prepend input-append"&gt;
303
- &lt;span class="add-on"&gt;$&lt;/span&gt;
304
- &lt;input class="span2" id="appendedPrependedInput" type="text"&gt;
305
- &lt;span class="add-on"&gt;.00&lt;/span&gt;
306
- &lt;/div&gt;
307
- </pre>
308
-
309
- <h4>Buttons instead of text</h4>
310
- <p>Instead of a <code>&lt;span&gt;</code> with text, use a <code>.btn</code> to attach a button (or two) to an input.</p>
311
- <form class="bs-docs-example">
312
- <div class="input-append">
313
- <input class="span2" id="appendedInputButton" type="text">
314
- <button class="btn" type="button">Go!</button>
315
- </div>
316
- </form>
317
- <pre class="prettyprint linenums">
318
- &lt;div class="input-append"&gt;
319
- &lt;input class="span2" id="appendedInputButton" type="text"&gt;
320
- &lt;button class="btn" type="button"&gt;Go!&lt;/button&gt;
321
- &lt;/div&gt;
322
- </pre>
323
- <form class="bs-docs-example">
324
- <div class="input-append">
325
- <input class="span2" id="appendedInputButtons" type="text">
326
- <button class="btn" type="button">Search</button>
327
- <button class="btn" type="button">Options</button>
328
- </div>
329
- </form>
330
- <pre class="prettyprint linenums">
331
- &lt;div class="input-append"&gt;
332
- &lt;input class="span2" id="appendedInputButtons" type="text"&gt;
333
- &lt;button class="btn" type="button"&gt;Search&lt;/button&gt;
334
- &lt;button class="btn" type="button"&gt;Options&lt;/button&gt;
335
- &lt;/div&gt;
336
- </pre>
337
-
338
- <h4>Button dropdowns</h4>
339
- <p></p>
340
- <form class="bs-docs-example">
341
- <div class="input-append">
342
- <input class="span2" id="appendedDropdownButton" type="text">
343
- <div class="btn-group">
344
- <button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
345
- <ul class="dropdown-menu">
346
- <li><a href="#">Action</a></li>
347
- <li><a href="#">Another action</a></li>
348
- <li><a href="#">Something else here</a></li>
349
- <li class="divider"></li>
350
- <li><a href="#">Separated link</a></li>
351
- </ul>
352
- </div><!-- /btn-group -->
353
- </div><!-- /input-append -->
354
- </form>
355
- <pre class="prettyprint linenums">
356
- &lt;div class="input-append"&gt;
357
- &lt;input class="span2" id="appendedDropdownButton" type="text"&gt;
358
- &lt;div class="btn-group"&gt;
359
- &lt;button class="btn dropdown-toggle" data-toggle="dropdown"&gt;
360
- Action
361
- &lt;span class="caret"&gt;&lt;/span&gt;
362
- &lt;/button&gt;
363
- &lt;ul class="dropdown-menu"&gt;
364
- ...
365
- &lt;/ul&gt;
366
- &lt;/div&gt;
367
- &lt;/div&gt;
368
- </pre>
369
-
370
- <form class="bs-docs-example">
371
- <div class="input-prepend">
372
- <div class="btn-group">
373
- <button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
374
- <ul class="dropdown-menu">
375
- <li><a href="#">Action</a></li>
376
- <li><a href="#">Another action</a></li>
377
- <li><a href="#">Something else here</a></li>
378
- <li class="divider"></li>
379
- <li><a href="#">Separated link</a></li>
380
- </ul>
381
- </div><!-- /btn-group -->
382
- <input class="span2" id="prependedDropdownButton" type="text">
383
- </div><!-- /input-prepend -->
384
- </form>
385
- <pre class="prettyprint linenums">
386
- &lt;div class="input-prepend"&gt;
387
- &lt;div class="btn-group"&gt;
388
- &lt;button class="btn dropdown-toggle" data-toggle="dropdown"&gt;
389
- Action
390
- &lt;span class="caret"&gt;&lt;/span&gt;
391
- &lt;/button&gt;
392
- &lt;ul class="dropdown-menu"&gt;
393
- ...
394
- &lt;/ul&gt;
395
- &lt;/div&gt;
396
- &lt;input class="span2" id="prependedDropdownButton" type="text"&gt;
397
- &lt;/div&gt;
398
- </pre>
399
-
400
- <form class="bs-docs-example">
401
- <div class="input-prepend input-append">
402
- <div class="btn-group">
403
- <button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
404
- <ul class="dropdown-menu">
405
- <li><a href="#">Action</a></li>
406
- <li><a href="#">Another action</a></li>
407
- <li><a href="#">Something else here</a></li>
408
- <li class="divider"></li>
409
- <li><a href="#">Separated link</a></li>
410
- </ul>
411
- </div><!-- /btn-group -->
412
- <input class="span2" id="appendedPrependedDropdownButton" type="text">
413
- <div class="btn-group">
414
- <button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
415
- <ul class="dropdown-menu">
416
- <li><a href="#">Action</a></li>
417
- <li><a href="#">Another action</a></li>
418
- <li><a href="#">Something else here</a></li>
419
- <li class="divider"></li>
420
- <li><a href="#">Separated link</a></li>
421
- </ul>
422
- </div><!-- /btn-group -->
423
- </div><!-- /input-prepend input-append -->
424
- </form>
425
- <pre class="prettyprint linenums">
426
- &lt;div class="input-prepend input-append"&gt;
427
- &lt;div class="btn-group"&gt;
428
- &lt;button class="btn dropdown-toggle" data-toggle="dropdown"&gt;
429
- Action
430
- &lt;span class="caret"&gt;&lt;/span&gt;
431
- &lt;/button&gt;
432
- &lt;ul class="dropdown-menu"&gt;
433
- ...
434
- &lt;/ul&gt;
435
- &lt;/div&gt;
436
- &lt;input class="span2" id="appendedPrependedDropdownButton" type="text"&gt;
437
- &lt;div class="btn-group"&gt;
438
- &lt;button class="btn dropdown-toggle" data-toggle="dropdown"&gt;
439
- Action
440
- &lt;span class="caret"&gt;&lt;/span&gt;
441
- &lt;/button&gt;
442
- &lt;ul class="dropdown-menu"&gt;
443
- ...
444
- &lt;/ul&gt;
445
- &lt;/div&gt;
446
- &lt;/div&gt;
447
- </pre>
448
-
449
- <h4>Search form</h4>
450
- <form class="bs-docs-example form-search">
451
- <div class="input-append">
452
- <input type="text" class="span2 search-query">
453
- <button type="submit" class="btn">Search</button>
454
- </div>
455
- <div class="input-prepend">
456
- <button type="submit" class="btn">Search</button>
457
- <input type="text" class="span2 search-query">
458
- </div>
459
- </form>
460
- <pre class="prettyprint linenums">
461
- &lt;form class="form-search"&gt;
462
- &lt;div class="input-append"&gt;
463
- &lt;input type="text" class="span2 search-query"&gt;
464
- &lt;button type="submit" class="btn"&gt;Search&lt;/button&gt;
465
- &lt;/div&gt;
466
- &lt;div class="input-prepend"&gt;
467
- &lt;button type="submit" class="btn"&gt;Search&lt;/button&gt;
468
- &lt;input type="text" class="span2 search-query"&gt;
469
- &lt;/div&gt;
470
- &lt;/form&gt;
471
- </pre>
472
-
473
- <h3>Control sizing</h3>
474
- <p>Use relative sizing classes like <code>.input-large</code> or match your inputs to the grid column sizes using <code>.span*</code> classes.</p>
475
-
476
- <h4>Block level inputs</h4>
477
- <p>Make any <code>&lt;input&gt;</code> or <code>&lt;textarea&gt;</code> element behave like a block level element.</p>
478
- <form class="bs-docs-example" style="padding-bottom: 15px;">
479
- <div class="controls">
480
- <input class="input-block-level" type="text" placeholder=".input-block-level">
481
- </div>
482
- </form>
483
- <pre class="prettyprint linenums">
484
- &lt;input class="input-block-level" type="text" placeholder=".input-block-level"&gt;
485
- </pre>
486
-
487
- <h4>Relative sizing</h4>
488
- <form class="bs-docs-example" style="padding-bottom: 15px;">
489
- <div class="controls docs-input-sizes">
490
- <input class="input-mini" type="text" placeholder=".input-mini">
491
- <input class="input-small" type="text" placeholder=".input-small">
492
- <input class="input-medium" type="text" placeholder=".input-medium">
493
- <input class="input-large" type="text" placeholder=".input-large">
494
- <input class="input-xlarge" type="text" placeholder=".input-xlarge">
495
- <input class="input-xxlarge" type="text" placeholder=".input-xxlarge">
496
- </div>
497
- </form>
498
- <pre class="prettyprint linenums">
499
- &lt;input class="input-mini" type="text" placeholder=".input-mini"&gt;
500
- &lt;input class="input-small" type="text" placeholder=".input-small"&gt;
501
- &lt;input class="input-medium" type="text" placeholder=".input-medium"&gt;
502
- &lt;input class="input-large" type="text" placeholder=".input-large"&gt;
503
- &lt;input class="input-xlarge" type="text" placeholder=".input-xlarge"&gt;
504
- &lt;input class="input-xxlarge" type="text" placeholder=".input-xxlarge"&gt;
505
- </pre>
506
- <p>
507
- <span class="label label-info">Heads up!</span> In future versions, we'll be altering the use of these relative input classes to match our button sizes. For example, <code>.input-large</code> will increase the padding and font-size of an input.
508
- </p>
509
-
510
- <h4>Grid sizing</h4>
511
- <p>Use <code>.span1</code> to <code>.span12</code> for inputs that match the same sizes of the grid columns.</p>
512
- <form class="bs-docs-example" style="padding-bottom: 15px;">
513
- <div class="controls docs-input-sizes">
514
- <input class="span1" type="text" placeholder=".span1">
515
- <input class="span2" type="text" placeholder=".span2">
516
- <input class="span3" type="text" placeholder=".span3">
517
- <select class="span1">
518
- <option>1</option>
519
- <option>2</option>
520
- <option>3</option>
521
- <option>4</option>
522
- <option>5</option>
523
- </select>
524
- <select class="span2">
525
- <option>1</option>
526
- <option>2</option>
527
- <option>3</option>
528
- <option>4</option>
529
- <option>5</option>
530
- </select>
531
- <select class="span3">
532
- <option>1</option>
533
- <option>2</option>
534
- <option>3</option>
535
- <option>4</option>
536
- <option>5</option>
537
- </select>
538
- </div>
539
- </form>
540
- <pre class="prettyprint linenums">
541
- &lt;input class="span1" type="text" placeholder=".span1"&gt;
542
- &lt;input class="span2" type="text" placeholder=".span2"&gt;
543
- &lt;input class="span3" type="text" placeholder=".span3"&gt;
544
- &lt;select class="span1"&gt;
545
- ...
546
- &lt;/select&gt;
547
- &lt;select class="span2"&gt;
548
- ...
549
- &lt;/select&gt;
550
- &lt;select class="span3"&gt;
551
- ...
552
- &lt;/select&gt;
553
- </pre>
554
-
555
- <p>For multiple grid inputs per line, <strong>use the <code>.controls-row</code> modifier class for proper spacing</strong>. It floats the inputs to collapse white-space, sets the proper margins, and the clears the float.</p>
556
- <form class="bs-docs-example" style="padding-bottom: 15px;">
557
- <div class="controls">
558
- <input class="span5" type="text" placeholder=".span5">
559
- </div>
560
- <div class="controls controls-row">
561
- <input class="span4" type="text" placeholder=".span4">
562
- <input class="span1" type="text" placeholder=".span1">
563
- </div>
564
- <div class="controls controls-row">
565
- <input class="span3" type="text" placeholder=".span3">
566
- <input class="span2" type="text" placeholder=".span2">
567
- </div>
568
- <div class="controls controls-row">
569
- <input class="span2" type="text" placeholder=".span2">
570
- <input class="span3" type="text" placeholder=".span3">
571
- </div>
572
- <div class="controls controls-row">
573
- <input class="span1" type="text" placeholder=".span1">
574
- <input class="span4" type="text" placeholder=".span4">
575
- </div>
576
- </form>
577
- <pre class="prettyprint linenums">
578
- &lt;div class="controls"&gt;
579
- &lt;input class="span5" type="text" placeholder=".span5"&gt;
580
- &lt;/div&gt;
581
- &lt;div class="controls controls-row"&gt;
582
- &lt;input class="span4" type="text" placeholder=".span4"&gt;
583
- &lt;input class="span1" type="text" placeholder=".span1"&gt;
584
- &lt;/div&gt;
585
- ...
586
- </pre>
587
-
588
- <h3>Uneditable inputs</h3>
589
- <p>Present data in a form that's not editable without using actual form markup.</p>
590
- <form class="bs-docs-example">
591
- <span class="input-xlarge uneditable-input">Some value here</span>
592
- </form>
593
- <pre class="prettyprint linenums">
594
- &lt;span class="input-xlarge uneditable-input"&gt;Some value here&lt;/span&gt;
595
- </pre>
596
-
597
- <h3>Form actions</h3>
598
- <p>End a form with a group of actions (buttons). When placed within a <code>.form-horizontal</code>, the buttons will automatically indent to line up with the form controls.</p>
599
- <form class="bs-docs-example">
600
- <div class="form-actions">
601
- <button type="submit" class="btn btn-primary">Save changes</button>
602
- <button type="button" class="btn">Cancel</button>
603
- </div>
604
- </form>
605
- <pre class="prettyprint linenums">
606
- &lt;div class="form-actions"&gt;
607
- &lt;button type="submit" class="btn btn-primary"&gt;Save changes&lt;/button&gt;
608
- &lt;button type="button" class="btn"&gt;Cancel&lt;/button&gt;
609
- &lt;/div&gt;
610
- </pre>
611
-
612
- <h3>Help text</h3>
613
- <p>Inline and block level support for help text that appears around form controls.</p>
614
- <h4>Inline help</h4>
615
- <form class="bs-docs-example form-inline">
616
- <input type="text"> <span class="help-inline">Inline help text</span>
617
- </form>
618
- <pre class="prettyprint linenums">
619
- &lt;input type="text"&gt;&lt;span class="help-inline"&gt;Inline help text&lt;/span&gt;
620
- </pre>
621
-
622
- <h4>Block help</h4>
623
- <form class="bs-docs-example form-inline">
624
- <input type="text">
625
- <span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span>
626
- </form>
627
- <pre class="prettyprint linenums">
628
- &lt;input type="text"&gt;&lt;span class="help-block"&gt;A longer block of help text that breaks onto a new line and may extend beyond one line.&lt;/span&gt;
629
- </pre>
630
-
631
-
632
- <hr class="bs-docs-separator">
633
-
634
-
635
- <h2>Form control states</h2>
636
- <p>Provide feedback to users or visitors with basic feedback states on form controls and labels.</p>
637
-
638
- <h3>Input focus</h3>
639
- <p>We remove the default <code>outline</code> styles on some form controls and apply a <code>box-shadow</code> in its place for <code>:focus</code>.</p>
640
- <form class="bs-docs-example form-inline">
641
- <input class="input-xlarge focused" id="focusedInput" type="text" value="This is focused...">
642
- </form>
643
- <pre class="prettyprint linenums">
644
- &lt;input class="input-xlarge" id="focusedInput" type="text" value="This is focused..."&gt;
645
- </pre>
646
-
647
- <h3>Disabled inputs</h3>
648
- <p>Add the <code>disabled</code> attribute on an input to prevent user input and trigger a slightly different look.</p>
649
- <form class="bs-docs-example form-inline">
650
- <input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here…" disabled>
651
- </form>
652
- <pre class="prettyprint linenums">
653
- &lt;input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here..." disabled&gt;
654
- </pre>
655
-
656
- <h3>Validation states</h3>
657
- <p>Bootstrap includes validation styles for error, warning, info, and success messages. To use, add the appropriate class to the surrounding <code>.control-group</code>.</p>
658
-
659
- <form class="bs-docs-example form-horizontal">
660
- <div class="control-group warning">
661
- <label class="control-label" for="inputWarning">Input with warning</label>
662
- <div class="controls">
663
- <input type="text" id="inputWarning">
664
- <span class="help-inline">Something may have gone wrong</span>
665
- </div>
666
- </div>
667
- <div class="control-group error">
668
- <label class="control-label" for="inputError">Input with error</label>
669
- <div class="controls">
670
- <input type="text" id="inputError">
671
- <span class="help-inline">Please correct the error</span>
672
- </div>
673
- </div>
674
- <div class="control-group info">
675
- <label class="control-label" for="inputInfo">Input with info</label>
676
- <div class="controls">
677
- <input type="text" id="inputInfo">
678
- <span class="help-inline">Username is taken</span>
679
- </div>
680
- </div>
681
- <div class="control-group success">
682
- <label class="control-label" for="inputSuccess">Input with success</label>
683
- <div class="controls">
684
- <input type="text" id="inputSuccess">
685
- <span class="help-inline">Woohoo!</span>
686
- </div>
687
- </div>
688
- </form>
689
- <pre class="prettyprint linenums">
690
- &lt;div class="control-group warning"&gt;
691
- &lt;label class="control-label" for="inputWarning"&gt;Input with warning&lt;/label&gt;
692
- &lt;div class="controls"&gt;
693
- &lt;input type="text" id="inputWarning"&gt;
694
- &lt;span class="help-inline"&gt;Something may have gone wrong&lt;/span&gt;
695
- &lt;/div&gt;
696
- &lt;/div&gt;
697
- &lt;div class="control-group error"&gt;
698
- &lt;label class="control-label" for="inputError"&gt;Input with error&lt;/label&gt;
699
- &lt;div class="controls"&gt;
700
- &lt;input type="text" id="inputError"&gt;
701
- &lt;span class="help-inline"&gt;Please correct the error&lt;/span&gt;
702
- &lt;/div&gt;
703
- &lt;/div&gt;
704
- &lt;div class="control-group success"&gt;
705
- &lt;label class="control-label" for="inputSuccess"&gt;Input with success&lt;/label&gt;
706
- &lt;div class="controls"&gt;
707
- &lt;input type="text" id="inputSuccess"&gt;
708
- &lt;span class="help-inline"&gt;Woohoo!&lt;/span&gt;
709
- &lt;/div&gt;
710
- &lt;/div&gt;
711
- </pre>
712
-
713
- </section>
714
-