On top of the scaffolding, basic HTML elements are styled and enhanced with extensible classes to provide a fresh, consistent look and feel.
+{{_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}}
The entire typographic grid is based on two Less variables in our preboot.less file: @baseFontSize
and @baseLineHeight
. The first is the base font-size used throughout and the second is the base line-height.
We use those variables, and some math, to create the margins, paddings, and line-heights of all our type and more.
+{{_i}}The entire typographic grid is based on two Less variables in our preboot.less file: @baseFontSize
and @baseLineHeight
. The first is the base font-size used throughout and the second is the base line-height.{{/i}}
{{_i}}We use those variables, and some math, to create the margins, paddings, and line-heights of all our type and more.{{/i}}
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.
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.
Element | -Usage | -Optional | +{{_i}}Element{{/i}} | +{{_i}}Usage{{/i}} | +{{_i}}Optional{{/i}} | - For emphasizing a snippet of text with important + {{_i}}For emphasizing a snippet of text with important{{/i}} | - None + {{_i}}None{{/i}} |
---|---|---|---|---|---|---|
- For emphasizing a snippet of text with stress + {{_i}}For emphasizing a snippet of text with stress{{/i}} | - None + {{_i}}None{{/i}} | |||||
- Wraps abbreviations and acronyms to show the expanded version on hover + {{_i}}Wraps abbreviations and acronyms to show the expanded version on hover{{/i}} |
- Include optional title for expanded text
+ {{_i}}Include optional title for expanded text{{/i}}
|
|||||
- For contact information for its nearest ancestor or the entire body of work + {{_i}}For contact information for its nearest ancestor or the entire body of work{{/i}} |
- Preserve formatting by ending all lines with <br>
+ {{_i}}Preserve formatting by ending all lines with <br> {{/i}}
|
Element | -Usage | -Optional | +{{_i}}Element{{/i}} | +{{_i}}Usage{{/i}} | +{{_i}}Optional{{/i}} | - Block-level element for quoting content from another source + {{_i}}Block-level element for quoting content from another source{{/i}} |
- Add .pull-left and .pull-right classes for floated options
+ {{_i}}Add .pull-left and .pull-right classes for floated options{{/i}}
|
---|---|---|---|---|---|
- Optional element for adding a user-facing citation, typically an author with title of work + {{_i}}Optional element for adding a user-facing citation, typically an author with title of work{{/i}} |
- Place the <cite> around the title or name of source
+ {{_i}}Place the <cite> around the title or name of source{{/i}}
|
To include a blockquote, wrap <blockquote>
around any HTML as the quote. For straight quotes we recommend a <p>
.
Include an optional <small>
element to cite your source and you'll get an em dash —
before it for styling purposes.
{{_i}}To include a blockquote, wrap <blockquote>
around any HTML as the quote. For straight quotes we recommend a <p>
.{{/i}}
{{_i}}Include an optional <small>
element to cite your source and you'll get an em dash —
before it for styling purposes.{{/i}}
<blockquote> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis.</p> - <small>Someone famous</small> + <small>{{_i}}Someone famous{{/i}}</small> </blockquote>
Default blockquotes are styled as such:
+{{_i}}Default blockquotes are styled as such:{{/i}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis.
- Someone famous in Body of work + {{_i}}Someone famous in Body of work{{/i}}
To float your blockquote to the right, add class="pull-right"
:
{{_i}}To float your blockquote to the right, add class="pull-right"
:{{/i}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis.
- Someone famous in Body of work + {{_i}}Someone famous in Body of work{{/i}}
<ul>
<ul class="unstyled">
<ol>
<dl>
Element | -Result | +{{_i}}Element{{/i}} | +{{_i}}Result{{/i}} |
---|---|---|---|
<code> |
- In a line of text like this, your wrapped code will look like this <html> element. |
+ {{_i}}In a line of text like this, your wrapped code will look like this <html> element.{{/i}} |
|
<pre> |
<div> - <h1>Heading</h1> - <p>Something right here...</p> + <h1>{{_i}}Heading{{/i}}</h1> + <p>{{_i}}Something right here…{{/i}}</p> </div>- Note: Be sure to keep code within {{_i}}Note: Be sure to keep code within |
||
<pre class="prettyprint"> |
- Using the google-code-prettify library, you're blocks of code get a slightly different visual style and automatic syntax highlighting. You can also add an additional class to add line numbers. +{{_i}}Using the google-code-prettify library, you're blocks of code get a slightly different visual style and automatic syntax highlighting. You can also add an additional class to add line numbers.{{/i}} <div> - <h1>Heading</h1> - <p>Something right here...</p> + <h1>{{_i}}Heading{{/i}}</h1> + <p>{{_i}}Something right here…{{/i}}</p> </div> <div> - <h1>Heading</h1> - <p>Something right here...</p> + <h1>{{_i}}Heading{{/i}}</h1> + <p>{{_i}}Something right here…{{/i}}</p> </div>- Download google-code-prettify and view the readme for how to use. +{{_i}}Download google-code-prettify and view the readme for how to use.{{/i}} |
Labels | -Markup | +{{_i}}Labels{{/i}} | +{{_i}}Markup{{/i}} | |||
---|---|---|---|---|---|---|
- Default + {{_i}}Default{{/i}} |
- <span class="label">Default</span>
+ <span class="label">{{_i}}Default{{/i}}</span>
|
|||||
- New + {{_i}}New{{/i}} |
- <span class="label success">New</span>
+ <span class="label success">{{/_i}}New{{/i}}</span>
|
|||||
- Warning + {{_i}}Warning{{/i}} |
- <span class="label warning">Warning</span>
+ <span class="label warning">{{_i}}Warning{{/i}}</span>
|
|||||
- Important + {{_i}}Important{{/i}} |
- <span class="label important">Important</span>
+ <span class="label important">{{_i}}Important{{/i}}</span>
|
|||||
- Notice + {{_i}}Notice{{/i}} |
- <span class="label notice">Notice</span>
+ <span class="label notice">{{_i}}Notice{{/i}}</span>
|
Tag | -Description | +{{_i}}Tag{{/i}} | +{{_i}}Description{{/i}} | - Wrapping element for displaying data in a tabular format + {{_i}}Wrapping element for displaying data in a tabular format{{/i}} | ||
---|---|---|---|---|---|---|
- Container element for table header rows (<tr> ) to label table columns
+ {{_i}}Container element for table header rows (<tr> ) to label table columns{{/i}}
|
||||||
- Container element for table rows (<tr> ) in the body of the table
+ {{_i}}Container element for table rows (<tr> ) in the body of the table{{/i}}
|
||||||
- Container element for a set of table cells (<td> or <th> ) that appears on a single row
+ {{_i}}Container element for a set of table cells (<td> or <th> ) that appears on a single row{{/i}}
|
||||||
- Default table cell + {{_i}}Default table cell{{/i}} | ||||||
- Special table cell for column (or row, depending on scope and placement) labels - Must be used within a <thead>
+ {{_i}}Special table cell for column (or row, depending on scope and placement) labels{{/i}}+ {{_i}}Must be used within a <thead> {{/i}}
|
||||||
- Description or summary of what the table holds, especially useful for screen readers + {{_i}}Description or summary of what the table holds, especially useful for screen readers{{/i}} |
Name | -Class | -Description | +{{_i}}Name{{/i}} | +{{_i}}Class{{/i}} | +{{_i}}Description{{/i}} |
---|---|---|---|---|---|
Default | -None | -No styles, just columns and rows | +{{_i}}Default{{/i}} | +{{_i}}None{{/i}} | +{{_i}}No styles, just columns and rows{{/i}} |
Basic | +{{_i}}Basic{{/i}} |
.table
|
- Only horizontal lines between rows | +{{_i}}Only horizontal lines between rows{{/i}} | |
Bordered | +{{_i}}Bordered{{/i}} |
.table-bordered
|
- Rounds corners and adds outter border | +{{_i}}Rounds corners and adds outter border{{/i}} | |
Zebra-stripe | +{{_i}}Zebra-stripe{{/i}} |
.table-striped
|
- Adds light gray background color to odd rows (1, 3, 5, etc) | +{{_i}}Adds light gray background color to odd rows (1, 3, 5, etc){{/i}} | |
Condensed | +{{_i}}Condensed{{/i}} |
.table-condensed
|
- Cuts vertical padding in half, from 8px to 4px, within all td and th elements |
+ {{_i}}Cuts vertical padding in half, from 8px to 4px, within all td and th elements{{/i}} |
Tables are automatically styled with only a few borders to ensure readability and maintain structure. With 2.0, the .table
class is required.
{{_i}}Tables are automatically styled with only a few borders to ensure readability and maintain structure. With 2.0, the .table
class is required.{{/i}}
<table class="table"> - ... + … </table>
Get a little fancy with your tables by adding zebra-striping—just add the .table-striped
class.
Note: Sprited tables use the :nth-child
CSS selector and is not available in IE7-IE8.
{{_i}}Get a little fancy with your tables by adding zebra-striping—just add the .table-striped
class.{{/i}}
{{_i}}Note: Sprited tables use the :nth-child
CSS selector and is not available in IE7-IE8.{{/i}}
<table class="table table-striped"> - ... + … </table>
Add borders around the entire table and rounded corners for aesthetic purposes.
+{{_i}}Add borders around the entire table and rounded corners for aesthetic purposes.{{/i}}
<table class="table table-bordered"> - ... + … </table>
Make your tables more compact by adding the .table-condensed
class to cut table cell padding in half (from 10px to 5px).
{{_i}}Make your tables more compact by adding the .table-condensed
class to cut table cell padding in half (from 8px to 4px).{{/i}}
<table class="table table-condensed"> - ... + … </table>
Include the jQuery Tablesorter plugin and automaically get clear styles for sorted columns.
+{{_i}}Include the jQuery Tablesorter plugin and automatically get clear styles for sorted columns.{{/i}}
<script src="jquery.tablesorter.js"></script> <script > @@ -722,7 +722,7 @@ }); </script> <table class="table table-striped"> - ... + … </table>
Styles for the Tablesorter, zebra striping, borders, and condensing may all compound in any variation to fit your needs.
+{{_i}}Styles for the Tablesorter, zebra striping, borders, and condensing may all compound in any variation to fit your needs.{{/i}}
# | -First Name | -Last Name | -Language | +{{_i}}First Name{{/i}} | +{{_i}}Last Name{{/i}} | +{{_i}}Language{{/i}} |
---|
Name | -Class | -Description | +{{_i}}Name{{/i}} | +{{_i}}Class{{/i}} | +{{_i}}Description{{/i}} |
---|---|---|---|---|---|
Vertical (default) | -.vertical-form (not required) |
- Stacked, left-aligned labels over controls | +{{_i}}Vertical (default){{/i}} | +.vertical-form ({{_i}}not required{{/i}}) |
+ {{_i}}Stacked, left-aligned labels over controls{{/i}} |
Horizontal | +{{_i}}Horizontal{{/i}} | .form-horizontal |
- Float left, right-aligned labels on same line as controls | +{{_i}}Float left, right-aligned labels on same line as controls{{/i}} | |
Inline | +{{_i}}Inline{{/i}} | .form-inline |
- Left-aligned label and inline-block controls for compact style | +{{_i}}Left-aligned label and inline-block controls for compact style{{/i}} | |
Search | +{{_i}}Search{{/i}} | .form-search |
- Extra-rounded text input for a typical search aesthetic | +{{_i}}Extra-rounded text input for a typical search aesthetic{{/i}} |
With v2.0, we have lighter and smarter defaults for form styles. No extra markup, just form controls.
+{{_i}}With v2.0, we have lighter and smarter defaults for form styles. No extra markup, just form controls.{{/i}}
Reflecting default WebKit styles, just add .form-search
for extra rounded search fields.
{{_i}}Reflecting default WebKit styles, just add .form-search
for extra rounded search fields.{{/i}}
Inputs are block level to start. For .form-inline
and .form-horizontal
, we use inline-block.
{{_i}}Inputs are block level to start. For .form-inline
and .form-horizontal
, we use inline-block.{{/i}}
Shown on the left are all the default form controls we support. Here's the bulleted list:
+{{_i}}Shown on the left are all the default form controls we support. Here's the bulleted list:{{/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}}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}}
Bootstrap features styles for browser-supported focused and disabled
states. We remove the default Webkit outline
and apply a box-shadow
in it's place for :focus
.
{{_i}}Bootstrap features styles for browser-supported focused and disabled
states. We remove the default Webkit outline
and apply a box-shadow
in it's place for :focus
.{{/i}}
It also includes validation styles for errors, warnings, and success. To use, add the a class to the surrounding .control-group
.
{{_i}}It also includes validation styles for errors, warnings, and success. To use, add the a class to the surrounding .control-group
.{{/i}}
<fieldset class="control-group error"> - ... + … </fieldset>
Input groups—with appended or prepended text—provide an easy way to give more context for your inputs. Great examples include the @ sign for Twitter usernames or $ for finances.
+{{_i}}Input groups—with appended or prepended text—provide an easy way to give more context for your inputs. Great examples include the @ sign for Twitter usernames or $ for finances.{{/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 <label class="checkbox">
that wraps the <input type="checkbox">
.
Inline checkboxes and radios are also supported. Just add .inline
to any .checkbox
or .radio
and you're done.
{{_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 <label class="checkbox">
that wraps the <input type="checkbox">
.{{/i}}
{{_i}}Inline checkboxes and radios are also supported. Just add .inline
to any .checkbox
or .radio
and you're done.{{/i}}
Instead of making every icon an extra request, we've compiled them into a sprite—a bunch of images in one file that uses CSS to position the images with background-position
. This is the same method we use on Twitter.com and it has worked well for us.
Glyphicons 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}}Instead of making every icon an extra request, we've compiled them into a sprite—a bunch of images in one file that uses CSS to position the images with background-position
. This is the same method we use on Twitter.com and it has worked well for us.{{/i}}
{{_i}}Glyphicons 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}}
With v2.0.0, the <i>
tag is essentially dedicated to iconography. To use the icons, you can place the follow code wherever you like one to appear:
{{_i}}With v2.0.0, the <i>
tag is essentially dedicated to iconography. To use the icons, you can place the follow code wherever you like one to appear:{{/i}}
<i class="chevron-left"></i>-
There are over 100 classes to choose from for your icons. Just add an <i>
tag with the right class and you're set. You can find the full list in sprites.less or right here in this document.
{{_i}}There are over 100 classes to choose from for your icons. Just add an <i>
tag with the right class and you're set. You can find the full list in sprites.less or right here in this document.{{/i}}
Icons are great, but where would one use them? Here are a few ideas:
+{{_i}}Icons are great, but where would one use them? Here are a few ideas:{{/i}}
Essentially, anywhere you can put an <i>
tag, you can put an icon.
{{_i}}Essentially, anywhere you can put an <i>
tag, you can put an icon.{{/i}}
Use them in buttons, or in button groups for a toolbar style presentation.
+{{_i}}Use them in buttons, or in button groups for a toolbar style presentation.{{/i}}
- Refresh - Settings + {{_i}}Refresh{{/i}} + {{_i}}Settings{{/i}}
Or, use them in navigation.
+{{_i}}Or, use them in navigation.{{/i}}