base-css.mustache 54.2 KB
Newer Older
1
2
3
<!-- Masthead
================================================== -->
<header class="jumbotron subhead" id="overview">
4
5
  <h1>{{_i}}Base CSS{{/i}}</h1>
  <p class="lead">{{_i}}On top of the scaffolding, basic HTML elements are styled and enhanced with extensible classes to provide a fresh, consistent look and feel.{{/i}}</p>
Mark Otto's avatar
Mark Otto committed
6
7
  <div class="subnav">
    <ul class="nav pills">
8
      <li><a href="#typography">{{_i}}Typography{{/i}}</a></li>
9
      <li><a href="#code">{{_i}}Code{{/i}}</a></li>
10
11
12
13
      <li><a href="#tables">{{_i}}Tables{{/i}}</a></li>
      <li><a href="#forms">{{_i}}Forms{{/i}}</a></li>
      <li><a href="#buttons">{{_i}}Buttons{{/i}}</a></li>
      <li><a href="#icons">{{_i}}Icons by Glyphicons{{/i}}</a></li>
Mark Otto's avatar
Mark Otto committed
14
15
    </ul>
  </div>
16
17
18
19
20
21
22
</header>


<!-- Typography
================================================== -->
<section id="typography">
  <div class="page-header">
23
    <h1>{{_i}}Typography <small>Headings, paragraphs, lists, and other inline type elements</small>{{/i}}</h1>
24
25
  </div>

26
  <h2>{{_i}}Headings &amp; body copy{{/i}}</h2>
27
28
29
30

  <!-- Headings & Paragraph Copy -->
  <div class="row">
    <div class="span4">
31
32
33
      <h3>{{_i}}Typographic scale{{/i}}</h3>
      <p>{{_i}}The entire typographic grid is based on two Less variables in our preboot.less file: <code>@baseFontSize</code> and <code>@baseLineHeight</code>. The first is the base font-size used throughout and the second is the base line-height.{{/i}}</p>
      <p>{{_i}}We use those variables, and some math, to create the margins, paddings, and line-heights of all our type and more.{{/i}}</p>
34
35
    </div>
    <div class="span4">
36
      <h3>{{_i}}Example body text{{/i}}</h3>
37
38
39
40
41
      <p>Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
      <p>Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec sed odio dui.</p>
    </div>
    <div class="span4">
      <div class="well">
42
43
44
45
46
47
        <h1>h1. {{_i}}Heading 1{{/i}}</h1>
        <h2>h2. {{_i}}Heading 2{{/i}}</h2>
        <h3>h3. {{_i}}Heading 3{{/i}}</h3>
        <h4>h4. {{_i}}Heading 4{{/i}}</h4>
        <h5>h5. {{_i}}Heading 5{{/i}}</h5>
        <h6>h6. {{_i}}Heading 6{{/i}}</h6>
48
49
50
51
52
      </div>
    </div>
  </div>

  <!-- Misc Elements -->
53
  <h2>{{_i}}Emphasis, address, and abbreviation{{/i}}</h2>
54
55
56
  <table class="table table-bordered table-striped">
    <thead>
      <tr>
57
58
59
        <th>{{_i}}Element{{/i}}</th>
        <th>{{_i}}Usage{{/i}}</th>
        <th>{{_i}}Optional{{/i}}</th>
60
61
62
63
64
65
66
67
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>
          <code>&lt;strong&gt;</code>
        </td>
        <td>
68
          {{_i}}For emphasizing a snippet of text with <strong>important</strong>{{/i}}
69
70
        </td>
        <td>
71
          <span class="muted">{{_i}}None{{/i}}</span>
72
73
74
75
76
77
78
        </td>
      </tr>
      <tr>
        <td>
          <code>&lt;em&gt;</code>
        </td>
        <td>
79
          {{_i}}For emphasizing a snippet of text with <em>stress</em>{{/i}}
80
81
        </td>
        <td>
82
          <span class="muted">{{_i}}None{{/i}}</span>
83
84
85
86
87
88
89
        </td>
      </tr>
      <tr>
        <td>
          <code>&lt;abbr&gt;</code>
        </td>
        <td>
90
          {{_i}}Wraps abbreviations and acronyms to show the expanded version on hover{{/i}}
91
92
        </td>
        <td>
93
          {{_i}}Include optional <code>title</code> for expanded text{{/i}}
94
95
96
97
98
99
100
        </td>
      </tr>
      <tr>
        <td>
          <code>&lt;address&gt;</code>
        </td>
        <td>
101
          {{_i}}For contact information for its nearest ancestor or the entire body of work{{/i}}
102
103
        </td>
        <td>
104
          {{_i}}Preserve formatting by ending all lines with <code>&lt;br&gt;</code>{{/i}}
105
106
107
108
109
110
111
        </td>
      </tr>
    </tbody>
  </table>

  <div class="row">
    <div class="span4">
112
      <h3>{{_i}}Using emphasis{{/i}}</h3>
113
      <p><a href="#">Fusce dapibus</a>, <strong>tellus ac cursus commodo</strong>, <em>tortor mauris condimentum nibh</em>, ut fermentum massa justo sit amet risus. Maecenas faucibus mollis interdum. Nulla vitae elit libero, a pharetra augue.</p>
114
      <p>{{_i}}<strong>Note:</strong> Feel free to use <code>&lt;b&gt;</code> and <code>&lt;i&gt;</code> in HTML5, but their usage has changed a bit. <code>&lt;b&gt;</code> is meant to highlight words or phrases without conveying additional importance while <code>&lt;i&gt;</code> is mostly for voice, technical terms, etc.{{/i}}</p>
115
116
    </div>
    <div class="span4">
117
118
      <h3>{{_i}}Example addresses{{/i}}</h3>
      <p>{{_i}}Here are two examples of how the <code>&lt;address&gt;</code> tag can be used:{{/i}}</p>
119
120
121
122
123
124
125
      <address>
        <strong>Twitter, Inc.</strong><br>
        795 Folsom Ave, Suite 600<br>
        San Francisco, CA 94107<br>
        <abbr title="Phone">P:</abbr> (123) 456-7890
      </address>
      <address>
126
        <strong>{{_i}}Full Name{{/i}}</strong><br>
Mark Otto's avatar
Mark Otto committed
127
        <a href="mailto:#">{{_i}}first.last@gmail.com{{/i}}</a>
128
129
130
      </address>
    </div>
    <div class="span4">
131
132
133
134
      <h3>{{_i}}Example abbreviations{{/i}}</h3>
      <p>{{_i}}Abbreviations are styled with uppercase text and a light dotted bottom border. They also have a help cursor on hover so users have extra indication something will be shown on hover.{{/i}}</p>
      <p>{{_i}}<abbr title="HyperText Markup Language">HTML</abbr> is the best thing since sliced bread.{{/i}}</p>
      <p>{{_i}}An abbreviation of the word attribute is <abbr title="attribute">attr</abbr>.{{/i}}</p>
135
136
137
138
139
    </div>
  </div>


  <!-- Blockquotes -->
140
  <h2>{{_i}}Blockquotes{{/i}}</h2>
141
142
143
  <table class="table table-bordered table-striped">
    <thead>
      <tr>
144
145
146
        <th>{{_i}}Element{{/i}}</th>
        <th>{{_i}}Usage{{/i}}</th>
        <th>{{_i}}Optional{{/i}}</th>
147
148
149
150
151
152
153
154
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>
          <code>&lt;blockquote&gt;</code>
        </td>
        <td>
155
          {{_i}}Block-level element for quoting content from another source{{/i}}
156
157
        </td>
        <td>
158
159
          <p>{{_i}}Add <code>cite</code> attribute for source URL{{/i}}</p>
          {{_i}}Use <code>.pull-left</code> and <code>.pull-right</code> classes for floated options{{/i}}
