base-css.mustache 54.2 KB
Newer Older
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>
For faster browsing, not all history is shown. View entire blame