160
161
162
163
164
165
166
        </td>
      </tr>
      <tr>
        <td>
          <code>&lt;small&gt;</code>
        </td>
        <td>
167
          {{_i}}Optional element for adding a user-facing citation, typically an author with title of work{{/i}}
168
169
        </td>
        <td>
170
          {{_i}}Place the <code>&lt;cite&gt;</code> around the title or name of source{{/i}}
171
172
173
174
175
176
        </td>
      </tr>
    </tbody>
  </table>
  <div class="row">
    <div class="span4">
177
178
      <p>{{_i}}To include a blockquote, wrap <code>&lt;blockquote&gt;</code> around any <abbr title="HyperText Markup Language">HTML</abbr> as the quote. For straight quotes we recommend a <code>&lt;p&gt;</code>.{{/i}}</p>
      <p>{{_i}}Include an optional <code>&lt;small&gt;</code> element to cite your source and you'll get an em dash <code>&amp;mdash;</code> before it for styling purposes.{{/i}}</p>
179
180
181
182
183
    </div>
    <div class="span8">
<pre class="prettyprint linenums">
&lt;blockquote&gt;
  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis.&lt;/p&gt;
184
  &lt;small&gt;{{_i}}Someone famous{{/i}}&lt;/small&gt;
185
186
187
188
189
&lt;/blockquote&gt;
</pre>
    </div>
  </div><!--/row-->

190
  <h3>{{_i}}Example blockquotes{{/i}}</h3>
191
192
  <div class="row">
    <div class="span6">
193
      <p>{{_i}}Default blockquotes are styled as such:{{/i}}</p>
194
195
      <blockquote>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis.</p>
196
        <small>{{_i}}Someone famous in <cite title="">Body of work</cite>{{/i}}</small>
197
198
199
      </blockquote>
    </div>
    <div class="span6">
200
      <p>{{_i}}To float your blockquote to the right, add <code>class="pull-right"</code>:{{/i}}</p>
201
202
      <blockquote class="pull-right">
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis.</p>
203
        <small>{{_i}}Someone famous in <cite title="">Body of work</cite>{{/i}}</small>
204
205
206
207
208
209
      </blockquote>
    </div>
  </div>


  <!-- Lists -->
210
  <h2>{{_i}}Lists{{/i}}</h2>
211
212
  <div class="row">
    <div class="span3">
213
      <h4>{{_i}}Unordered{{/i}}</h4>
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
      <p><code>&lt;ul&gt;</code></p>
      <ul>
        <li>Lorem ipsum dolor sit amet</li>
        <li>Consectetur adipiscing elit</li>
        <li>Integer molestie lorem at massa</li>
        <li>Facilisis in pretium nisl aliquet</li>
        <li>Nulla volutpat aliquam velit
          <ul>
            <li>Phasellus iaculis neque</li>
            <li>Purus sodales ultricies</li>
            <li>Vestibulum laoreet porttitor sem</li>
            <li>Ac tristique libero volutpat at</li>
          </ul>
        </li>
        <li>Faucibus porta lacus fringilla vel</li>
        <li>Aenean sit amet erat nunc</li>
        <li>Eget porttitor lorem</li>
      </ul>
    </div>
    <div class="span3">
234
      <h4>{{_i}}Unstyled{{/i}}</h4>
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
      <p><code>&lt;ul class="unstyled"&gt;</code></p>
      <ul class="unstyled">
        <li>Lorem ipsum dolor sit amet</li>
        <li>Consectetur adipiscing elit</li>
        <li>Integer molestie lorem at massa</li>
        <li>Facilisis in pretium nisl aliquet</li>
        <li>Nulla volutpat aliquam velit
          <ul>
            <li>Phasellus iaculis neque</li>
            <li>Purus sodales ultricies</li>
            <li>Vestibulum laoreet porttitor sem</li>
            <li>Ac tristique libero volutpat at</li>
          </ul>
        </li>
        <li>Faucibus porta lacus fringilla vel</li>
        <li>Aenean sit amet erat nunc</li>
        <li>Eget porttitor lorem</li>
      </ul>
    </div>
    <div class="span3">
255
      <h4>{{_i}}Ordered{{/i}}</h4>
256
257
258
259
260
261
262
263
264
265
266
267
268
      <p><code>&lt;ol&gt;</code></p>
      <ol>
        <li>Lorem ipsum dolor sit amet</li>
        <li>Consectetur adipiscing elit</li>
        <li>Integer molestie lorem at massa</li>
        <li>Facilisis in pretium nisl aliquet</li>
        <li>Nulla volutpat aliquam velit</li>
        <li>Faucibus porta lacus fringilla vel</li>
        <li>Aenean sit amet erat nunc</li>
        <li>Eget porttitor lorem</li>
      </ol>
    </div>
    <div class="span3">
269
      <h4>{{_i}}Description{{/i}}</h4>
270
271
      <p><code>&lt;dl&gt;</code></p>
      <dl>
272
273
        <dt>{{_i}}Description lists{{/i}}</dt>
        <dd>{{_i}}A description list is perfect for defining terms.{{/i}}</dd>
274
275
276
277
278
279
280
281
        <dt>Euismod</dt>
        <dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd>
        <dd>Donec id elit non mi porta gravida at eget metus.</dd>
        <dt>Malesuada porta</dt>
        <dd>Etiam porta sem malesuada magna mollis euismod.</dd>
      </dl>
    </div>
  </div><!-- /row -->
282
</section>
283
284
285



286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<!-- Code
================================================== -->
<section id="code">
  <div class="page-header">
    <h1>{{_i}}Code{{/i}} <small>{{_i}}Inline and block code snippets{{/i}}</small></h1>
  </div>
  <div class="row">
    <div class="span4">
      <h2>Inline</h2>
      <p>Wrap inline snippets of code with <code>&lt;code&gt;</code>.</p>
<pre class="prettyprint linenums">
{{_i}}For example, &lt;code&gt;section&lt;/code&gt; should be wrapped as inline.{{/i}}
</pre>
    </div><!--/span-->
    <div class="span4">
      <h2>Basic block</h2>
      <p>{{_i}}Use <code>&lt;pre&gt;</code> for multiple lines of code. Be sure to turn any carets into their unicode characters for proper rendering.{{/i}}</p>
303
304
305
<pre>
&lt;p&gt;{{_i}}Sample text here...{{/i}}&lt;/p&gt;
</pre>
306
307
308
309
310
311
312
313
314
315
316
<pre class="prettyprint linenums" style="margin-bottom: 9px;">
&lt;pre&gt;
  &amp;lt;p&amp;gt;{{_i}}Sample text here...{{/i}}&amp;lt;/p&amp;gt;
&lt;/pre&gt;
</pre>
      <p>{{_i}}<strong>Note:</strong> Be sure to keep code within <code>&lt;pre&gt;</code> tags as close to the left as possible; it will render all tabs.{{/i}}</p>
    </div><!--/span-->
    <div class="span4">
      <h2>Google Prettify</h2>
      <p>Take the same <code>&lt;pre&gt;</code> element and add two optional classes for enhanced rendering.</p>
<pre class="prettyprint linenums" style="margin-bottom: 9px;">
317
318
319
&lt;p&gt;{{_i}}Sample text here...{{/i}}&lt;/p&gt;
</pre>
<pre class="prettyprint linenums" style="margin-bottom: 9px;">
320
321
322
323
324
325
326
327
&lt;pre class="prettyprint
     linenums"&gt;
  &amp;lt;p&amp;gt;{{_i}}Sample text here...{{/i}}&amp;lt;/p&amp;gt;
&lt;/pre&gt;
</pre>
      <p>{{_i}}<a href="http://code.google.com/p/google-code-prettify/">Download google-code-prettify</a> and view the readme for <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html">how to use</a>.{{/i}}</p>
    </div><!--/span-->
  </div><!--/row-->
328
329
330
331
332
333
334
335
</section>



<!-- Tables
================================================== -->
<section id="tables">
  <div class="page-header">
336
    <h1>{{_i}}Tables <small>For, you guessed it, tabular data</small>{{/i}}</h1>
337
338
  </div>

339
  <h2>{{_i}}Table markup{{/i}}</h2>
340
341
342
343
344
  <div class="row">
    <div class="span8">
      <table class="table table-bordered table-striped">
        <thead>
          <tr>
345
346
            <th>{{_i}}Tag{{/i}}</th>
            <th>{{_i}}Description{{/i}}</th>
347
348
349
350
351
352
353
354
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>
              <code>&lt;table&gt;</code>
            </td>
            <td>
355
              {{_i}}Wrapping element for displaying data in a tabular format{{/i}}
356
357
358
359
360
361
362
            </td>
          </tr>
          <tr>
            <td>
              <code>&lt;thead&gt;</code>
            </td>
            <td>
363
              {{_i}}Container element for table header rows (<code>&lt;tr&gt;</code>) to label table columns{{/i}}
364
365
366
367
368
369
370
            </td>
          </tr>
          <tr>
            <td>
              <code>&lt;tbody&gt;</code>
            </td>
            <td>
371
              {{_i}}Container element for table rows (<code>&lt;tr&gt;</code>) in the body of the table{{/i}}
372
373
374
375
376
377
378
            </td>
          </tr>
          <tr>
            <td>
              <code>&lt;tr&gt;</code>
            </td>
            <td>
379
              {{_i}}Container element for a set of table cells (<code>&lt;td&gt;</code> or <code>&lt;th&gt;</code>) that appears on a single row{{/i}}
380
381
382
383
384
385
386
            </td>
          </tr>
          <tr>
            <td>
              <code>&lt;td&gt;</code>
            </td>
            <td>
387
              {{_i}}Default table cell{{/i}}
388
389
390
391
392
393
394
            </td>
          </tr>
          <tr>
            <td>
              <code>&lt;th&gt;</code>
            </td>
            <td>
395
396
              {{_i}}Special table cell for column (or row, depending on scope and placement) labels{{/i}}<br>
              {{_i}}Must be used within a <code>&lt;thead&gt;</code>{{/i}}
397
398
399
400
401
402
403
            </td>
          </tr>
          <tr>
            <td>
              <code>&lt;caption&gt;</code>
            </td>
            <td>
404
              {{_i}}Description or summary of what the table holds, especially useful for screen readers{{/i}}
405
406
407
408
409
410
411
412
413
414
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <div class="span4">
<pre class="prettyprint linenums">
&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
415
416
      &lt;th&gt;&lt;/th&gt;
      &lt;th&gt;&lt;/th&gt;
417
418
419
420
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
421
422
      &lt;td&gt;&lt;/td&gt;
      &lt;td&gt;&lt;/td&gt;
423
424
425
426
427
428
429
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
</pre>
    </div>
  </div>

430
  <h2>{{_i}}Table options{{/i}}</h2>
431
432
433
  <table class="table table-bordered table-striped">
  <thead>
      <tr>
434
435
436
        <th>{{_i}}Name{{/i}}</th>
        <th>{{_i}}Class{{/i}}</th>
        <th>{{_i}}Description{{/i}}</th>
437
438
439
440
      </tr>
    </thead>
    <tbody>
      <tr>
441
442
443
        <td>{{_i}}Default{{/i}}</td>
        <td class="muted">{{_i}}None{{/i}}</td>
        <td>{{_i}}No styles, just columns and rows{{/i}}</td>
444
445
      </tr>
      <tr>
446
        <td>{{_i}}Basic{{/i}}</td>
447
448
449
        <td>
          <code>.table</code>
        </td>
450
        <td>{{_i}}Only horizontal lines between rows{{/i}}</td>
451
452
      </tr>
      <tr>
453
        <td>{{_i}}Bordered{{/i}}</td>
454
455
456
        <td>
          <code>.table-bordered</code>
        </td>
457
        <td>{{_i}}Rounds corners and adds outter border{{/i}}</td>
458
459
      </tr>
      <tr>
460
        <td>{{_i}}Zebra-stripe{{/i}}</td>
461
462
463
        <td>
          <code>.table-striped</code>
        </td>
464
        <td>{{_i}}Adds light gray background color to odd rows (1, 3, 5, etc){{/i}}</td>
465
466
      </tr>
      <tr>
467
        <td>{{_i}}Condensed{{/i}}</td>
468
469
470
        <td>
          <code>.table-condensed</code>
        </td>
471
        <td>{{_i}}Cuts vertical padding in half, from 8px to 4px, within all <code>td</code> and <code>th</code> elements{{/i}}</td>
472
473
474
475
476
      </tr>
    </tbody>
  </table>


477
  <h2>{{_i}}Example tables{{/i}}</h2>
478

479
  <h3>1. {{_i}}Default table styles{{/i}}</h3>
480
481
  <div class="row">
    <div class="span4">
482
      <p>{{_i}}Tables are automatically styled with only a few borders to ensure readability and maintain structure. With 2.0, the <code>.table</code> class is required.{{/i}}</p>
483
484
<pre class="prettyprint linenums">
&lt;table class="table"&gt;
485

486
487
488
489
490
491
492
&lt;/table&gt;</pre>
    </div>
    <div class="span8">
      <table class="table">
        <thead>
          <tr>
            <th>#</th>
493
494
495
            <th>{{_i}}First Name{{/i}}</th>
            <th>{{_i}}Last Name{{/i}}</th>
            <th>{{_i}}Language{{/i}}</th>
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>1</td>
            <td>Mark</td>
            <td>Otto</td>
            <td>CSS</td>
          </tr>
          <tr>
            <td>2</td>
            <td>Jacob</td>
            <td>Thornton</td>
            <td>Javascript</td>
          </tr>
          <tr>
            <td>3</td>
            <td>Stu</td>
            <td>Dent</td>
            <td>HTML</td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>


523
  <h3>2. {{_i}}Striped table{{/i}}</h3>
524
525
  <div class="row">
    <div class="span4">
526
527
      <p>{{_i}}Get a little fancy with your tables by adding zebra-striping&mdash;just add the <code>.table-striped</code> class.{{/i}}</p>
      <p class="muted">{{_i}}<strong>Note:</strong> Sprited tables use the <code>:nth-child</code> CSS selector and is not available in IE7-IE8.{{/i}}</p>
528
529
<pre class="prettyprint linenums" style="margin-bottom: 18px;">
&lt;table class="table table-striped"&gt;
530

531
532
533
534
535
536
537
&lt;/table&gt;</pre>
    </div>
    <div class="span8">
      <table class="table table-striped">
        <thead>
          <tr>
            <th>#</th>
538
539
540
            <th>{{_i}}First Name{{/i}}</th>
            <th>{{_i}}Last Name{{/i}}</th>
            <th>{{_i}}Language{{/i}}</th>
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>1</td>
            <td>Mark</td>
            <td>Otto</td>
            <td>CSS</td>
          </tr>
          <tr>
            <td>2</td>
            <td>Jacob</td>
            <td>Thornton</td>
            <td>Javascript</td>
          </tr>
          <tr>
            <td>3</td>
            <td>Stu</td>
            <td>Dent</td>
            <td>HTML</td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>


568
  <h3>3. {{_i}}Bordered table{{/i}}</h3>
569
570
  <div class="row">
    <div class="span4">
571
      <p>{{_i}}Add borders around the entire table and rounded corners for aesthetic purposes.{{/i}}</p>
572
573
<pre class="prettyprint linenums">
&lt;table class="table table-bordered"&gt;
574

575
576
577
578
579
580
581
&lt;/table&gt;</pre>
    </div>
    <div class="span8">
      <table class="table table-bordered">
        <thead>
          <tr>
            <th>#</th>
582
583
584
            <th>{{_i}}First Name{{/i}}</th>
            <th>{{_i}}Last Name{{/i}}</th>
            <th>{{_i}}Language{{/i}}</th>
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>1</td>
            <td colspan="2">Mark Otto</td>
            <td>CSS</td>
          </tr>
          <tr>
            <td>2</td>
            <td>Jacob</td>
            <td>Thornton</td>
            <td rowspan="2">Javascript</td>
          </tr>
          </tr>
            <td>3</td>
            <td>Stu</td>
            <td>Dent</td>
          </tr>
          <tr>
            <td>3</td>
            <td>Brosef</td>
            <td>Stalin</td>
            <td>HTML</td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>


616
  <h3>4. {{_i}}Condensed table{{/i}}</h3>
617
618
  <div class="row">
    <div class="span4">
619
      <p>{{_i}}Make your tables more compact by adding the <code>.table-condensed</code> class to cut table cell padding in half (from 8px to 4px).{{/i}}</p>
620
621
<pre class="prettyprint linenums" style="margin-bottom: 18px;">
&lt;table class="table table-condensed"&gt;
622

623
624
625
626
627
628
629
&lt;/table&gt;</pre>
    </div>
    <div class="span8">
      <table class="table table-condensed">
        <thead>
          <tr>
            <th>#</th>
630
631
632
            <th>{{_i}}First Name{{/i}}</th>
            <th>{{_i}}Last Name{{/i}}</th>
            <th>{{_i}}Language{{/i}}</th>
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>1</td>
            <td>Mark</td>
            <td>Otto</td>
            <td>CSS</td>
          </tr>
          <tr>
            <td>2</td>
            <td>Jacob</td>
            <td>Thornton</td>
            <td>Javascript</td>
          </tr>
          <tr>
            <td>3</td>
            <td>Stu</td>
            <td>Dent</td>
            <td>HTML</td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>



Mark Otto's avatar
Mark Otto committed
661
  <h3>5. {{_i}}Combine them all!{{/i}}</h3>
662
663
  <div class="row">
    <div class="span4">
Mark Otto's avatar
Mark Otto committed
664
665
666
667
      <p>{{_i}}Feel free to combine any of the table classes to achieve different looks by utilizing any of the available classes.{{/i}}</p>
<pre class="prettyprint linenums" style="margin-bottom: 18px;">
&lt;table class="table table-striped table-bordered table-condensed"&gt;
  ...
668
669
670
&lt;/table&gt;</pre>
    </div>
    <div class="span8">
Mark Otto's avatar
Mark Otto committed
671
      <table class="table table-striped table-bordered table-condensed">
672
673
674
        <thead>
          <tr>
            <th>#</th>
675
676
677
            <th class="yellow">{{_i}}First Name{{/i}}</th>
            <th class="blue">{{_i}}Last Name{{/i}}</th>
            <th class="green">{{_i}}Language{{/i}}</th>
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>1</td>
            <td>Mark</td>
            <td>Otto</td>
            <td>CSS</td>
          </tr>
          <tr>
            <td>2</td>
            <td>Jacob</td>
            <td>Thornton</td>
            <td>Javascript</td>
          </tr>
          <tr>
            <td>3</td>
            <td>Stu</td>
            <td>Dent</td>
            <td>HTML</td>
          </tr>
          <tr>
            <td>4</td>
            <td>Brosef</td>
            <td>Stalin</td>
            <td>HTML</td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>
</section>



<!-- Forms
================================================== -->
<section id="forms">
  <div class="page-header">
717
    <h1>{{_i}}Forms{{/i}}</h1>
718
719
720
  </div>
  <div class="row">
    <div class="span4">
721
722
723
      <h2>{{_i}}Flexible HTML and CSS{{/i}}</h2>
      <p>{{_i}}The best part about forms in Bootstrap is that all your inputs and controls look great no matter how you build them in your markup. No superfluous HTML is required, but we provide the patterns for those who require it.{{/i}}</p>
      <p>{{_i}}More complicated layouts come with succinct and scalable classes for easy styling and event binding, so you're covered at every step.{{/i}}</p>
724
725
    </div>
    <div class="span4">
726
727
      <h2>{{_i}}Four layouts included{{/i}}</h2>
      <p>{{_i}}Bootstrap comes with support for four types of form layouts:{{/i}}</p>
728
      <ul>
729
730
731
732
        <li>{{_i}}Vertical (default){{/i}}</li>
        <li>{{_i}}Search{{/i}}</li>
        <li>{{_i}}Inline{{/i}}</li>
        <li>{{_i}}Horizontal{{/i}}</li>
733
      </ul>
734
      <p>{{_i}}Different types of form layouts require some changes to markup, but the controls themselves remain and behave the same.{{/i}}</p>
735
736
    </div>
    <div class="span4">
737
738
739
      <h2>{{_i}}Control states and more{{/i}}</h2>
      <p>{{_i}}Bootstrap's forms include styles for all the base form controls like input, textarea, and select you'd expect. But it also comes with a number of custom components like appended and prepended inputs and support for lists of checkboxes.{{/i}}</p>
      <p>{{_i}}States like error, warning, and success are included for each type of form control. Also included are styles for disabled controls.{{/i}}</p>
740
741
742
    </div>
  </div>

743
744
  <h2>{{_i}}Four types of forms{{/i}}</h2>
  <p>{{_i}}Bootstrap provides simple markup and styles for four styles of common web forms.{{/i}}</p>
745
746
747
  <table class="table table-bordered table-striped">
    <thead>
      <tr>
748
749
750
        <th>{{_i}}Name{{/i}}</th>
        <th>{{_i}}Class{{/i}}</th>
        <th>{{_i}}Description{{/i}}</th>
751
752
753
754
      </tr>
    </thead>
    <tbody>
      <tr>
755
        <th>{{_i}}Vertical (default){{/i}}</th>
756
        <td><code>.form-vertical</code> <span class="muted">({{_i}}not required{{/i}})</span></td>
757
        <td>{{_i}}Stacked, left-aligned labels over controls{{/i}}</td>
758
759
      </tr>
      <tr>
760
        <th>{{_i}}Horizontal{{/i}}</th>
761
        <td><code>.form-horizontal</code></td>
762
        <td>{{_i}}Float left, right-aligned labels on same line as controls{{/i}}</td>
763
764
      </tr>
      <tr>
765
        <th>{{_i}}Inline{{/i}}</th>
766
        <td><code>.form-inline</code></td>
767
        <td>{{_i}}Left-aligned label and inline-block controls for compact style{{/i}}</td>
768
769
      </tr>
      <tr>
770
        <th>{{_i}}Search{{/i}}</th>
771
        <td><code>.form-search</code></td>
772
        <td>{{_i}}Extra-rounded text input for a typical search aesthetic{{/i}}</td>
773
774
775
776
777
      </tr>
    </tbody>
  </table>


778
  <h2>{{_i}}Example forms <small>using just form controls, no extra markup</small>{{/i}}</h2>
779
  <h3>{{_i}}Basic form{{/i}}</h3>
780
  <div class="row">
781
    <div class="span3">
782
      <p>{{_i}}With v2.0, we have lighter and smarter defaults for form styles. No extra markup, just form controls.{{/i}}</p>
783
784
    </div>
    <div class="span9">
785
      <form class="well">
786
        <label>{{_i}}Label name{{/i}}</label>
787
        <input type="text" class="span3" placeholder="{{_i}}Type something…{{/i}}"> <span class="help-inline">Associated help text!</span>
788
        <label class="checkbox">
789
          <input type="checkbox"> {{_i}}Check me out{{/i}}
790
        </label>
791
        <button type="submit" class="btn">{{_i}}Submit{{/i}}</button>
792
793
      </form>
    </div>
794
795
796
797
  </div> <!-- /row -->
  <h3>{{_i}}Search form{{/i}}</h3>
  <div class="row">
    <div class="span3">
798
      <p>{{_i}}Reflecting default WebKit styles, just add <code>.form-search</code> for extra rounded search fields.{{/i}}</p>
799
800
    </div>
    <div class="span9">
801
802
      <form class="well form-search">
        <input type="text" class="input-medium search-query">
803
        <button type="submit" class="btn">{{_i}}Search{{/i}}</button>
804
805
      </form>
    </div>
806
807
808
809
  </div> <!-- /row -->
  <h3>{{_i}}Inline form{{/i}}</h3>
  <div class="row">
    <div class="span3">
810
      <p>{{_i}}Inputs are block level to start. For <code>.form-inline</code> and <code>.form-horizontal</code>, we use inline-block.{{/i}}</p>
811
812
    </div>
    <div class="span9">
813
      <form class="well form-search">
814
815
816
        <input type="text" class="input-small" placeholder="{{_i}}Email{{/i}}">
        <input type="password" class="input-small" placeholder="{{_i}}Password{{/i}}">
        <button type="submit" class="btn">{{_i}}Go{{/i}}</button>
817
818
819
820
821
822
      </form>
    </div>
  </div><!-- /row -->

  <br>

823
  <h2>{{_i}}Horizontal forms{{/i}}</h2>
824
825
826
  <div class="row">
    <div class="span8">
      <form class="form-horizontal">
827
828
829
830
831
        <fieldset>
          <legend>{{_i}}Controls Bootstrap supports{{/i}}</legend>
          <div class="control-group">
            <label class="control-label" for="input01">{{_i}}Text input{{/i}}</label>
            <div class="controls">
832
              <input type="text" class="input-xlarge" id="input01">
833
834
              <p class="help-block">{{_i}}In addition to freeform text, any HTML5 text-based input appears like so.{{/i}}</p>
            </div>
835
          </div>
836
837
838
839
          <div class="control-group">
            <label class="control-label" for="optionsCheckbox">{{_i}}Checkbox{{/i}}</label>
            <div class="controls">
              <label class="checkbox">
840
                <input type="checkbox" id="optionsCheckbox" value="option1">
841
842
843
                {{_i}}Option one is this and that&mdash;be sure to include why it’s great{{/i}}
              </label>
            </div>
844
          </div>
845
846
847
          <div class="control-group">
            <label class="control-label" for="select01">{{_i}}Select list{{/i}}</label>
            <div class="controls">
848
              <select id="select01">
Mark Otto's avatar
Mark Otto committed
849
                <option>something</option>
850
851
852
853
854
855
                <option>2</option>
                <option>3</option>
                <option>4</option>
                <option>5</option>
              </select>
            </div>
856
          </div>
857
858
859
          <div class="control-group">
            <label class="control-label" for="multiSelect">{{_i}}Multi-select{{/i}}</label>
            <div class="controls">
860
              <select multiple="multiple" id="multiSelect">
861
862
863
864
865
866
867
                <option>1</option>
                <option>2</option>
                <option>3</option>
                <option>4</option>
                <option>5</option>
              </select>
            </div>
868
          </div>
869
870
871
          <div class="control-group">
            <label class="control-label" for="fileInput">{{_i}}File input{{/i}}</label>
            <div class="controls">
872
              <input class="input-file" id="fileInput" type="file">
873
            </div>
874
          </div>
875
876
877
          <div class="control-group">
            <label class="control-label" for="textarea">{{_i}}Textarea{{/i}}</label>
            <div class="controls">
878
              <textarea class="input-xlarge" id="textarea" rows="3"></textarea>
879
            </div>
880
          </div>
881
882
883
884
885
          <div class="form-actions">
            <button type="submit" class="btn primary">{{_i}}Save changes{{/i}}</button>
            <button type="reset" class="btn">{{_i}}Cancel{{/i}}</button>
          </div>
        </fieldset>
886
887
888
      </form>
    </div>
    <div class="span4">
889
890
891
892
893
894
895
896
897
898
899
900
901
902
      <h3>{{_i}}What's included{{/i}}</h3>
      <p>{{_i}}Shown on the left are all the default form controls we support. Here's the bulleted list:{{/i}}</p>
      <ul>
        <li>{{_i}}text inputs (text, password, email, etc){{/i}}</li>
        <li>{{_i}}checkbox{{/i}}</li>
        <li>{{_i}}radio{{/i}}</li>
        <li>{{_i}}select{{/i}}</li>
        <li>{{_i}}multiple select{{/i}}</li>
        <li>{{_i}}file input{{/i}}</li>
        <li>{{_i}}textarea{{/i}}</li>
      </ul>
      <hr>
      <h3>{{_i}}New defaults with v2.0{{/i}}</h3>
      <p>{{_i}}Up to v1.4, Bootstrap's default form styles used the horizontal layout. With Bootstrap 2, we removed that constraint to have smarter, more scalable defaults for any form.{{/i}}</p>
903
904
905
906
907
908
909
910
    </div>
  </div>

  <br>

  <div class="row">
    <div class="span8">
      <form class="form-horizontal">
911
912
913
914
915
        <fieldset>
          <legend>{{_i}}Form control states{{/i}}</legend>
          <div class="control-group">
            <label class="control-label" for="focusedInput">{{_i}}Focused input{{/i}}</label>
            <div class="controls">
916
              <input class="input-xlarge focused" id="focusedInput" type="text" value="{{_i}}This is focused…{{/i}}">
917
            </div>
918
          </div>
Pete Hopkins's avatar
Pete Hopkins committed
919
920
921
922
923
924
          <div class="control-group">
            <label class="control-label">Uneditable input</label>
            <div class="controls">
              <span class="input-xlarge uneditable-input">Some value here</span>
            </div>
          </div>
925
926
927
          <div class="control-group">
            <label class="control-label" for="disabledInput">{{_i}}Disabled input{{/i}}</label>
            <div class="controls">
928
              <input class="input-xlarge disabled" id="disabledInput" type="text" placeholder="{{_i}}Disabled input here…{{/i}}" disabled>
929
            </div>
930
          </div>
931
          <div class="control-group">
932
            <label class="control-label" for="optionsCheckbox2">{{_i}}Disabled checkbox{{/i}}</label>
933
934
            <div class="controls">
              <label class="checkbox">
935
                <input type="checkbox" id="optionsCheckbox2" value="option1" disabled>
936
937
938
                {{_i}}This is a disabled checkbox{{/i}}
              </label>
            </div>
939
          </div>
940
941
942
          <div class="control-group warning">
            <label class="control-label" for="inputError">{{_i}}Input with warning{{/i}}</label>
            <div class="controls">
943
              <input type="text" id="inputError">
944
945
              <span class="help-inline">{{_i}}Something may have gone wrong{{/i}}</span>
            </div>
946
          </div>
947
948
949
          <div class="control-group error">
            <label class="control-label" for="inputError">{{_i}}Input with error{{/i}}</label>
            <div class="controls">
950
              <input type="text" id="inputError">
951
952
              <span class="help-inline">{{_i}}Please correct the error{{/i}}</span>
            </div>
953
          </div>
954
955
956
          <div class="control-group success">
            <label class="control-label" for="inputError">{{_i}}Input with success{{/i}}</label>
            <div class="controls">
957
              <input type="text" id="inputError">
958
959
              <span class="help-inline">{{_i}}Woohoo!{{/i}}</span>
            </div>
960
          </div>
961
962
963
          <div class="control-group success">
            <label class="control-label" for="selectError">{{_i}}Select with success{{/i}}</label>
            <div class="controls">
964
              <select id="selectError">
965
966
967
968
969
970
971
972
                <option>1</option>
                <option>2</option>
                <option>3</option>
                <option>4</option>
                <option>5</option>
              </select>
              <span class="help-inline">{{_i}}Woohoo!{{/i}}</span>
            </div>
973
          </div>
974
975
976
977
978
          <div class="form-actions">
            <button type="submit" class="btn primary">{{_i}}Save changes{{/i}}</button>
            <button type="reset" class="btn">{{_i}}Cancel{{/i}}</button>
          </div>
        </fieldset>
979
980
981
      </form>
    </div>
    <div class="span4">
982
983
984
985
986
      <h3>{{_i}}Redesigned browser states{{/i}}</h3>
      <p>{{_i}}Bootstrap features styles for browser-supported focused and <code>disabled</code> states. We remove the default Webkit <code>outline</code> and apply a <code>box-shadow</code> in it's place for <code>:focus</code>.{{/i}}</p>
      <hr>
      <h3>{{_i}}Form validation{{/i}}</h3>
      <p>{{_i}}It also includes validation styles for errors, warnings, and success. To use, add the a class to the surrounding <code>.control-group</code>.{{/i}}</p>
987
988
989
<pre class="prettyprint linenums">
&lt;fieldset
  class="control-group error"&gt;
990

991
992
993
994
995
996
997
998
999
1000
&lt;/fieldset&gt;
</pre>
    </div>
  </div>

  <br>

  <div class="row">
    <div class="span8">
      <form class="form-horizontal">
1001
1002
1003
1004
1005
        <fieldset>
          <legend>{{_i}}Extending form controls{{/i}}</legend>
          <div class="control-group">
            <label class="control-label">{{_i}}Form sizes{{/i}}</label>
            <div class="controls docs-input-sizes">
1006
              <input class="span1" type="text" placeholder=".span1">
1007
1008
              <input class="span2" type="text" placeholder=".span2">
              <input class="span3" type="text" placeholder=".span3">
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
              <select class="span1">
                <option>1</option>
                <option>2</option>
                <option>3</option>
                <option>4</option>
                <option>5</option>
              </select>
              <select class="span2">
                <option>1</option>
                <option>2</option>
                <option>3</option>
                <option>4</option>
                <option>5</option>
              </select>
              <select class="span3">
                <option>1</option>
                <option>2</option>
                <option>3</option>
                <option>4</option>
                <option>5</option>
              </select>
1030
1031
              <p class="help-block">{{_i}}Use the same <code>.span*</code> classes from the grid system for input sizes.{{/i}}</p>
            </div>
1032
          </div>
1033
1034
1035
1036
1037
          <div class="control-group">
            <label class="control-label" for="prependedInput">{{_i}}Prepended text{{/i}}</label>
            <div class="controls">
              <div class="input-prepend">
                <span class="add-on">@</span>
1038
                <input class="span2" id="prependedInput" size="16" type="text">
1039
1040
              </div>
              <p class="help-block">{{_i}}Here's some help text{{/i}}</p>
1041
1042
            </div>
          </div>
1043
1044
1045
1046
          <div class="control-group">
            <label class="control-label" for="appendedInput">{{_i}}Appended text{{/i}}</label>
            <div class="controls">
              <div class="input-append">
1047
                <input class="span2" id="appendedInput" size="16" type="text">
1048
1049
1050
                <span class="add-on">.00</span>
              </div>
              <p class="help-block">{{_i}}Here's more help text{{/i}}</p>
1051
1052
            </div>
          </div>
1053
1054
1055
1056
          <div class="control-group">
            <label class="control-label" for="inlineCheckboxes">{{_i}}Inline checkboxes{{/i}}</label>
            <div class="controls">
              <label class="checkbox inline">
1057
                <input type="checkbox" id="inlineCheckbox1" value="option1"> 1
1058
1059
              </label>
              <label class="checkbox inline">
1060
                <input type="checkbox" id="inlineCheckbox2" value="option2"> 2
1061
1062
              </label>
              <label class="checkbox inline">
1063
                <input type="checkbox" id="inlineCheckbox3" value="option3"> 3
1064
1065
              </label>
            </div>
1066
          </div>
1067
          <div class="control-group">
1068
            <label class="control-label" for="optionsCheckboxList">{{_i}}Checkboxes{{/i}}</label>
1069
1070
            <div class="controls">
              <label class="checkbox">
1071
                <input type="checkbox" name="optionsCheckboxList1" value="option1">
1072
1073
1074
                {{_i}}Option one is this and that&mdash;be sure to include why it’s great{{/i}}
              </label>
              <label class="checkbox">
1075
                <input type="checkbox" name="optionsCheckboxList2" value="option2">
1076
1077
1078
                {{_i}}Option two can also be checked and included in form results{{/i}}
              </label>
              <label class="checkbox">
1079
                <input type="checkbox" name="optionsCheckboxList3" value="option3">
1080
1081
1082
1083
                {{_i}}Option three can&mdash;yes, you guessed it&mdash;also be checked and included in form results{{/i}}
              </label>
              <p class="help-text">{{_i}}<strong>Note:</strong> Labels surround all the options for much larger click areas and a more usable form.{{/i}}</p>
            </div>
1084
          </div>
1085
          <div class="control-group">
1086
            <label class="control-label">{{_i}}Radio buttons{{/i}}</label>
1087
1088
            <div class="controls">
              <label class="radio">
1089
                <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
1090
1091
1092
                {{_i}}Option one is this and that&mdash;be sure to include why it’s great{{/i}}
              </label>
              <label class="radio">
1093
                <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
1094
1095
1096
                {{_i}}Option two can is something else and selecting it will deselect option one{{/i}}
              </label>
            </div>
1097
          </div>
1098
1099
1100
1101
1102
          <div class="form-actions">
            <button type="submit" class="btn primary">{{_i}}Save changes{{/i}}</button>
            <button type="reset" class="btn">{{_i}}Cancel{{/i}}</button>
          </div>
        </fieldset>
1103
1104
1105
      </form>
    </div>
    <div class="span4">
1106
1107
1108
1109
1110
1111
1112
1113
1114
      <h3>{{_i}}Prepend &amp; append inputs{{/i}}</h3>
      <p>{{_i}}Input groups&mdash;with appended or prepended text&mdash;provide an easy way to give more context for your inputs. Great examples include the @ sign for Twitter usernames or $ for finances.{{/i}}</p>
      <hr>
      <h3>{{_i}}Checkboxes and radios{{/i}}</h3>
      <p>{{_i}}Up to v1.4, Bootstrap required extra markup around checkboxes and radios to stack them. Now, it's a simple matter of repeating the <code>&lt;label class="checkbox"&gt;</code> that wraps the <code>&lt;input type="checkbox"&gt;</code>.{{/i}}</p>
      <p>{{_i}}Inline checkboxes and radios are also supported. Just add <code>.inline</code> to any <code>.checkbox</code> or <code>.radio</code> and you're done.{{/i}}</p>
      <hr>
      <h4>{{_i}}Inline forms and append/prepend{{/i}}</h4>
      <p>{{_i}}To use prepend or append inputs in an inline form, be sure to place the <code>.add-on</code> and <code>input</code> on the same line, without spaces.{{/i}}</p>
1115
1116
1117
1118
1119
1120
    </div>
  </div><!-- /row -->
</section>



1121
1122
<!-- Buttons
================================================== -->
1123
1124
<section id="buttons">
  <div class="page-header">
1125
    <h1>{{_i}}Buttons{{/i}}</h1>
1126
1127
1128
1129
  </div>
  <table class="table table-bordered table-striped">
    <thead>
      <tr>
1130
1131
1132
        <th>{{_i}}Button{{/i}}</th>
        <th>{{_i}}Class{{/i}}</th>
        <th>{{_i}}Description{{/i}}</th>
1133
1134
1135
1136
      </tr>
    </thead>
    <tbody>
      <tr>
1137
        <td><a class="btn" href="#">{{_i}}Default{{/i}}</a></td>
1138
        <td><code>.btn</code></td>
1139
        <td>{{_i}}Standard gray button with gradient{{/i}}</td>
1140
1141
      </tr>
      <tr>
1142
        <td><a class="btn primary" href="#">{{_i}}Primary{{/i}}</a></td>
1143
        <td><code>.primary</code></td>
1144
        <td>{{_i}}Provides extra visual weight and identifies the primary action in a set of buttons{{/i}}</td>
1145
1146
      </tr>
      <tr>
1147
        <td><a class="btn info" href="#">{{_i}}Info{{/i}}</a></td>
1148
        <td><code>.info</code></td>
1149
        <td>{{_i}}Used as an alternate to the default styles{{/i}}</td>
1150
1151
      </tr>
      <tr>
1152
        <td><a class="btn success" href="#">{{_i}}Success{{/i}}</a></td>
1153
        <td><code>.success</code></td>
1154
        <td>{{_i}}Indicates a successful or positive action{{/i}}</td>
1155
1156
      </tr>
      <tr>
1157
        <td><a class="btn danger" href="#">{{_i}}Danger{{/i}}</a></td>
1158
        <td><code>.danger</code></td>
1159
        <td>{{_i}}Indicates a dangerous or potentially negative action{{/i}}</td>
1160
1161
1162
1163
1164
1165
      </tr>
    </tbody>
  </table>

  <div class="row">
    <div class="span4">
1166
1167
      <h3>{{_i}}Buttons for actions{{/i}}</h3>
      <p>{{_i}}As a convention, buttons should only be used for actions while hyperlinks are to be used for objects. For instance, "Download" should be a button while "recent activity" should be a link.{{/i}}</p>
1168
1169
    </div>
    <div class="span4">
1170
1171
      <h3>{{_i}}For anchors and forms{{/i}}</h3>
      <p>{{_i}}Button styles can be applied to anything with the <code>.btn</code> applied. However, typically you’ll want to apply these to only <code>&lt;a&gt;</code> and <code>&lt;button&gt;</code> elements.{{/i}}</p>
1172
1173
    </div>
    <div class="span4">
1174
      <p>{{_i}}<strong>Note:</strong> All buttons must include the <code>.btn</code> class. Button styles should be applied to <code>&lt;button&gt;</code> and <code>&lt;a&gt;</code> elements for consistency.{{/i}}</p>
1175
1176
1177
1178
1179
    </div>
  </div>

  <div class="row">
    <div class="span4">
1180
1181
      <h3>{{_i}}Multiple sizes{{/i}}</h3>
      <p>{{_i}}Fancy larger or smaller buttons? Have at it!{{/i}}</p>
1182
      <p>
1183
1184
        <a href="#" class="btn large primary">{{_i}}Primary action{{/i}}</a>
        <a href="#" class="btn large">{{_i}}Action{{/i}}</a>
1185
1186
      </p>
      <p>
1187
1188
        <a href="#" class="btn small primary">{{_i}}Primary action{{/i}}</a>
        <a href="#" class="btn small">{{_i}}Action{{/i}}</a>
1189
1190
      </p>
    </div>
1191
    <div class="span4">
1192
      <h3>{{_i}}Disabled state{{/i}}</h3>
1193
      <p>{{_i}}For disabled buttons, use <code>.disabled</code> for links and <code>:disabled</code> for <code>&lt;button&gt;</code> elements.{{/i}}</p>
1194
      <p>
1195
1196
        <a href="#" class="btn large primary disabled">{{_i}}Primary action{{/i}}</a>
        <a href="#" class="btn large disabled">{{_i}}Action{{/i}}</a>
1197
1198
      </p>
      <p>
1199
1200
        <button class="btn large primary disabled" disabled="disabled">{{_i}}Primary action{{/i}}</button>
        <button class="btn large" disabled>{{_i}}Action{{/i}}</button>
1201
1202
      </p>
    </div>
1203
1204
1205
1206
1207
    <div class="span4">
      <h3>Cross browser compatibility</h3>
      <p>In IE9, we drop the gradient on all buttons in favor of rounded corners as IE9 doesn't crop background gradients to the corners.</p>
      <p>Related, IE9 jankifies disabled <code>button</code> elements, rendering text gray with a nasty text-shadow&mdash;unfortunately we can't fix this.</p>
    </div>
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
  </div>

  <br>

</section>



<!-- Icons
================================================== -->
<section id="icons">
  <div class="page-header">
1220
    <h1>{{_i}}Icons <small>Graciously provided by <a href="http://glyphicons.com" target="_blank">Glyphicons</a></small>{{/i}}</h1>
1221
1222
  </div>
  <div class="row">
1223
    <div class="span3">
1224
      <div class="the-icons">
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
        <i class="icon glass"></i>
        <i class="icon music"></i>
        <i class="icon search"></i>
        <i class="icon envelope"></i>
        <i class="icon heart"></i>
        <i class="icon star"></i>
        <i class="icon star-empty"></i>
        <i class="icon user"></i>
        <i class="icon film"></i>
        <i class="icon th-large"></i>
        <i class="icon th"></i>
        <i class="icon th-list"></i>
        <i class="icon ok"></i>
        <i class="icon remove"></i>
        <i class="icon zoom-in"></i>
        <i class="icon zoom-out"></i>
        <i class="icon off"></i>
        <i class="icon signal"></i>
        <i class="icon cog"></i>
        <i class="icon trash"></i>

        <i class="icon home"></i>
        <i class="icon file"></i>
        <i class="icon time"></i>
        <i class="icon road"></i>
        <i class="icon download-alt"></i>
        <i class="icon download"></i>
        <i class="icon upload"></i>
        <i class="icon inbox"></i>
        <i class="icon play-circle"></i>
        <i class="icon repeat"></i>
1256
1257
1258
1259
      </div>
    </div>
    <div class="span3">
      <div class="the-icons">
1260
        <i class="icon refresh"></i>
1261
        <i class="icon list-alt"></i>
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
        <i class="icon lock"></i>
        <i class="icon flag"></i>
        <i class="icon headphones"></i>
        <i class="icon volume-off"></i>
        <i class="icon volume-down"></i>
        <i class="icon volume-up"></i>
        <i class="icon qrcode"></i>
        <i class="icon barcode"></i>

        <i class="icon tag"></i>
        <i class="icon tags"></i>
        <i class="icon book"></i>
        <i class="icon bookmark"></i>
        <i class="icon print"></i>
        <i class="icon camera"></i>
        <i class="icon font"></i>
        <i class="icon bold"></i>
        <i class="icon italic"></i>
        <i class="icon text-height"></i>
        <i class="icon text-width"></i>
        <i class="icon align-left"></i>
        <i class="icon align-center"></i>
        <i class="icon align-right"></i>
        <i class="icon align-justify"></i>
        <i class="icon list"></i>
        <i class="icon indent-left"></i>
        <i class="icon indent-right"></i>
        <i class="icon facetime-video"></i>
        <i class="icon picture"></i>
1291
1292
1293
1294
      </div>
    </div>
    <div class="span3">
      <div class="the-icons">
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
        <i class="icon pencil"></i>
        <i class="icon map-marker"></i>
        <i class="icon adjust"></i>
        <i class="icon tint"></i>
        <i class="icon edit"></i>
        <i class="icon share"></i>
        <i class="icon check"></i>
        <i class="icon move"></i>
        <i class="icon step-backward"></i>
        <i class="icon fast-backward"></i>
        <i class="icon backward"></i>
        <i class="icon play"></i>
        <i class="icon pause"></i>
        <i class="icon stop"></i>
        <i class="icon forward"></i>
        <i class="icon fast-forward"></i>
        <i class="icon step-forward"></i>
        <i class="icon eject"></i>
        <i class="icon chevron-left"></i>
        <i class="icon chevron-right"></i>

1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
        <i class="icon plus-sign"></i>
        <i class="icon minus-sign"></i>
        <i class="icon remove-sign"></i>
        <i class="icon ok-sign"></i>
        <i class="icon question-sign"></i>
        <i class="icon info-sign"></i>
        <i class="icon screenshot"></i>
        <i class="icon remove-circle"></i>
        <i class="icon ok-circle"></i>
        <i class="icon ban-circle"></i>
      </div>
    </div>
    <div class="span3">
      <div class="the-icons">
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
        <i class="icon arrow-left"></i>
        <i class="icon arrow-right"></i>
        <i class="icon arrow-up"></i>
        <i class="icon arrow-down"></i>
        <i class="icon share-alt"></i>
        <i class="icon resize-full"></i>
        <i class="icon resize-small"></i>
        <i class="icon plus"></i>
        <i class="icon minus"></i>
        <i class="icon asterisk"></i>
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360

        <i class="icon exclamation-sign"></i>
        <i class="icon gift"></i>
        <i class="icon leaf"></i>
        <i class="icon fire"></i>
        <i class="icon eye-open"></i>
        <i class="icon eye-close"></i>
        <i class="icon warning-sign"></i>
        <i class="icon plane"></i>
        <i class="icon calendar"></i>
        <i class="icon random"></i>
        <i class="icon comment"></i>
        <i class="icon magnet"></i>
        <i class="icon chevron-up"></i>
        <i class="icon chevron-down"></i>
        <i class="icon retweet"></i>
        <i class="icon shopping-cart"></i>
        <i class="icon folder-close"></i>
        <i class="icon folder-open"></i>
        <i class="icon resize-vertical"></i>
        <i class="icon resize-horizontal"></i>
1361
1362
      </div>
    </div>
1363
1364
  </div>
  <div class="alert alert-info">
Mark Otto's avatar
Mark Otto committed
1365
    {{_i}}<strong>Heads up!</strong> Icon classes are echoed via CSS <code>:after</code>. In the docs, we show a light red background color on hover to hightlight the icon's size.{{/i}}
1366
1367
1368
1369
1370
1371
  </div>

  <br>

  <div class="row">
    <div class="span4">
1372
1373
1374
      <h3>{{_i}}Built as a sprite{{/i}}</h3>
      <p>{{_i}}Instead of making every icon an extra request, we've compiled them into a sprite&mdash;a bunch of images in one file that uses CSS to position the images with <code>background-position</code>. This is the same method we use on Twitter.com and it has worked well for us.{{/i}}</p>
      <p>{{_i}}<a href="http://glyphicons.com" target="_blank">Glyphicons</a> has granted us use of the Halflings set in our open-source toolkit so long as we provide a link and credit. Please consider doing the same in your projects.{{/i}}</p>
1375
1376
    </div>
    <div class="span4">
1377
      <h3>{{_i}}How to use{{/i}}</h3>
1378
      <p>{{_i}}With v2.0.0, we have opted to use an <code>&lt;i&gt;</code> tag for all our icons with a base class of <code>.icon</code>. To use, place the following code just about anywhere:{{/i}}</p>
1379
<pre class="prettyprint linenums">
1380
&lt;i class="icon search"&gt;&lt;/i&gt;
Mark Otto's avatar
Mark Otto committed
1381
</pre>
1382
      <p>{{_i}}There are also styles available for inverted (white) icons, made ready with one extra class:{{/i}}</p>
Mark Otto's avatar
Mark Otto committed
1383
1384
<pre class="prettyprint linenums">
&lt;i class="icon white search"&gt;&lt;/i&gt;
1385
</pre>
1386
      <p>{{_i}}There are 120 classes to choose from for your icons. Just add an <code>&lt;i&gt;</code> tag with the right classes and you're set. You can find the full list in <strong>sprites.less</strong> or right here in this document.{{/i}}</p>
1387
1388
    </div>
    <div class="span4">
1389
1390
      <h3>{{_i}}Use cases{{/i}}</h3>
      <p>{{_i}}Icons are great, but where would one use them? Here are a few ideas:{{/i}}</p>
1391
      <ul>
1392
        <li>{{_i}}As visuals for your sidebar navigation{{/i}}</li>
1393
        <li>{{_i}}For a purely icon-driven navigation{{/i}}</li>
1394
1395
        <li>{{_i}}For buttons to help convey the meaning of an action{{/i}}</li>
        <li>{{_i}}With links to share context on a user's destination{{/i}}</li>
1396
      </ul>
1397
      <p>{{_i}}Essentially, anywhere you can put an <code>&lt;i&gt;</code> tag, you can put an icon.{{/i}}</p>
1398
1399
1400
    </div>
  </div>

1401
  <h3>{{_i}}Examples{{/i}}</h3>
1402
  <p>{{_i}}Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.{{/i}}</p>
1403
  <div class="row">
1404
    <div class="span4">
1405
      <div class="btn-toolbar" style="margin-bottom: 9px">
1406
        <div class="btn-group">
Mark Otto's avatar
Mark Otto committed
1407
1408
1409
1410
          <a class="btn" href="#"><i class="icon align-left"></i></a>
          <a class="btn" href="#"><i class="icon align-center"></i></a>
          <a class="btn" href="#"><i class="icon align-right"></i></a>
          <a class="btn" href="#"><i class="icon align-justify"></i></a>
1411
        </div>
1412
1413
1414
1415
1416
1417
1418
1419
        <div class="btn-group">
          <a class="btn primary" href="#"><i class="icon white user"></i> {{_i}}User{{/i}}</a>
          <a class="btn primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="#"><i class="icon pencil"></i> {{_i}}Edit{{/i}}</a></li>
            <li><a href="#"><i class="icon trash"></i> {{_i}}Delete{{/i}}</a></li>
            <li><a href="#"><i class="icon ban-circle"></i> {{_i}}Ban{{/i}}</a></li>
            <li class="divider"></li>
1420
            <li><a href="#"><i class="icon"></i> {{_i}}Make admin{{/i}}</a></li>
1421
1422
          </ul>
        </div>
1423
      </div>
1424
      <p>
1425
1426
1427
1428
1429
1430
        <a class="btn" href="#"><i class="icon refresh"></i> {{_i}}Refresh{{/i}}</a>
        <a class="btn success" href="#"><i class="icon white shopping-cart"></i> {{_i}}Checkout{{/i}}</a>
        <a class="btn danger" href="#"><i class="icon white trash"></i> {{_i}}Delete{{/i}}</a>
      </p>
      <p>
        <a class="btn large" href="#"><i class="icon comment"></i> {{_i}}Comment{{/i}}</a>
1431
        <a class="btn small" href="#"><i class="icon cog"></i> {{_i}}Settings{{/i}}</a>
1432
        <a class="btn small info" href="#"><i class="icon white info-sign"></i> {{_i}}More Info{{/i}}</a>
1433
      </p>
1434
    </div>
1435
    <div class="span4">
1436
1437
      <div class="well" style="padding: 8px 0;">
        <ul class="nav list">
Mark Otto's avatar
Mark Otto committed
1438
          <li class="active"><a href="#"><i class="icon white home"></i> {{_i}}Home{{/i}}</a></li>
Mark Otto's avatar
Mark Otto committed
1439
1440
          <li><a href="#"><i class="icon book"></i> {{_i}}Library{{/i}}</a></li>
          <li><a href="#"><i class="icon pencil"></i> {{_i}}Applications{{/i}}</a></li>
1441
          <li><a href="#"><i class="icon"></i> {{_i}}Misc{{/i}}</a></li>
1442
1443
1444
        </ul>
      </div> <!-- /well -->
    </div>
1445
1446
1447
    <div class="span4">
      <form>
        <div class="control-group">
1448
          <label class="control-label" for="prependedInput">{{_i}}Email address{{/i}}</label>
1449
1450
1451
          <div class="controls">
            <div class="input-prepend">
              <span class="add-on"><i class="icon envelope"></i></span>
1452
              <input class="span2" id="iconInput" type="text">
1453
1454
1455
1456
1457
            </div>
          </div>
        </div>
      </form>
    </div>
1458
  </div>
Pete Hopkins's avatar
Pete Hopkins committed
1459
</section>