diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 46cd2bc4bc..a625ec51ac 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -389,6 +389,18 @@ a.text-success:hover { text-align: center; } +.text-left { + text-align: left; +} + +.text-right { + text-align: right; +} + +.text-center { + text-align: center; +} + h1, h2, h3, diff --git a/docs/assets/js/html5shiv.js b/docs/assets/js/html5shiv.js new file mode 100644 index 0000000000..784f221caf --- /dev/null +++ b/docs/assets/js/html5shiv.js @@ -0,0 +1,8 @@ +/* + HTML5 Shiv v3.6.2pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); +a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; +c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| +"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",version:"3.6.2pre",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment(); +for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d + + + + Base · Bootstrap + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Base CSS

+

Fundamental HTML elements styled and enhanced with extensible classes.

+
+
+ + +
+ + +
+ +
+ + + + +
+ + +

Headings

+

All HTML headings, <h1> through <h6> are available.

+
+

h1. Heading 1

+

h2. Heading 2

+

h3. Heading 3

+

h4. Heading 4

+
h5. Heading 5
+
h6. Heading 6
+
+ +

Body copy

+

Bootstrap's global default font-size is 14px, with a line-height of 20px. This is applied to the <body> and all paragraphs. In addition, <p> (paragraphs) receive a bottom margin of half their line-height (10px by default).

+
+

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.

+

Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.

+

Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

+
+
<p>...</p>
+ +

Lead body copy

+

Make a paragraph stand out by adding .lead.

+
+

Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.

+
+
<p class="lead">...</p>
+ +

Built with Less

+

The typographic scale is based on two LESS variables in variables.less: @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 simple math to create the margins, paddings, and line-heights of all our type and more. Customize them and Bootstrap adapts.

+ + +
+ + +

Emphasis

+

Make use of HTML's default emphasis tags with lightweight styles.

+ +

<small>

+

For de-emphasizing inline or blocks of text, use the small tag.

+
+

This line of text is meant to be treated as fine print.

+
+
+<p>
+  <small>This line of text is meant to be treated as fine print.</small>
+</p>
+
+ +

Bold

+

For emphasizing a snippet of text with a heavier font-weight.

+
+

The following snippet of text is rendered as bold text.

+
+
<strong>rendered as bold text</strong>
+ +

Italics

+

For emphasizing a snippet of text with italics.

+
+

The following snippet of text is rendered as italicized text.

+
+
<em>rendered as italicized text</em>
+ +

Heads up! Feel free to use <b> and <i> in HTML5. <b> is meant to highlight words or phrases without conveying additional importance while <i> is mostly for voice, technical terms, etc.

+ +

Alignment classes

+

Easily realign text to components with text alignment classes.

+
+

Left aligned text.

+

Center aligned text.

+

Right aligned text.

+
+
+<p class="text-left">Left aligned text.</p>
+<p class="text-center">Center aligned text.</p>
+<p class="text-right">Right aligned text.</p>
+
+ +

Emphasis classes

+

Convey meaning through color with a handful of emphasis utility classes.

+
+

Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.

+

Etiam porta sem malesuada magna mollis euismod.

+

Donec ullamcorper nulla non metus auctor fringilla.

+

Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis.

+

Duis mollis, est non commodo luctus, nisi erat porttitor ligula.

+
+
+<p class="muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p>
+<p class="text-warning">Etiam porta sem malesuada magna mollis euismod.</p>
+<p class="text-error">Donec ullamcorper nulla non metus auctor fringilla.</p>
+<p class="text-info">Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis.</p>
+<p class="text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>
+
+ + +
+ + +

Abbreviations

+

Stylized implementation of HTML's <abbr> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a title attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.

+ +

<abbr>

+

For expanded text on long hover of an abbreviation, include the title attribute.

+
+

An abbreviation of the word attribute is attr.

+
+
<abbr title="attribute">attr</abbr>
+ +

<abbr class="initialism">

+

Add .initialism to an abbreviation for a slightly smaller font-size.

+
+

HTML is the best thing since sliced bread.

+
+
<abbr title="HyperText Markup Language" class="initialism">HTML</abbr>
+ + +
+ + +

Addresses

+

Present contact information for the nearest ancestor or the entire body of work.

+ +

<address>

+

Preserve formatting by ending all lines with <br>.

+
+
+ Twitter, Inc.
+ 795 Folsom Ave, Suite 600
+ San Francisco, CA 94107
+ P: (123) 456-7890 +
+
+ Full Name
+ first.last@example.com +
+
+
+<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>
+  <strong>Full Name</strong><br>
+  <a href="mailto:#">first.last@example.com</a>
+</address>
+
+ + +
+ + +

Blockquotes

+

For quoting blocks of content from another source within your document.

+ +

Default blockquote

+

Wrap <blockquote> around any HTML as the quote. For straight quotes we recommend a <p>.

+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+
+
+
+<blockquote>
+  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
+</blockquote>
+
+ +

Blockquote options

+

Style and content changes for simple variations on a standard blockquote.

+ +

Naming a source

+

Add <small> tag for identifying the source. Wrap the name of the source work in <cite>.

+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+ Someone famous in Source Title +
+
+
+<blockquote>
+  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
+  <small>Someone famous <cite title="Source Title">Source Title</cite></small>
+</blockquote>
+
+ +

Alternate displays

+

Use .pull-right for a floated, right-aligned blockquote.

+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+ Someone famous in Source Title +
+
+
+<blockquote class="pull-right">
+  ...
+</blockquote>
+
+ + +
+ + + +

Lists

+ +

Unordered

+

A list of items in which the order does not explicitly matter.

+
+
    +
  • Lorem ipsum dolor sit amet
  • +
  • Consectetur adipiscing elit
  • +
  • Integer molestie lorem at massa
  • +
  • Facilisis in pretium nisl aliquet
  • +
  • Nulla volutpat aliquam velit +
      +
    • Phasellus iaculis neque
    • +
    • Purus sodales ultricies
    • +
    • Vestibulum laoreet porttitor sem
    • +
    • Ac tristique libero volutpat at
    • +
    +
  • +
  • Faucibus porta lacus fringilla vel
  • +
  • Aenean sit amet erat nunc
  • +
  • Eget porttitor lorem
  • +
+
+
+<ul>
+  <li>...</li>
+</ul>
+
+ +

Ordered

+

A list of items in which the order does explicitly matter.

+
+
    +
  1. Lorem ipsum dolor sit amet
  2. +
  3. Consectetur adipiscing elit
  4. +
  5. Integer molestie lorem at massa
  6. +
  7. Facilisis in pretium nisl aliquet
  8. +
  9. Nulla volutpat aliquam velit
  10. +
  11. Faucibus porta lacus fringilla vel
  12. +
  13. Aenean sit amet erat nunc
  14. +
  15. Eget porttitor lorem
  16. +
+
+
+<ol>
+  <li>...</li>
+</ol>
+
+ +

Unstyled

+

Remove the default list-style and left padding on list items (immediate children only).

+
+
    +
  • Lorem ipsum dolor sit amet
  • +
  • Consectetur adipiscing elit
  • +
  • Integer molestie lorem at massa
  • +
  • Facilisis in pretium nisl aliquet
  • +
  • Nulla volutpat aliquam velit +
      +
    • Phasellus iaculis neque
    • +
    • Purus sodales ultricies
    • +
    • Vestibulum laoreet porttitor sem
    • +
    • Ac tristique libero volutpat at
    • +
    +
  • +
  • Faucibus porta lacus fringilla vel
  • +
  • Aenean sit amet erat nunc
  • +
  • Eget porttitor lorem
  • +
+
+
+<ul class="unstyled">
+  <li>...</li>
+</ul>
+
+ +

Inline

+

Place all list items on a single line with inline-block and some light padding.

+
+
    +
  • Lorem ipsum
  • +
  • Phasellus iaculis
  • +
  • Nulla volutpat
  • +
+
+
+<ul class="inline">
+  <li>...</li>
+</ul>
+
+ +

Description

+

A list of terms with their associated descriptions.

+
+
+
Description lists
+
A description list is perfect for defining terms.
+
Euismod
+
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
+
Donec id elit non mi porta gravida at eget metus.
+
Malesuada porta
+
Etiam porta sem malesuada magna mollis euismod.
+
+
+
+<dl>
+  <dt>...</dt>
+  <dd>...</dd>
+</dl>
+
+ +

Horizontal description

+

Make terms and descriptions in <dl> line up side-by-side.

+
+
+
Description lists
+
A description list is perfect for defining terms.
+
Euismod
+
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
+
Donec id elit non mi porta gravida at eget metus.
+
Malesuada porta
+
Etiam porta sem malesuada magna mollis euismod.
+
Felis euismod semper eget lacinia
+
Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
+
+
+
+<dl class="dl-horizontal">
+  <dt>...</dt>
+  <dd>...</dd>
+</dl>
+
+

+ Heads up! + Horizontal description lists will truncate terms that are too long to fit in the left column fix text-overflow. In narrower viewports, they will change to the default stacked layout. +

+
+ + + + +
+ + +

Inline

+

Wrap inline snippets of code with <code>.

+
+ For example, <section> should be wrapped as inline. +
+
+For example, <code>&lt;section&gt;</code> should be wrapped as inline.
+
+ +

Basic block

+

Use <pre> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.

+
+
<p>Sample text here...</p>
+
+
+<pre>
+  &lt;p&gt;Sample text here...&lt;/p&gt;
+</pre>
+
+

Heads up! Be sure to keep code within <pre> tags as close to the left as possible; it will render all tabs.

+

You may optionally add the .pre-scrollable class which will set a max-height of 350px and provide a y-axis scrollbar.

+
+ + + + +
+ + +

Default styles

+

For basic styling—light padding and only horizontal dividers—add the base class .table to any <table>.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+
+
+<table class="table">
+  …
+</table>
+
+ + +
+ + +

Optional classes

+

Add any of the following classes to the .table base class.

+ +

.table-striped

+

Adds zebra-striping to any table row within the <tbody> via the :nth-child CSS selector (not available in IE7-8).

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+
+
+<table class="table table-striped">
+  …
+</table>
+
+ +

.table-bordered

+

Add borders and rounded corners to the table.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
MarkOtto@TwBootstrap
2JacobThornton@fat
3Larry the Bird@twitter
+
+
+<table class="table table-bordered">
+  …
+</table>
+
+ +

.table-hover

+

Enable a hover state on table rows within a <tbody>.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter
+
+
+<table class="table table-hover">
+  …
+</table>
+
+ +

.table-condensed

+

Makes tables more compact by cutting cell padding in half.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter
+
+
+<table class="table table-condensed">
+  …
+</table>
+
+ + +
+ + +

Optional row classes

+

Use contextual classes to color table rows.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClassDescription
+ .success + Indicates a successful or positive action.
+ .error + Indicates a dangerous or potentially negative action.
+ .warning + Indicates a warning that might need attention.
+ .info + Used as an alternative to the default styles.
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#ProductPayment TakenStatus
1TB - Monthly01/04/2012Approved
2TB - Monthly02/04/2012Declined
3TB - Monthly03/04/2012Pending
4TB - Monthly04/04/2012Call in to confirm
+
+
+...
+  <tr class="success">
+    <td>1</td>
+    <td>TB - Monthly</td>
+    <td>01/04/2012</td>
+    <td>Approved</td>
+  </tr>
+...
+
+ + +
+ + +

Supported table markup

+

List of supported table HTML elements and how they should be used.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TagDescription
+ <table> + + Wrapping element for displaying data in a tabular format +
+ <thead> + + Container element for table header rows (<tr>) to label table columns +
+ <tbody> + + Container element for table rows (<tr>) in the body of the table +
+ <tr> + + Container element for a set of table cells (<td> or <th>) that appears on a single row +
+ <td> + + Default table cell +
+ <th> + + Special table cell for column (or row, depending on scope and placement) labels
+ Must be used within a <thead> +
+ <caption> + + Description or summary of what the table holds, especially useful for screen readers +
+
+<table>
+  <caption>...</caption>
+  <thead>
+    <tr>
+      <th>...</th>
+      <th>...</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td>...</td>
+      <td>...</td>
+    </tr>
+  </tbody>
+</table>
+
+ +
+ + + + +
+ + +

Default styles

+

Individual form controls receive styling, but without any required base class on the <form> or large changes in markup. Results in stacked, left-aligned labels on top of form controls.

+
+
+ Legend + + + Example block-level help text here. + + +
+
+
+<form>
+  <fieldset>
+    <legend>Legend</legend>
+    <label>Label name</label>
+    <input type="text" placeholder="Type something…">
+    <span class="help-block">Example block-level help text here.</span>
+    <label class="checkbox">
+      <input type="checkbox"> Check me out
+    </label>
+    <button type="submit" class="btn">Submit</button>
+  </fieldset>
+</form>
+
+ + +
+ + +

Optional layouts

+

Included with Bootstrap are three optional form layouts for common use cases.

+ +

Search form

+

Add .form-search to the form and .search-query to the <input> for an extra-rounded text input.

+ +
+<form class="form-search">
+  <input type="text" class="input-medium search-query">
+  <button type="submit" class="btn">Search</button>
+</form>
+
+ +

Inline form

+

Add .form-inline for left-aligned labels and inline-block controls for a compact layout.

+
+ + + + +
+
+<form class="form-inline">
+  <input type="text" class="input-small" placeholder="Email">
+  <input type="password" class="input-small" placeholder="Password">
+  <label class="checkbox">
+    <input type="checkbox"> Remember me
+  </label>
+  <button type="submit" class="btn">Sign in</button>
+</form>
+
+ +

Horizontal form

+

Right align labels and float them to the left to make them appear on the same line as controls. Requires the most markup changes from a default form:

+
    +
  • Add .form-horizontal to the form
  • +
  • Wrap labels and controls in .control-group
  • +
  • Add .control-label to the label
  • +
  • Wrap any associated controls in .controls for proper alignment
  • +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + +
+
+
+
+<form class="form-horizontal">
+  <div class="control-group">
+    <label class="control-label" for="inputEmail">Email</label>
+    <div class="controls">
+      <input type="text" id="inputEmail" placeholder="Email">
+    </div>
+  </div>
+  <div class="control-group">
+    <label class="control-label" for="inputPassword">Password</label>
+    <div class="controls">
+      <input type="password" id="inputPassword" placeholder="Password">
+    </div>
+  </div>
+  <div class="control-group">
+    <div class="controls">
+      <label class="checkbox">
+        <input type="checkbox"> Remember me
+      </label>
+      <button type="submit" class="btn">Sign in</button>
+    </div>
+  </div>
+</form>
+
+ + +
+ + +

Supported form controls

+

Examples of standard form controls supported in an example form layout.

+ +

Inputs

+

Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.

+

Requires the use of a specified type at all times.

+
+ +
+
+<input type="text" placeholder="Text input">
+
+ +

Textarea

+

Form control which supports multiple lines of text. Change rows attribute as necessary.

+
+ +
+
+<textarea rows="3"></textarea>
+
+ +

Checkboxes and radios

+

Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.

+

Default (stacked)

+
+ +
+ + +
+
+<label class="checkbox">
+  <input type="checkbox" value="">
+  Option one is this and that—be sure to include why it's great
+</label>
+
+<label class="radio">
+  <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
+  Option one is this and that—be sure to include why it's great
+</label>
+<label class="radio">
+  <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
+  Option two can be something else and selecting it will deselect option one
+</label>
+
+ +

Inline checkboxes

+

Add the .inline class to a series of checkboxes or radios for controls appear on the same line.

+
+ + + +
+
+<label class="checkbox inline">
+  <input type="checkbox" id="inlineCheckbox1" value="option1"> 1
+</label>
+<label class="checkbox inline">
+  <input type="checkbox" id="inlineCheckbox2" value="option2"> 2
+</label>
+<label class="checkbox inline">
+  <input type="checkbox" id="inlineCheckbox3" value="option3"> 3
+</label>
+
+ +

Selects

+

Use the default option or specify a multiple="multiple" to show multiple options at once.

+
+ +
+ +
+
+<select>
+  <option>1</option>
+  <option>2</option>
+  <option>3</option>
+  <option>4</option>
+  <option>5</option>
+</select>
+
+<select multiple="multiple">
+  <option>1</option>
+  <option>2</option>
+  <option>3</option>
+  <option>4</option>
+  <option>5</option>
+</select>
+
+ + +
+ + +

Extending form controls

+

Adding on top of existing browser controls, Bootstrap includes other useful form components.

+ +

Prepended and appended inputs

+

Add text or buttons before or after any text-based input. Do note that select elements are not supported here.

+ +

Default options

+

Wrap an .add-on and an input with one of two classes to prepend or append text to an input.

+
+
+ @ + +
+
+
+ + .00 +
+
+
+<div class="input-prepend">
+  <span class="add-on">@</span>
+  <input class="span2" id="prependedInput" type="text" placeholder="Username">
+</div>
+<div class="input-append">
+  <input class="span2" id="appendedInput" type="text">
+  <span class="add-on">.00</span>
+</div>
+
+ +

Combined

+

Use both classes and two instances of .add-on to prepend and append an input.

+
+
+ $ + + .00 +
+
+
+<div class="input-prepend input-append">
+  <span class="add-on">$</span>
+  <input class="span2" id="appendedPrependedInput" type="text">
+  <span class="add-on">.00</span>
+</div>
+
+ +

Buttons instead of text

+

Instead of a <span> with text, use a .btn to attach a button (or two) to an input.

+
+
+ + +
+
+
+<div class="input-append">
+  <input class="span2" id="appendedInputButton" type="text">
+  <button class="btn" type="button">Go!</button>
+</div>
+
+
+
+ + + +
+
+
+<div class="input-append">
+  <input class="span2" id="appendedInputButtons" type="text">
+  <button class="btn" type="button">Search</button>
+  <button class="btn" type="button">Options</button>
+</div>
+
+ +

Button dropdowns

+

+
+
+ + +
+
+
+<div class="input-append">
+  <input class="span2" id="appendedDropdownButton" type="text">
+  <div class="btn-group">
+    <button class="btn dropdown-toggle" data-toggle="dropdown">
+      Action
+      <span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu">
+      ...
+    </ul>
+  </div>
+</div>
+
+ +
+
+ + +
+
+
+<div class="input-prepend">
+  <div class="btn-group">
+    <button class="btn dropdown-toggle" data-toggle="dropdown">
+      Action
+      <span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu">
+      ...
+    </ul>
+  </div>
+  <input class="span2" id="prependedDropdownButton" type="text">
+</div>
+
+ +
+ +
+
+<div class="input-prepend input-append">
+  <div class="btn-group">
+    <button class="btn dropdown-toggle" data-toggle="dropdown">
+      Action
+      <span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu">
+      ...
+    </ul>
+  </div>
+  <input class="span2" id="appendedPrependedDropdownButton" type="text">
+  <div class="btn-group">
+    <button class="btn dropdown-toggle" data-toggle="dropdown">
+      Action
+      <span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu">
+      ...
+    </ul>
+  </div>
+</div>
+
+ +

Segmented dropdown groups

+
+
+
+ + + +
+ +
+
+ +
+ + + +
+
+
+
+<form>
+  <div class="input-prepend">
+    <div class="btn-group">...</div>
+    <input type="text">
+  </div>
+  <div class="input-append">
+    <input type="text">
+    <div class="btn-group">...</div>
+  </div>
+</form>
+
+ +

Search form

+ +
+<form class="form-search">
+  <div class="input-append">
+    <input type="text" class="span2 search-query">
+    <button type="submit" class="btn">Search</button>
+  </div>
+  <div class="input-prepend">
+    <button type="submit" class="btn">Search</button>
+    <input type="text" class="span2 search-query">
+  </div>
+</form>
+
+ +

Control sizing

+

Use relative sizing classes like .input-large or match your inputs to the grid column sizes using .span* classes.

+ +

Block level inputs

+

Make any <input> or <textarea> element behave like a block level element.

+
+
+ +
+
+
+<input class="input-block-level" type="text" placeholder=".input-block-level">
+
+ +

Relative sizing

+
+
+ + + + + + +
+
+
+<input class="input-mini" type="text" placeholder=".input-mini">
+<input class="input-small" type="text" placeholder=".input-small">
+<input class="input-medium" type="text" placeholder=".input-medium">
+<input class="input-large" type="text" placeholder=".input-large">
+<input class="input-xlarge" type="text" placeholder=".input-xlarge">
+<input class="input-xxlarge" type="text" placeholder=".input-xxlarge">
+
+

+ Heads up! In future versions, we'll be altering the use of these relative input classes to match our button sizes. For example, .input-large will increase the padding and font-size of an input. +

+ +

Grid sizing

+

Use .span1 to .span12 for inputs that match the same sizes of the grid columns.

+
+
+ + + + + + +
+
+
+<input class="span1" type="text" placeholder=".span1">
+<input class="span2" type="text" placeholder=".span2">
+<input class="span3" type="text" placeholder=".span3">
+<select class="span1">
+  ...
+</select>
+<select class="span2">
+  ...
+</select>
+<select class="span3">
+  ...
+</select>
+
+ +

For multiple grid inputs per line, use the .controls-row modifier class for proper spacing. It floats the inputs to collapse white-space, sets the proper margins, and clears the float.

+
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+<div class="controls">
+  <input class="span5" type="text" placeholder=".span5">
+</div>
+<div class="controls controls-row">
+  <input class="span4" type="text" placeholder=".span4">
+  <input class="span1" type="text" placeholder=".span1">
+</div>
+...
+
+ +

Uneditable inputs

+

Present data in a form that's not editable without using actual form markup.

+
+ Some value here +
+
+<span class="input-xlarge uneditable-input">Some value here</span>
+
+ +

Form actions

+

End a form with a group of actions (buttons). When placed within a .form-horizontal, the buttons will automatically indent to line up with the form controls.

+
+
+ + +
+
+
+<div class="form-actions">
+  <button type="submit" class="btn btn-primary">Save changes</button>
+  <button type="button" class="btn">Cancel</button>
+</div>
+
+ +

Help text

+

Inline and block level support for help text that appears around form controls.

+

Inline help

+
+ Inline help text +
+
+<input type="text"><span class="help-inline">Inline help text</span>
+
+ +

Block help

+
+ + A longer block of help text that breaks onto a new line and may extend beyond one line. +
+
+<input type="text"><span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span>
+
+ + +
+ + +

Form control states

+

Provide feedback to users or visitors with basic feedback states on form controls and labels.

+ +

Input focus

+

We remove the default outline styles on some form controls and apply a box-shadow in its place for :focus.

+
+ +
+
+<input class="input-xlarge" id="focusedInput" type="text" value="This is focused...">
+
+ +

Invalid inputs

+

Style inputs via default browser functionality with :invalid. Specify a type, add the required attribute if the field is not optional, and (if applicable) specify a pattern.

+
+ +
+
+<input class="span3" type="email" required>
+
+ +

Disabled inputs

+

Add the disabled attribute on an input to prevent user input and trigger a slightly different look.

+
+ +
+
+<input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here..." disabled>
+
+ +

Validation states

+

Bootstrap includes validation styles for error, warning, info, and success messages. To use, add the appropriate class to the surrounding .control-group.

+ +
+
+ +
+ + Something may have gone wrong +
+
+
+ +
+ + Please correct the error +
+
+
+ +
+ + Username is taken +
+
+
+ +
+ + Woohoo! +
+
+
+
+<div class="control-group warning">
+  <label class="control-label" for="inputWarning">Input with warning</label>
+  <div class="controls">
+    <input type="text" id="inputWarning">
+    <span class="help-inline">Something may have gone wrong</span>
+  </div>
+</div>
+
+<div class="control-group error">
+  <label class="control-label" for="inputError">Input with error</label>
+  <div class="controls">
+    <input type="text" id="inputError">
+    <span class="help-inline">Please correct the error</span>
+  </div>
+</div>
+
+<div class="control-group info">
+  <label class="control-label" for="inputInfo">Input with info</label>
+  <div class="controls">
+    <input type="text" id="inputInfo">
+    <span class="help-inline">Username is already taken</span>
+  </div>
+</div>
+
+<div class="control-group success">
+  <label class="control-label" for="inputSuccess">Input with success</label>
+  <div class="controls">
+    <input type="text" id="inputSuccess">
+    <span class="help-inline">Woohoo!</span>
+  </div>
+</div>
+
+ +
+ + + + +
+ + +

Default buttons

+

Button styles can be applied to anything with the .btn class applied. However, typically you'll want to apply these to only <a> and <button> elements for the best rendering.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Buttonclass=""Description
btnStandard gray button with gradient
btn btn-primaryProvides extra visual weight and identifies the primary action in a set of buttons
btn btn-infoUsed as an alternative to the default styles
btn btn-successIndicates a successful or positive action
btn btn-warningIndicates caution should be taken with this action
btn btn-dangerIndicates a dangerous or potentially negative action
btn btn-inverseAlternate dark gray button, not tied to a semantic action or use
btn btn-linkDeemphasize a button by making it look like a link while maintaining button behavior
+ +

Cross browser compatibility

+

IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button elements, rendering text gray with a nasty text-shadow that we cannot fix.

+ + +

Button sizes

+

Fancy larger or smaller buttons? Add .btn-large, .btn-small, or .btn-mini for additional sizes.

+
+

+ + +

+

+ + +

+

+ + +

+

+ + +

+
+
+<p>
+  <button class="btn btn-large btn-primary" type="button">Large button</button>
+  <button class="btn btn-large" type="button">Large button</button>
+</p>
+<p>
+  <button class="btn btn-primary" type="button">Default button</button>
+  <button class="btn" type="button">Default button</button>
+</p>
+<p>
+  <button class="btn btn-small btn-primary" type="button">Small button</button>
+  <button class="btn btn-small" type="button">Small button</button>
+</p>
+<p>
+  <button class="btn btn-mini btn-primary" type="button">Mini button</button>
+  <button class="btn btn-mini" type="button">Mini button</button>
+</p>
+
+

Create block level buttons—those that span the full width of a parent— by adding .btn-block.

+
+
+ + +
+
+
+<button class="btn btn-large btn-block btn-primary" type="button">Block level button</button>
+<button class="btn btn-large btn-block" type="button">Block level button</button>
+
+ + +

Disabled state

+

Make buttons look unclickable by fading them back 50%.

+ +

Anchor element

+

Add the .disabled class to <a> buttons.

+

+ Primary link + Link +

+
+<a href="#" class="btn btn-large btn-primary disabled">Primary link</a>
+<a href="#" class="btn btn-large disabled">Link</a>
+
+

+ Heads up! + We use .disabled as a utility class here, similar to the common .active class, so no prefix is required. Also, this class is only for aesthetic; you must use custom JavaScript to disable links here. +

+ +

Button element

+

Add the disabled attribute to <button> buttons.

+

+ + +

+
+<button type="button" class="btn btn-large btn-primary disabled" disabled="disabled">Primary button</button>
+<button type="button" class="btn btn-large" disabled>Button</button>
+
+ + +

One class, multiple tags

+

Use the .btn class on an <a>, <button>, or <input> element.

+
+ Link + + + +
+
+<a class="btn" href="">Link</a>
+<button class="btn" type="submit">Button</button>
+<input class="btn" type="button" value="Input">
+<input class="btn" type="submit" value="Submit">
+
+

As a best practice, try to match the element for your context to ensure matching cross-browser rendering. If you have an input, use an <input type="submit"> for your button.

+ +
+ + + + +
+ + +

Add classes to an <img> element to easily style images in any project.

+
+ + + +
+
+<img src="..." class="img-rounded">
+<img src="..." class="img-circle">
+<img src="..." class="img-polaroid">
+
+

Heads up! .img-rounded and .img-circle do not work in IE7-8 due to lack of border-radius support.

+ + +
+ + + + +
+ + +

Icon glyphs

+

140 icons in sprite form, available in dark gray (default) and white, provided by Glyphicons.

+
    +
  • icon-glass
  • +
  • icon-music
  • +
  • icon-search
  • +
  • icon-envelope
  • +
  • icon-heart
  • +
  • icon-star
  • +
  • icon-star-empty
  • +
  • icon-user
  • +
  • icon-film
  • +
  • icon-th-large
  • +
  • icon-th
  • +
  • icon-th-list
  • +
  • icon-ok
  • +
  • icon-remove
  • +
  • icon-zoom-in
  • +
  • icon-zoom-out
  • +
  • icon-off
  • +
  • icon-signal
  • +
  • icon-cog
  • +
  • icon-trash
  • +
  • icon-home
  • +
  • icon-file
  • +
  • icon-time
  • +
  • icon-road
  • +
  • icon-download-alt
  • +
  • icon-download
  • +
  • icon-upload
  • +
  • icon-inbox
  • + +
  • icon-play-circle
  • +
  • icon-repeat
  • +
  • icon-refresh
  • +
  • icon-list-alt
  • +
  • icon-lock
  • +
  • icon-flag
  • +
  • icon-headphones
  • +
  • icon-volume-off
  • +
  • icon-volume-down
  • +
  • icon-volume-up
  • +
  • icon-qrcode
  • +
  • icon-barcode
  • +
  • icon-tag
  • +
  • icon-tags
  • +
  • icon-book
  • +
  • icon-bookmark
  • +
  • icon-print
  • +
  • icon-camera
  • +
  • icon-font
  • +
  • icon-bold
  • +
  • icon-italic
  • +
  • icon-text-height
  • +
  • icon-text-width
  • +
  • icon-align-left
  • +
  • icon-align-center
  • +
  • icon-align-right
  • +
  • icon-align-justify
  • +
  • icon-list
  • + +
  • icon-indent-left
  • +
  • icon-indent-right
  • +
  • icon-facetime-video
  • +
  • icon-picture
  • +
  • icon-pencil
  • +
  • icon-map-marker
  • +
  • icon-adjust
  • +
  • icon-tint
  • +
  • icon-edit
  • +
  • icon-share
  • +
  • icon-check
  • +
  • icon-move
  • +
  • icon-step-backward
  • +
  • icon-fast-backward
  • +
  • icon-backward
  • +
  • icon-play
  • +
  • icon-pause
  • +
  • icon-stop
  • +
  • icon-forward
  • +
  • icon-fast-forward
  • +
  • icon-step-forward
  • +
  • icon-eject
  • +
  • icon-chevron-left
  • +
  • icon-chevron-right
  • +
  • icon-plus-sign
  • +
  • icon-minus-sign
  • +
  • icon-remove-sign
  • +
  • icon-ok-sign
  • + +
  • icon-question-sign
  • +
  • icon-info-sign
  • +
  • icon-screenshot
  • +
  • icon-remove-circle
  • +
  • icon-ok-circle
  • +
  • icon-ban-circle
  • +
  • icon-arrow-left
  • +
  • icon-arrow-right
  • +
  • icon-arrow-up
  • +
  • icon-arrow-down
  • +
  • icon-share-alt
  • +
  • icon-resize-full
  • +
  • icon-resize-small
  • +
  • icon-plus
  • +
  • icon-minus
  • +
  • icon-asterisk
  • +
  • icon-exclamation-sign
  • +
  • icon-gift
  • +
  • icon-leaf
  • +
  • icon-fire
  • +
  • icon-eye-open
  • +
  • icon-eye-close
  • +
  • icon-warning-sign
  • +
  • icon-plane
  • +
  • icon-calendar
  • +
  • icon-random
  • +
  • icon-comment
  • +
  • icon-magnet
  • + +
  • icon-chevron-up
  • +
  • icon-chevron-down
  • +
  • icon-retweet
  • +
  • icon-shopping-cart
  • +
  • icon-folder-close
  • +
  • icon-folder-open
  • +
  • icon-resize-vertical
  • +
  • icon-resize-horizontal
  • +
  • icon-hdd
  • +
  • icon-bullhorn
  • +
  • icon-bell
  • +
  • icon-certificate
  • +
  • icon-thumbs-up
  • +
  • icon-thumbs-down
  • +
  • icon-hand-right
  • +
  • icon-hand-left
  • +
  • icon-hand-up
  • +
  • icon-hand-down
  • +
  • icon-circle-arrow-right
  • +
  • icon-circle-arrow-left
  • +
  • icon-circle-arrow-up
  • +
  • icon-circle-arrow-down
  • +
  • icon-globe
  • +
  • icon-wrench
  • +
  • icon-tasks
  • +
  • icon-filter
  • +
  • icon-briefcase
  • +
  • icon-fullscreen
  • +
+ +

Glyphicons attribution

+

Glyphicons Halflings are normally not available for free, but an arrangement between Bootstrap and the Glyphicons creators have made this possible at no cost to you as developers. As a thank you, we ask you to include an optional link back to Glyphicons whenever practical.

+ + +
+ + +

How to use

+

All icons require an <i> tag with a unique class, prefixed with icon-. To use, place the following code just about anywhere:

+
+<i class="icon-search"></i>
+
+

There are also styles available for inverted (white) icons, made ready with one extra class. We will specifically enforce this class on hover and active states for nav and dropdown links.

+
+<i class="icon-search icon-white"></i>
+
+

+ Heads up! + When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <i> tag for proper spacing. +

+ + +
+ + +

Icon examples

+

Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.

+ +

Buttons

+ +
Button group in a button toolbar
+
+
+
+ + + + +
+
+
+
+<div class="btn-toolbar">
+  <div class="btn-group">
+    <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>
+  </div>
+</div>
+
+ +
Dropdown in a button group
+
+ +
+
+<div class="btn-group">
+  <a class="btn btn-primary" href="#"><i class="icon-user icon-white"></i> User</a>
+  <a class="btn 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> Edit</a></li>
+    <li><a href="#"><i class="icon-trash"></i> Delete</a></li>
+    <li><a href="#"><i class="icon-ban-circle"></i> Ban</a></li>
+    <li class="divider"></li>
+    <li><a href="#"><i class="i"></i> Make admin</a></li>
+  </ul>
+</div>
+
+ +
Button sizes
+ +
+<a class="btn btn-large" href="#"><i class="icon-star"></i> Star</a>
+<a class="btn btn-small" href="#"><i class="icon-star"></i> Star</a>
+<a class="btn btn-mini" href="#"><i class="icon-star"></i> Star</a>
+
+ +

Navigation

+ +
+<ul class="nav nav-list">
+  <li class="active"><a href="#"><i class="icon-home icon-white"></i> Home</a></li>
+  <li><a href="#"><i class="icon-book"></i> Library</a></li>
+  <li><a href="#"><i class="icon-pencil"></i> Applications</a></li>
+  <li><a href="#"><i class="i"></i> Misc</a></li>
+</ul>
+
+ +

Form fields

+
+
+ +
+
+ +
+
+
+
+
+<div class="control-group">
+  <label class="control-label" for="inputIcon">Email address</label>
+  <div class="controls">
+    <div class="input-prepend">
+      <span class="add-on"><i class="icon-envelope"></i></span>
+      <input class="span2" id="inputIcon" type="text">
+    </div>
+  </div>
+</div>
+
+ +
+ + + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/components.html b/docs/components.html index 76590a1ca7..4293454b2b 100644 --- a/docs/components.html +++ b/docs/components.html @@ -14,7 +14,7 @@ @@ -175,7 +175,7 @@
 <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
   <li><a tabindex="-1" href="#">Regular link</a></li>
-  <li><a tabindex="-1" href="#">Disabled link</a></li>
+  <li class="disabled"><a tabindex="-1" href="#">Disabled link</a></li>
   <li><a tabindex="-1" href="#">Another link</a></li>
 </ul>
 
diff --git a/docs/css.html b/docs/css.html index 09cd0a0dd9..2cbd32eedf 100644 --- a/docs/css.html +++ b/docs/css.html @@ -14,7 +14,7 @@ diff --git a/docs/customize.html b/docs/customize.html index 011fb807f3..41341f51d9 100644 --- a/docs/customize.html +++ b/docs/customize.html @@ -14,7 +14,7 @@ diff --git a/docs/examples/carousel.html b/docs/examples/carousel.html index 328fe5a1e1..50f34e648d 100644 --- a/docs/examples/carousel.html +++ b/docs/examples/carousel.html @@ -255,7 +255,7 @@ diff --git a/docs/examples/fluid.html b/docs/examples/fluid.html new file mode 100644 index 0000000000..b004ffad69 --- /dev/null +++ b/docs/examples/fluid.html @@ -0,0 +1,163 @@ + + + + + Bootstrap, from Twitter + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+

Hello, world!

+

This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.

+

Learn more »

+
+
+
+

Heading

+

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

+

View details »

+
+
+

Heading

+

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

+

View details »

+
+
+

Heading

+

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

+

View details »

+
+
+
+
+

Heading

+

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

+

View details »

+
+
+

Heading

+

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

+

View details »

+
+
+

Heading

+

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

+

View details »

+
+
+
+
+ +
+ +
+

© Company 2013

+
+ +
+ + + + + + + + + + + + + + + + + + + diff --git a/docs/examples/hero.html b/docs/examples/hero.html index 6c585eac25..c28b757b96 100644 --- a/docs/examples/hero.html +++ b/docs/examples/hero.html @@ -19,7 +19,7 @@ diff --git a/docs/examples/justified-nav.html b/docs/examples/justified-nav.html index 9071a8d81b..ef8f8d4286 100644 --- a/docs/examples/justified-nav.html +++ b/docs/examples/justified-nav.html @@ -84,7 +84,7 @@ diff --git a/docs/examples/marketing-narrow.html b/docs/examples/marketing-narrow.html index 996f8a1da1..f6f5d16851 100644 --- a/docs/examples/marketing-narrow.html +++ b/docs/examples/marketing-narrow.html @@ -50,7 +50,7 @@ diff --git a/docs/examples/signin.html b/docs/examples/signin.html index 17578483a3..031052789d 100644 --- a/docs/examples/signin.html +++ b/docs/examples/signin.html @@ -46,7 +46,7 @@ diff --git a/docs/examples/starter-template.html b/docs/examples/starter-template.html index 93ba809e38..b81f21d174 100644 --- a/docs/examples/starter-template.html +++ b/docs/examples/starter-template.html @@ -18,7 +18,7 @@ diff --git a/docs/examples/sticky-footer-navbar.html b/docs/examples/sticky-footer-navbar.html index ad4f87a04f..cb5de6de2a 100644 --- a/docs/examples/sticky-footer-navbar.html +++ b/docs/examples/sticky-footer-navbar.html @@ -70,7 +70,7 @@ diff --git a/docs/examples/sticky-footer.html b/docs/examples/sticky-footer.html index 80490ffd0c..d307d79387 100644 --- a/docs/examples/sticky-footer.html +++ b/docs/examples/sticky-footer.html @@ -67,7 +67,7 @@ diff --git a/docs/extend.html b/docs/extend.html new file mode 100644 index 0000000000..4de7b9c4b3 --- /dev/null +++ b/docs/extend.html @@ -0,0 +1,282 @@ + + + + + Extend · Bootstrap + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Extending Bootstrap

+

Extend Bootstrap to take advantage of included styles and components, as well as LESS variables and mixins.

+
+
+ +
+ + +
+ +
+ + + + +
+ + + LESS CSS +

Bootstrap is made with LESS at its core, a dynamic stylesheet language created by our good friend, Alexis Sellier. It makes developing systems-based CSS faster, easier, and more fun.

+ +

Why LESS?

+

One of Bootstrap's creators wrote a quick blog post about this, summarized here:

+
    +
  • Bootstrap compiles faster ~6x faster with Less compared to Sass
  • +
  • Less is written in JavaScript, making it easier to us to dive in and patch compared to Ruby with Sass.
  • +
  • Less is more; we want to feel like we're writing CSS and making Bootstrap approachable to all.
  • +
+ +

What's included?

+

As an extension of CSS, LESS includes variables, mixins for reusable snippets of code, operations for simple math, nesting, and even color functions.

+ +

Learn more

+

Visit the official website at http://lesscss.org to learn more.

+
+ + + + +
+ + +

Since our CSS is written with Less and utilizes variables and mixins, it needs to be compiled for final production implementation. Here's how.

+ +
+ Note: If you're submitting a pull request to GitHub with modified CSS, you must recompile the CSS via any of these methods. +
+ +

Tools for compiling

+ +

Command line

+

Follow the instructions in the project readme on GitHub for compiling via command line.

+ +

JavaScript

+

Download the latest Less.js and include the path to it (and Bootstrap) in the <head>.

+
+<link rel="stylesheet/less" href="/path/to/bootstrap.less">
+<script src="/path/to/less.js"></script>
+
+

To recompile the .less files, just save them and reload your page. Less.js compiles them and stores them in local storage.

+ +

Unofficial Mac app

+

The unofficial Mac app watches directories of .less files and compiles the code to local files after every save of a watched .less file. If you like, you can toggle preferences in the app for automatic minifying and which directory the compiled files end up in.

+ +

More apps

+

Crunch

+

Crunch is a great looking LESS editor and compiler built on Adobe Air.

+

CodeKit

+

Created by the same guy as the unofficial Mac app, CodeKit is a Mac app that compiles LESS, SASS, Stylus, and CoffeeScript.

+

Simpless

+

Mac, Linux, and Windows app for drag and drop compiling of LESS files. Plus, the source code is on GitHub.

+ +
+ + + + +
+ +

Quickly start any web project by dropping in the compiled or minified CSS and JS. Layer on custom styles separately for easy upgrades and maintenance moving forward.

+ +

Setup file structure

+

Download the latest compiled Bootstrap and place into your project. For example, you might have something like this:

+
+   app/
+       layouts/
+       templates/
+   public/
+       css/
+           bootstrap.min.css
+       js/
+           bootstrap.min.js
+       img/
+           glyphicons-halflings.png
+           glyphicons-halflings-white.png
+
+ +

Utilize starter template

+

Copy the following base HTML to get started.

+
+<html>
+  <head>
+    <title>Bootstrap 101 Template</title>
+    <!-- Bootstrap -->
+    <link href="public/css/bootstrap.min.css" rel="stylesheet">
+  </head>
+  <body>
+    <h1>Hello, world!</h1>
+    <!-- Bootstrap -->
+    <script src="public/js/bootstrap.min.js"></script>
+  </body>
+</html>
+
+ +

Layer on custom code

+

Work in your custom CSS, JS, and more as necessary to make Bootstrap your own with your own separate CSS and JS files.

+
+<html>
+  <head>
+    <title>Bootstrap 101 Template</title>
+    <!-- Bootstrap -->
+    <link href="public/css/bootstrap.min.css" rel="stylesheet">
+    <!-- Project -->
+    <link href="public/css/application.css" rel="stylesheet">
+  </head>
+  <body>
+    <h1>Hello, world!</h1>
+    <!-- Bootstrap -->
+    <script src="public/js/bootstrap.min.js"></script>
+    <!-- Project -->
+    <script src="public/js/application.js"></script>
+  </body>
+</html>
+
+ +
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/gallery.html b/docs/gallery.html index a905274b2a..09119927fd 100644 --- a/docs/gallery.html +++ b/docs/gallery.html @@ -14,7 +14,7 @@ diff --git a/docs/getting-started.html b/docs/getting-started.html index 7599877f93..ec12122df0 100644 --- a/docs/getting-started.html +++ b/docs/getting-started.html @@ -14,7 +14,7 @@ diff --git a/docs/index.html b/docs/index.html index b6a58f5d1e..c1f0ff2c8d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -14,7 +14,7 @@ diff --git a/docs/javascript.html b/docs/javascript.html index c73cd9f29a..36ea4b9f7e 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -14,7 +14,7 @@ @@ -1021,6 +1021,14 @@ $('a[data-toggle="tab"]').on('shown', function (e) {

Object structure is: delay: { show: 500, hide: 100 }

+ + container + string | false + false + +

Appends the popover to a specific element container: 'body'

+ +
diff --git a/docs/scaffolding.html b/docs/scaffolding.html new file mode 100644 index 0000000000..6adc11711c --- /dev/null +++ b/docs/scaffolding.html @@ -0,0 +1,602 @@ + + + + + Scaffolding · Bootstrap + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Scaffolding

+

Bootstrap is built on responsive 12-column grids, layouts, and components.

+
+
+ +
+ + +
+ +
+ + + + +
+ + +

Requires HTML5 doctype

+

Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.

+
+<!DOCTYPE html>
+<html lang="en">
+  ...
+</html>
+
+ +

Typography and links

+

Bootstrap sets basic global display, typography, and link styles. Specifically, we:

+
    +
  • Remove margin on the body
  • +
  • Set background-color: white; on the body
  • +
  • Use the @baseFontFamily, @baseFontSize, and @baseLineHeight attributes as our typographic base
  • +
  • Set the global link color via @linkColor and apply link underlines only on :hover
  • +
+

These styles can be found within scaffolding.less.

+ +

Reset via Normalize

+

With Bootstrap 2, the old reset block has been dropped in favor of Normalize.css, a project by Nicolas Gallagher and Jonathan Neal that also powers the HTML5 Boilerplate. While we use much of Normalize within our reset.less, we have removed some elements specifically for Bootstrap.

+ +
+ + + + + +
+ + +

Live grid example

+

The default Bootstrap grid system utilizes 12 columns, making for a 940px wide container without responsive features enabled. With the responsive CSS file added, the grid adapts to be 724px and 1170px wide depending on your viewport. Below 767px viewports, the columns become fluid and stack vertically.

+
+
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
+
+
2
+
3
+
4
+
+
+
4
+
5
+
+
+
9
+
+
+ +

Basic grid HTML

+

For a simple two column layout, create a .row and add the appropriate number of .span* columns. As this is a 12-column grid, each .span* spans a number of those 12 columns, and should always add up to 12 for each row (or the number of columns in the parent).

+
+<div class="row">
+  <div class="span4">...</div>
+  <div class="span8">...</div>
+</div>
+
+

Given this example, we have .span4 and .span8, making for 12 total columns and a complete row.

+ +

Offsetting columns

+

Move columns to the right using .offset* classes. Each class increases the left margin of a column by a whole column. For example, .offset4 moves .span4 over four columns.

+
+
+
4
+
3 offset 2
+
+
+
3 offset 1
+
3 offset 2
+
+
+
6 offset 3
+
+
+
+<div class="row">
+  <div class="span4">...</div>
+  <div class="span3 offset2">...</div>
+</div>
+
+ +

Nesting columns

+

To nest your content with the default grid, add a new .row and set of .span* columns within an existing .span* column. Nested rows should include a set of columns that add up to the number of columns of its parent.

+
+
+ Level 1 column +
+
+ Level 2 +
+
+ Level 2 +
+
+
+
+
+<div class="row">
+  <div class="span9">
+    Level 1 column
+    <div class="row">
+      <div class="span6">Level 2</div>
+      <div class="span3">Level 2</div>
+    </div>
+  </div>
+</div>
+
+
+ + + + +
+ + +

Live fluid grid example

+

The fluid grid system uses percents instead of pixels for column widths. It has the same responsive capabilities as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.

+
+
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
+
+
4
+
4
+
4
+
+
+
4
+
8
+
+
+
6
+
6
+
+
+
12
+
+
+ +

Basic fluid grid HTML

+

Make any row "fluid" by changing .row to .row-fluid. The column classes stay the exact same, making it easy to flip between fixed and fluid grids.

+
+<div class="row-fluid">
+  <div class="span4">...</div>
+  <div class="span8">...</div>
+</div>
+
+ +

Fluid offsetting

+

Operates the same way as the fixed grid system offsetting: add .offset* to any column to offset by that many columns.

+
+
+
4
+
4 offset 4
+
+
+
3 offset 3
+
3 offset 3
+
+
+
6 offset 6
+
+
+
+<div class="row-fluid">
+  <div class="span4">...</div>
+  <div class="span4 offset2">...</div>
+</div>
+
+ +

Fluid nesting

+

Fluid grids utilize nesting differently: each nested level of columns should add up to 12 columns. This is because the fluid grid uses percentages, not pixels, for setting widths.

+
+
+ Fluid 12 +
+
+ Fluid 6 +
+
+ Fluid 6 +
+
+ Fluid 6 +
+
+
+
+ Fluid 6 +
+
+
+
+
+<div class="row-fluid">
+  <div class="span12">
+    Fluid 12
+    <div class="row-fluid">
+      <div class="span6">
+        Fluid 6
+        <div class="row-fluid">
+          <div class="span6">Fluid 6</div>
+          <div class="span6">Fluid 6</div>
+        </div>
+      </div>
+      <div class="span6">Fluid 6</div>
+    </div>
+  </div>
+</div>
+
+ +
+ + + + + +
+ + +

Fixed layout

+

Provides a common fixed-width (and optionally responsive) layout with only <div class="container"> required.

+
+
+
+
+<body>
+  <div class="container">
+    ...
+  </div>
+</body>
+
+ +

Fluid layout

+

Create a fluid, two-column page with <div class="container-fluid">—great for applications and docs.

+
+
+
+
+
+<div class="container-fluid">
+  <div class="row-fluid">
+    <div class="span2">
+      <!--Sidebar content-->
+    </div>
+    <div class="span10">
+      <!--Body content-->
+    </div>
+  </div>
+</div>
+
+
+ + + + + +
+ + +

Enabling responsive features

+

Turn on responsive CSS in your project by including the proper meta tag and additional stylesheet within the <head> of your document. If you've compiled Bootstrap from the Customize page, you need only include the meta tag.

+
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
+
+

Heads up! Bootstrap doesn't include responsive features by default at this time as not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it as needed.

+ +

About responsive Bootstrap

+ Responsive devices +

Media queries allow for custom CSS based on a number of conditions—ratios, widths, display type, etc—but usually focuses around min-width and max-width.

+
    +
  • Modify the width of column in our grid
  • +
  • Stack elements instead of float wherever necessary
  • +
  • Resize headings and text to be more appropriate for devices
  • +
+

Use media queries responsibly and only as a start to your mobile audiences. For larger projects, do consider dedicated code bases and not layers of media queries.

+ +

Supported devices

+

Bootstrap supports a handful of media queries in a single file to help make your projects more appropriate on different devices and screen resolutions. Here's what's included:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LabelLayout widthColumn widthGutter width
Large display1200px and up70px30px
Default980px and up60px20px
Portrait tablets768px and above42px20px
Phones to tablets767px and belowFluid columns, no fixed widths
Phones480px and belowFluid columns, no fixed widths
+
+/* Large desktop */
+@media (min-width: 1200px) { ... }
+
+/* Portrait tablet to landscape and desktop */
+@media (min-width: 768px) and (max-width: 979px) { ... }
+
+/* Landscape phone to portrait tablet */
+@media (max-width: 767px) { ... }
+
+/* Landscape phones and down */
+@media (max-width: 480px) { ... }
+
+ + +

Responsive utility classes

+

For faster mobile-friendly development, use these utility classes for showing and hiding content by device. Below is a table of the available classes and their effect on a given media query layout (labeled by device). They can be found in responsive.less.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClassPhones 767px and belowTablets 979px to 768pxDesktops Default
.visible-phoneVisible
.visible-tabletVisible
.visible-desktopVisible
.hidden-phoneVisibleVisible
.hidden-tabletVisibleVisible
.hidden-desktopVisibleVisible
+ +

When to use

+

Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation. Responsive utilities should not be used with tables, and as such are not supported.

+ +

Responsive utilities test case

+

Resize your browser or load on different devices to test the above classes.

+

Visible on...

+

Green checkmarks indicate that class is visible in your current viewport.

+
    +
  • Phone✔ Phone
  • +
  • Tablet✔ Tablet
  • +
  • Desktop✔ Desktop
  • +
+

Hidden on...

+

Here, green checkmarks indicate that class is hidden in your current viewport.

+
    +
  • Phone✔ Phone
  • +
  • Tablet✔ Tablet
  • +
  • Desktop✔ Desktop
  • +
+ +
+ + + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/templates/layout.mustache b/docs/templates/layout.mustache index ac612703bc..4f6d3d2584 100644 --- a/docs/templates/layout.mustache +++ b/docs/templates/layout.mustache @@ -14,7 +14,7 @@ diff --git a/docs/templates/pages/base-css.mustache b/docs/templates/pages/base-css.mustache new file mode 100644 index 0000000000..4ec1eee296 --- /dev/null +++ b/docs/templates/pages/base-css.mustache @@ -0,0 +1,2102 @@ + +
+
+

{{_i}}Base CSS{{/i}}

+

{{_i}}Fundamental HTML elements styled and enhanced with extensible classes.{{/i}}

+
+
+ + +
+ + +
+ +
+ + + + +
+ + + {{! Headings }} +

{{_i}}Headings{{/i}}

+

{{_i}}All HTML headings, <h1> through <h6> are available.{{/i}}

+
+

h1. {{_i}}Heading 1{{/i}}

+

h2. {{_i}}Heading 2{{/i}}

+

h3. {{_i}}Heading 3{{/i}}

+

h4. {{_i}}Heading 4{{/i}}

+
h5. {{_i}}Heading 5{{/i}}
+
h6. {{_i}}Heading 6{{/i}}
+
+ + {{! Body copy }} +

{{_i}}Body copy{{/i}}

+

{{_i}}Bootstrap's global default font-size is 14px, with a line-height of 20px. This is applied to the <body> and all paragraphs. In addition, <p> (paragraphs) receive a bottom margin of half their line-height (10px by default).{{/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.

+

Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.

+

Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

+
+
<p>...</p>
+ + {{! Body copy .lead }} +

{{_i}}Lead body copy{{/i}}

+

{{_i}}Make a paragraph stand out by adding .lead.{{/i}}

+
+

Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.

+
+
<p class="lead">...</p>
+ + {{! Using LESS }} +

{{_i}}Built with Less{{/i}}

+

{{_i}}The typographic scale is based on two LESS variables in variables.less: @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 simple math to create the margins, paddings, and line-heights of all our type and more. Customize them and Bootstrap adapts.{{/i}}

+ + +
+ + + {{! Emphasis }} +

{{_i}}Emphasis{{/i}}

+

{{_i}}Make use of HTML's default emphasis tags with lightweight styles.{{/i}}

+ +

<small>

+

{{_i}}For de-emphasizing inline or blocks of text, use the small tag.{{/i}}

+
+

This line of text is meant to be treated as fine print.

+
+
+<p>
+  <small>This line of text is meant to be treated as fine print.</small>
+</p>
+
+ +

{{_i}}Bold{{/i}}

+

{{_i}}For emphasizing a snippet of text with a heavier font-weight.{{/i}}

+
+

The following snippet of text is rendered as bold text.

+
+
<strong>rendered as bold text</strong>
+ +

{{_i}}Italics{{/i}}

+

{{_i}}For emphasizing a snippet of text with italics.{{/i}}

+
+

The following snippet of text is rendered as italicized text.

+
+
<em>rendered as italicized text</em>
+ +

{{_i}}Heads up!{{/i}} {{_i}}Feel free to use <b> and <i> in HTML5. <b> is meant to highlight words or phrases without conveying additional importance while <i> is mostly for voice, technical terms, etc.{{/i}}

+ +

{{_i}}Alignment classes{{/i}}

+

{{_i}}Easily realign text to components with text alignment classes.{{/i}}

+
+

Left aligned text.

+

Center aligned text.

+

Right aligned text.

+
+
+<p class="text-left">Left aligned text.</p>
+<p class="text-center">Center aligned text.</p>
+<p class="text-right">Right aligned text.</p>
+
+ +

{{_i}}Emphasis classes{{/i}}

+

{{_i}}Convey meaning through color with a handful of emphasis utility classes.{{/i}}

+
+

Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.

+

Etiam porta sem malesuada magna mollis euismod.

+

Donec ullamcorper nulla non metus auctor fringilla.

+

Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis.

+

Duis mollis, est non commodo luctus, nisi erat porttitor ligula.

+
+
+<p class="muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p>
+<p class="text-warning">Etiam porta sem malesuada magna mollis euismod.</p>
+<p class="text-error">Donec ullamcorper nulla non metus auctor fringilla.</p>
+<p class="text-info">Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis.</p>
+<p class="text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>
+
+ + +
+ + + {{! Abbreviations }} +

{{_i}}Abbreviations{{/i}}

+

{{_i}}Stylized implementation of HTML's <abbr> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a title attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.{{/i}}

+ +

<abbr>

+

{{_i}}For expanded text on long hover of an abbreviation, include the title attribute.{{/i}}

+
+

{{_i}}An abbreviation of the word attribute is attr.{{/i}}

+
+
<abbr title="attribute">attr</abbr>
+ +

<abbr class="initialism">

+

{{_i}}Add .initialism to an abbreviation for a slightly smaller font-size.{{/i}}

+
+

{{_i}}HTML is the best thing since sliced bread.{{/i}}

+
+
<abbr title="HyperText Markup Language" class="initialism">HTML</abbr>
+ + +
+ + + {{! Addresses }} +

{{_i}}Addresses{{/i}}

+

{{_i}}Present contact information for the nearest ancestor or the entire body of work.{{/i}}

+ +

<address>

+

{{_i}}Preserve formatting by ending all lines with <br>.{{/i}}

+
+
+ Twitter, Inc.
+ 795 Folsom Ave, Suite 600
+ San Francisco, CA 94107
+ P: (123) 456-7890 +
+
+ {{_i}}Full Name{{/i}}
+ {{_i}}first.last@example.com{{/i}} +
+
+
+<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>
+  <strong>{{_i}}Full Name{{/i}}</strong><br>
+  <a href="mailto:#">{{_i}}first.last@example.com{{/i}}</a>
+</address>
+
+ + +
+ + + {{! Blockquotes }} +

{{_i}}Blockquotes{{/i}}

+

{{_i}}For quoting blocks of content from another source within your document.{{/i}}

+ +

{{_i}}Default blockquote{{/i}}

+

{{_i}}Wrap <blockquote> around any HTML as the quote. For straight quotes we recommend a <p>.{{/i}}

+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+
+
+
+<blockquote>
+  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
+</blockquote>
+
+ +

{{_i}}Blockquote options{{/i}}

+

{{_i}}Style and content changes for simple variations on a standard blockquote.{{/i}}

+ +

{{_i}}Naming a source{{/i}}

+

{{_i}}Add <small> tag for identifying the source. Wrap the name of the source work in <cite>.{{/i}}

+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+ {{_i}}Someone famous in Source Title{{/i}} +
+
+
+<blockquote>
+  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
+  <small>{{_i}}Someone famous <cite title="Source Title">Source Title</cite>{{/i}}</small>
+</blockquote>
+
+ +

{{_i}}Alternate displays{{/i}}

+

{{_i}}Use .pull-right for a floated, right-aligned blockquote.{{/i}}

+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+ {{_i}}Someone famous in Source Title{{/i}} +
+
+
+<blockquote class="pull-right">
+  ...
+</blockquote>
+
+ + +
+ + + +

{{_i}}Lists{{/i}}

+ +

{{_i}}Unordered{{/i}}

+

{{_i}}A list of items in which the order does not explicitly matter.{{/i}}

+
+
    +
  • Lorem ipsum dolor sit amet
  • +
  • Consectetur adipiscing elit
  • +
  • Integer molestie lorem at massa
  • +
  • Facilisis in pretium nisl aliquet
  • +
  • Nulla volutpat aliquam velit +
      +
    • Phasellus iaculis neque
    • +
    • Purus sodales ultricies
    • +
    • Vestibulum laoreet porttitor sem
    • +
    • Ac tristique libero volutpat at
    • +
    +
  • +
  • Faucibus porta lacus fringilla vel
  • +
  • Aenean sit amet erat nunc
  • +
  • Eget porttitor lorem
  • +
+
+
+<ul>
+  <li>...</li>
+</ul>
+
+ +

{{_i}}Ordered{{/i}}

+

{{_i}}A list of items in which the order does explicitly matter.{{/i}}

+
+
    +
  1. Lorem ipsum dolor sit amet
  2. +
  3. Consectetur adipiscing elit
  4. +
  5. Integer molestie lorem at massa
  6. +
  7. Facilisis in pretium nisl aliquet
  8. +
  9. Nulla volutpat aliquam velit
  10. +
  11. Faucibus porta lacus fringilla vel
  12. +
  13. Aenean sit amet erat nunc
  14. +
  15. Eget porttitor lorem
  16. +
+
+
+<ol>
+  <li>...</li>
+</ol>
+
+ +

{{_i}}Unstyled{{/i}}

+

{{_i}}Remove the default list-style and left padding on list items (immediate children only).{{/i}}

+
+
    +
  • Lorem ipsum dolor sit amet
  • +
  • Consectetur adipiscing elit
  • +
  • Integer molestie lorem at massa
  • +
  • Facilisis in pretium nisl aliquet
  • +
  • Nulla volutpat aliquam velit +
      +
    • Phasellus iaculis neque
    • +
    • Purus sodales ultricies
    • +
    • Vestibulum laoreet porttitor sem
    • +
    • Ac tristique libero volutpat at
    • +
    +
  • +
  • Faucibus porta lacus fringilla vel
  • +
  • Aenean sit amet erat nunc
  • +
  • Eget porttitor lorem
  • +
+
+
+<ul class="unstyled">
+  <li>...</li>
+</ul>
+
+ +

{{_i}}Inline{{/i}}

+

{{_i}}Place all list items on a single line with inline-block and some light padding.{{/i}}

+
+
    +
  • Lorem ipsum
  • +
  • Phasellus iaculis
  • +
  • Nulla volutpat
  • +
+
+
+<ul class="inline">
+  <li>...</li>
+</ul>
+
+ +

{{_i}}Description{{/i}}

+

{{_i}}A list of terms with their associated descriptions.{{/i}}

+
+
+
{{_i}}Description lists{{/i}}
+
{{_i}}A description list is perfect for defining terms.{{/i}}
+
Euismod
+
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
+
Donec id elit non mi porta gravida at eget metus.
+
Malesuada porta
+
Etiam porta sem malesuada magna mollis euismod.
+
+
+
+<dl>
+  <dt>...</dt>
+  <dd>...</dd>
+</dl>
+
+ +

{{_i}}Horizontal description{{/i}}

+

{{_i}}Make terms and descriptions in <dl> line up side-by-side.{{/i}}

+
+
+
{{_i}}Description lists{{/i}}
+
{{_i}}A description list is perfect for defining terms.{{/i}}
+
Euismod
+
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
+
Donec id elit non mi porta gravida at eget metus.
+
Malesuada porta
+
Etiam porta sem malesuada magna mollis euismod.
+
Felis euismod semper eget lacinia
+
Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
+
+
+
+<dl class="dl-horizontal">
+  <dt>...</dt>
+  <dd>...</dd>
+</dl>
+
+

+ {{_i}}Heads up!{{/i}} + {{_i}}Horizontal description lists will truncate terms that are too long to fit in the left column fix text-overflow. In narrower viewports, they will change to the default stacked layout.{{/i}} +

+
+ + + + +
+ + +

Inline

+

Wrap inline snippets of code with <code>.

+
+ For example, <section> should be wrapped as inline. +
+
+{{_i}}For example, <code>&lt;section&gt;</code> should be wrapped as inline.{{/i}}
+
+ +

Basic block

+

{{_i}}Use <pre> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.{{/i}}

+
+
<p>{{_i}}Sample text here...{{/i}}</p>
+
+
+<pre>
+  &lt;p&gt;{{_i}}Sample text here...{{/i}}&lt;/p&gt;
+</pre>
+
+

{{_i}}Heads up!{{/i}} {{_i}}Be sure to keep code within <pre> tags as close to the left as possible; it will render all tabs.{{/i}}

+

{{_i}}You may optionally add the .pre-scrollable class which will set a max-height of 350px and provide a y-axis scrollbar.{{/i}}

+
+ + + + +
+ + +

{{_i}}Default styles{{/i}}

+

{{_i}}For basic styling—light padding and only horizontal dividers—add the base class .table to any <table>.{{/i}}

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#{{_i}}First Name{{/i}}{{_i}}Last Name{{/i}}{{_i}}Username{{/i}}
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+
{{! /example }} +
+<table class="table">
+  …
+</table>
+
+ + +
+ + +

{{_i}}Optional classes{{/i}}

+

{{_i}}Add any of the following classes to the .table base class.{{/i}}

+ +

{{_i}}.table-striped{{/i}}

+

{{_i}}Adds zebra-striping to any table row within the <tbody> via the :nth-child CSS selector (not available in IE7-8).{{/i}}

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#{{_i}}First Name{{/i}}{{_i}}Last Name{{/i}}{{_i}}Username{{/i}}
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+
{{! /example }} +
+<table class="table table-striped">
+  …
+</table>
+
+ +

{{_i}}.table-bordered{{/i}}

+

{{_i}}Add borders and rounded corners to the table.{{/i}}

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#{{_i}}First Name{{/i}}{{_i}}Last Name{{/i}}{{_i}}Username{{/i}}
1MarkOtto@mdo
MarkOtto@TwBootstrap
2JacobThornton@fat
3Larry the Bird@twitter
+
{{! /example }} +
+<table class="table table-bordered">
+  …
+</table>
+
+ +

{{_i}}.table-hover{{/i}}

+

{{_i}}Enable a hover state on table rows within a <tbody>.{{/i}}

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#{{_i}}First Name{{/i}}{{_i}}Last Name{{/i}}{{_i}}Username{{/i}}
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter
+
{{! /example }} +
+<table class="table table-hover">
+  …
+</table>
+
+ +

{{_i}}.table-condensed{{/i}}

+

{{_i}}Makes tables more compact by cutting cell padding in half.{{/i}}

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#{{_i}}First Name{{/i}}{{_i}}Last Name{{/i}}{{_i}}Username{{/i}}
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter
+
{{! /example }} +
+<table class="table table-condensed">
+  …
+</table>
+
+ + +
+ + +

{{_i}}Optional row classes{{/i}}

+

{{_i}}Use contextual classes to color table rows.{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Class{{/i}}{{_i}}Description{{/i}}
+ .success + {{_i}}Indicates a successful or positive action.{{/i}}
+ .error + {{_i}}Indicates a dangerous or potentially negative action.{{/i}}
+ .warning + {{_i}}Indicates a warning that might need attention.{{/i}}
+ .info + {{_i}}Used as an alternative to the default styles.{{/i}}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#{{_i}}Product{{/i}}{{_i}}Payment Taken{{/i}}{{_i}}Status{{/i}}
1TB - Monthly01/04/2012Approved
2TB - Monthly02/04/2012Declined
3TB - Monthly03/04/2012Pending
4TB - Monthly04/04/2012Call in to confirm
+
{{! /example }} +
+...
+  <tr class="success">
+    <td>1</td>
+    <td>TB - Monthly</td>
+    <td>01/04/2012</td>
+    <td>Approved</td>
+  </tr>
+...
+
+ + +
+ + +

{{_i}}Supported table markup{{/i}}

+

{{_i}}List of supported table HTML elements and how they should be used.{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Tag{{/i}}{{_i}}Description{{/i}}
+ <table> + + {{_i}}Wrapping element for displaying data in a tabular format{{/i}} +
+ <thead> + + {{_i}}Container element for table header rows (<tr>) to label table columns{{/i}} +
+ <tbody> + + {{_i}}Container element for table rows (<tr>) in the body of the table{{/i}} +
+ <tr> + + {{_i}}Container element for a set of table cells (<td> or <th>) that appears on a single row{{/i}} +
+ <td> + + {{_i}}Default table cell{{/i}} +
+ <th> + + {{_i}}Special table cell for column (or row, depending on scope and placement) labels{{/i}}
+ {{_i}}Must be used within a <thead>{{/i}} +
+ <caption> + + {{_i}}Description or summary of what the table holds, especially useful for screen readers{{/i}} +
+
+<table>
+  <caption>...</caption>
+  <thead>
+    <tr>
+      <th>...</th>
+      <th>...</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td>...</td>
+      <td>...</td>
+    </tr>
+  </tbody>
+</table>
+
+ +
+ + + + +
+ + +

{{_i}}Default styles{{/i}}

+

{{_i}}Individual form controls receive styling, but without any required base class on the <form> or large changes in markup. Results in stacked, left-aligned labels on top of form controls.{{/i}}

+
+
+ Legend + + + {{_i}}Example block-level help text here.{{/i}} + + +
+
{{! /example }} +
+<form>
+  <fieldset>
+    <legend>{{_i}}Legend{{/i}}</legend>
+    <label>{{_i}}Label name{{/i}}</label>
+    <input type="text" placeholder="{{_i}}Type something…{{/i}}">
+    <span class="help-block">Example block-level help text here.</span>
+    <label class="checkbox">
+      <input type="checkbox"> {{_i}}Check me out{{/i}}
+    </label>
+    <button type="submit" class="btn">{{_i}}Submit{{/i}}</button>
+  </fieldset>
+</form>
+
+ + +
+ + +

{{_i}}Optional layouts{{/i}}

+

{{_i}}Included with Bootstrap are three optional form layouts for common use cases.{{/i}}

+ +

{{_i}}Search form{{/i}}

+

{{_i}}Add .form-search to the form and .search-query to the <input> for an extra-rounded text input.{{/i}}

+ {{! /example }} +
+<form class="form-search">
+  <input type="text" class="input-medium search-query">
+  <button type="submit" class="btn">{{_i}}Search{{/i}}</button>
+</form>
+
+ +

{{_i}}Inline form{{/i}}

+

{{_i}}Add .form-inline for left-aligned labels and inline-block controls for a compact layout.{{/i}}

+
+ + + + +
{{! /example }} +
+<form class="form-inline">
+  <input type="text" class="input-small" placeholder="{{_i}}Email{{/i}}">
+  <input type="password" class="input-small" placeholder="{{_i}}Password{{/i}}">
+  <label class="checkbox">
+    <input type="checkbox"> {{_i}}Remember me{{/i}}
+  </label>
+  <button type="submit" class="btn">{{_i}}Sign in{{/i}}</button>
+</form>
+
+ +

{{_i}}Horizontal form{{/i}}

+

{{_i}}Right align labels and float them to the left to make them appear on the same line as controls. Requires the most markup changes from a default form:{{/i}}

+
    +
  • {{_i}}Add .form-horizontal to the form{{/i}}
  • +
  • {{_i}}Wrap labels and controls in .control-group{{/i}}
  • +
  • {{_i}}Add .control-label to the label{{/i}}
  • +
  • {{_i}}Wrap any associated controls in .controls for proper alignment{{/i}}
  • +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + +
+
+
+
+<form class="form-horizontal">
+  <div class="control-group">
+    <label class="control-label" for="inputEmail">{{_i}}Email{{/i}}</label>
+    <div class="controls">
+      <input type="text" id="inputEmail" placeholder="{{_i}}Email{{/i}}">
+    </div>
+  </div>
+  <div class="control-group">
+    <label class="control-label" for="inputPassword">{{_i}}Password{{/i}}</label>
+    <div class="controls">
+      <input type="password" id="inputPassword" placeholder="{{_i}}Password{{/i}}">
+    </div>
+  </div>
+  <div class="control-group">
+    <div class="controls">
+      <label class="checkbox">
+        <input type="checkbox"> {{_i}}Remember me{{/i}}
+      </label>
+      <button type="submit" class="btn">{{_i}}Sign in{{/i}}</button>
+    </div>
+  </div>
+</form>
+
+ + +
+ + +

{{_i}}Supported form controls{{/i}}

+

{{_i}}Examples of standard form controls supported in an example form layout.{{/i}}

+ +

{{_i}}Inputs{{/i}}

+

{{_i}}Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.{{/i}}

+

{{_i}}Requires the use of a specified type at all times.{{/i}}

+
+ +
+
+<input type="text" placeholder="Text input">
+
+ +

{{_i}}Textarea{{/i}}

+

{{_i}}Form control which supports multiple lines of text. Change rows attribute as necessary.{{/i}}

+
+ +
+
+<textarea rows="3"></textarea>
+
+ +

{{_i}}Checkboxes and radios{{/i}}

+

{{_i}}Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.{{/i}}

+

{{_i}}Default (stacked){{/i}}

+
+ +
+ + +
+
+<label class="checkbox">
+  <input type="checkbox" value="">
+  {{_i}}Option one is this and that—be sure to include why it's great{{/i}}
+</label>
+
+<label class="radio">
+  <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
+  {{_i}}Option one is this and that—be sure to include why it's great{{/i}}
+</label>
+<label class="radio">
+  <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
+  {{_i}}Option two can be something else and selecting it will deselect option one{{/i}}
+</label>
+
+ +

{{_i}}Inline checkboxes{{/i}}

+

{{_i}}Add the .inline class to a series of checkboxes or radios for controls appear on the same line.{{/i}}

+
+ + + +
+
+<label class="checkbox inline">
+  <input type="checkbox" id="inlineCheckbox1" value="option1"> 1
+</label>
+<label class="checkbox inline">
+  <input type="checkbox" id="inlineCheckbox2" value="option2"> 2
+</label>
+<label class="checkbox inline">
+  <input type="checkbox" id="inlineCheckbox3" value="option3"> 3
+</label>
+
+ +

{{_i}}Selects{{/i}}

+

{{_i}}Use the default option or specify a multiple="multiple" to show multiple options at once.{{/i}}

+
+ +
+ +
+
+<select>
+  <option>1</option>
+  <option>2</option>
+  <option>3</option>
+  <option>4</option>
+  <option>5</option>
+</select>
+
+<select multiple="multiple">
+  <option>1</option>
+  <option>2</option>
+  <option>3</option>
+  <option>4</option>
+  <option>5</option>
+</select>
+
+ + +
+ + +

{{_i}}Extending form controls{{/i}}

+

{{_i}}Adding on top of existing browser controls, Bootstrap includes other useful form components.{{/i}}

+ +

{{_i}}Prepended and appended inputs{{/i}}

+

{{_i}}Add text or buttons before or after any text-based input. Do note that select elements are not supported here.{{/i}}

+ +

{{_i}}Default options{{/i}}

+

{{_i}}Wrap an .add-on and an input with one of two classes to prepend or append text to an input.{{/i}}

+
+
+ @ + +
+
+
+ + .00 +
+
+
+<div class="input-prepend">
+  <span class="add-on">@</span>
+  <input class="span2" id="prependedInput" type="text" placeholder="{{_i}}Username{{/i}}">
+</div>
+<div class="input-append">
+  <input class="span2" id="appendedInput" type="text">
+  <span class="add-on">.00</span>
+</div>
+
+ +

{{_i}}Combined{{/i}}

+

{{_i}}Use both classes and two instances of .add-on to prepend and append an input.{{/i}}

+
+
+ $ + + .00 +
+
+
+<div class="input-prepend input-append">
+  <span class="add-on">$</span>
+  <input class="span2" id="appendedPrependedInput" type="text">
+  <span class="add-on">.00</span>
+</div>
+
+ +

{{_i}}Buttons instead of text{{/i}}

+

{{_i}}Instead of a <span> with text, use a .btn to attach a button (or two) to an input.{{/i}}

+
+
+ + +
+
+
+<div class="input-append">
+  <input class="span2" id="appendedInputButton" type="text">
+  <button class="btn" type="button">Go!</button>
+</div>
+
+
+
+ + + +
+
+
+<div class="input-append">
+  <input class="span2" id="appendedInputButtons" type="text">
+  <button class="btn" type="button">Search</button>
+  <button class="btn" type="button">Options</button>
+</div>
+
+ +

{{_i}}Button dropdowns{{/i}}

+

{{_i}}{{/i}}

+
+ +
+
+<div class="input-append">
+  <input class="span2" id="appendedDropdownButton" type="text">
+  <div class="btn-group">
+    <button class="btn dropdown-toggle" data-toggle="dropdown">
+      {{_i}}Action{{/i}}
+      <span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu">
+      ...
+    </ul>
+  </div>
+</div>
+
+ +
+ +
+
+<div class="input-prepend">
+  <div class="btn-group">
+    <button class="btn dropdown-toggle" data-toggle="dropdown">
+      {{_i}}Action{{/i}}
+      <span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu">
+      ...
+    </ul>
+  </div>
+  <input class="span2" id="prependedDropdownButton" type="text">
+</div>
+
+ +
+ +
+
+<div class="input-prepend input-append">
+  <div class="btn-group">
+    <button class="btn dropdown-toggle" data-toggle="dropdown">
+      {{_i}}Action{{/i}}
+      <span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu">
+      ...
+    </ul>
+  </div>
+  <input class="span2" id="appendedPrependedDropdownButton" type="text">
+  <div class="btn-group">
+    <button class="btn dropdown-toggle" data-toggle="dropdown">
+      {{_i}}Action{{/i}}
+      <span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu">
+      ...
+    </ul>
+  </div>
+</div>
+
+ +

{{_i}}Segmented dropdown groups{{/i}}

+
+ + +
+
+<form>
+  <div class="input-prepend">
+    <div class="btn-group">...</div>
+    <input type="text">
+  </div>
+  <div class="input-append">
+    <input type="text">
+    <div class="btn-group">...</div>
+  </div>
+</form>
+
+ +

{{_i}}Search form{{/i}}

+ {{! /example }} +
+<form class="form-search">
+  <div class="input-append">
+    <input type="text" class="span2 search-query">
+    <button type="submit" class="btn">{{_i}}Search{{/i}}</button>
+  </div>
+  <div class="input-prepend">
+    <button type="submit" class="btn">{{_i}}Search{{/i}}</button>
+    <input type="text" class="span2 search-query">
+  </div>
+</form>
+
+ +

{{_i}}Control sizing{{/i}}

+

{{_i}}Use relative sizing classes like .input-large or match your inputs to the grid column sizes using .span* classes.{{/i}}

+ +

{{_i}}Block level inputs{{/i}}

+

{{_i}}Make any <input> or <textarea> element behave like a block level element.{{/i}}

+
+
+ +
+
+
+<input class="input-block-level" type="text" placeholder=".input-block-level">
+
+ +

{{_i}}Relative sizing{{/i}}

+
+
+ + + + + + +
+
+
+<input class="input-mini" type="text" placeholder=".input-mini">
+<input class="input-small" type="text" placeholder=".input-small">
+<input class="input-medium" type="text" placeholder=".input-medium">
+<input class="input-large" type="text" placeholder=".input-large">
+<input class="input-xlarge" type="text" placeholder=".input-xlarge">
+<input class="input-xxlarge" type="text" placeholder=".input-xxlarge">
+
+

+ {{_i}}Heads up!{{/i}} In future versions, we'll be altering the use of these relative input classes to match our button sizes. For example, .input-large will increase the padding and font-size of an input. +

+ +

{{_i}}Grid sizing{{/i}}

+

{{_i}}Use .span1 to .span12 for inputs that match the same sizes of the grid columns.{{/i}}

+
+
+ + + + + + +
+
+
+<input class="span1" type="text" placeholder=".span1">
+<input class="span2" type="text" placeholder=".span2">
+<input class="span3" type="text" placeholder=".span3">
+<select class="span1">
+  ...
+</select>
+<select class="span2">
+  ...
+</select>
+<select class="span3">
+  ...
+</select>
+
+ +

{{_i}}For multiple grid inputs per line, use the .controls-row modifier class for proper spacing. It floats the inputs to collapse white-space, sets the proper margins, and clears the float.{{/i}}

+
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+<div class="controls">
+  <input class="span5" type="text" placeholder=".span5">
+</div>
+<div class="controls controls-row">
+  <input class="span4" type="text" placeholder=".span4">
+  <input class="span1" type="text" placeholder=".span1">
+</div>
+...
+
+ +

{{_i}}Uneditable inputs{{/i}}

+

{{_i}}Present data in a form that's not editable without using actual form markup.{{/i}}

+
+ Some value here +
+
+<span class="input-xlarge uneditable-input">Some value here</span>
+
+ +

{{_i}}Form actions{{/i}}

+

{{_i}}End a form with a group of actions (buttons). When placed within a .form-horizontal, the buttons will automatically indent to line up with the form controls.{{/i}}

+
+
+ + +
+
+
+<div class="form-actions">
+  <button type="submit" class="btn btn-primary">{{_i}}Save changes{{/i}}</button>
+  <button type="button" class="btn">{{_i}}Cancel{{/i}}</button>
+</div>
+
+ +

{{_i}}Help text{{/i}}

+

{{_i}}Inline and block level support for help text that appears around form controls.{{/i}}

+

{{_i}}Inline help{{/i}}

+
+ Inline help text +
+
+<input type="text"><span class="help-inline">Inline help text</span>
+
+ +

{{_i}}Block help{{/i}}

+
+ + A longer block of help text that breaks onto a new line and may extend beyond one line. +
+
+<input type="text"><span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span>
+
+ + +
+ + +

{{_i}}Form control states{{/i}}

+

{{_i}}Provide feedback to users or visitors with basic feedback states on form controls and labels.{{/i}}

+ +

{{_i}}Input focus{{/i}}

+

{{_i}}We remove the default outline styles on some form controls and apply a box-shadow in its place for :focus.{{/i}}

+
+ +
+
+<input class="input-xlarge" id="focusedInput" type="text" value="{{_i}}This is focused...{{/i}}">
+
+ +

{{_i}}Invalid inputs{{/i}}

+

{{_i}}Style inputs via default browser functionality with :invalid. Specify a type, add the required attribute if the field is not optional, and (if applicable) specify a pattern.{{/i}}

+
+ +
+
+<input class="span3" type="email" required>
+
+ +

{{_i}}Disabled inputs{{/i}}

+

{{_i}}Add the disabled attribute on an input to prevent user input and trigger a slightly different look.{{/i}}

+
+ +
+
+<input class="input-xlarge" id="disabledInput" type="text" placeholder="{{_i}}Disabled input here...{{/i}}" disabled>
+
+ +

{{_i}}Validation states{{/i}}

+

{{_i}}Bootstrap includes validation styles for error, warning, info, and success messages. To use, add the appropriate class to the surrounding .control-group.{{/i}}

+ +
+
+ +
+ + {{_i}}Something may have gone wrong{{/i}} +
+
+
+ +
+ + {{_i}}Please correct the error{{/i}} +
+
+
+ +
+ + {{_i}}Username is taken{{/i}} +
+
+
+ +
+ + {{_i}}Woohoo!{{/i}} +
+
+
+
+<div class="control-group warning">
+  <label class="control-label" for="inputWarning">{{_i}}Input with warning{{/i}}</label>
+  <div class="controls">
+    <input type="text" id="inputWarning">
+    <span class="help-inline">{{_i}}Something may have gone wrong{{/i}}</span>
+  </div>
+</div>
+
+<div class="control-group error">
+  <label class="control-label" for="inputError">{{_i}}Input with error{{/i}}</label>
+  <div class="controls">
+    <input type="text" id="inputError">
+    <span class="help-inline">{{_i}}Please correct the error{{/i}}</span>
+  </div>
+</div>
+
+<div class="control-group info">
+  <label class="control-label" for="inputInfo">{{_i}}Input with info{{/i}}</label>
+  <div class="controls">
+    <input type="text" id="inputInfo">
+    <span class="help-inline">{{_i}}Username is already taken{{/i}}</span>
+  </div>
+</div>
+
+<div class="control-group success">
+  <label class="control-label" for="inputSuccess">{{_i}}Input with success{{/i}}</label>
+  <div class="controls">
+    <input type="text" id="inputSuccess">
+    <span class="help-inline">{{_i}}Woohoo!{{/i}}</span>
+  </div>
+</div>
+
+ +
+ + + + +
+ + +

Default buttons

+

{{_i}}Button styles can be applied to anything with the .btn class applied. However, typically you'll want to apply these to only <a> and <button> elements for the best rendering.{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Button{{/i}}{{_i}}class=""{{/i}}{{_i}}Description{{/i}}
btn{{_i}}Standard gray button with gradient{{/i}}
btn btn-primary{{_i}}Provides extra visual weight and identifies the primary action in a set of buttons{{/i}}
btn btn-info{{_i}}Used as an alternative to the default styles{{/i}}
btn btn-success{{_i}}Indicates a successful or positive action{{/i}}
btn btn-warning{{_i}}Indicates caution should be taken with this action{{/i}}
btn btn-danger{{_i}}Indicates a dangerous or potentially negative action{{/i}}
btn btn-inverse{{_i}}Alternate dark gray button, not tied to a semantic action or use{{/i}}
btn btn-link{{_i}}Deemphasize a button by making it look like a link while maintaining button behavior{{/i}}
+ +

{{_i}}Cross browser compatibility{{/i}}

+

{{_i}}IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button elements, rendering text gray with a nasty text-shadow that we cannot fix.{{/i}}

+ + +

{{_i}}Button sizes{{/i}}

+

{{_i}}Fancy larger or smaller buttons? Add .btn-large, .btn-small, or .btn-mini for additional sizes.{{/i}}

+
+

+ + +

+

+ + +

+

+ + +

+

+ + +

+
+
+<p>
+  <button class="btn btn-large btn-primary" type="button">{{_i}}Large button{{/i}}</button>
+  <button class="btn btn-large" type="button">{{_i}}Large button{{/i}}</button>
+</p>
+<p>
+  <button class="btn btn-primary" type="button">{{_i}}Default button{{/i}}</button>
+  <button class="btn" type="button">{{_i}}Default button{{/i}}</button>
+</p>
+<p>
+  <button class="btn btn-small btn-primary" type="button">{{_i}}Small button{{/i}}</button>
+  <button class="btn btn-small" type="button">{{_i}}Small button{{/i}}</button>
+</p>
+<p>
+  <button class="btn btn-mini btn-primary" type="button">{{_i}}Mini button{{/i}}</button>
+  <button class="btn btn-mini" type="button">{{_i}}Mini button{{/i}}</button>
+</p>
+
+

{{_i}}Create block level buttons—those that span the full width of a parent— by adding .btn-block.{{/i}}

+
+
+ + +
+
+
+<button class="btn btn-large btn-block btn-primary" type="button">{{_i}}Block level button{{/i}}</button>
+<button class="btn btn-large btn-block" type="button">{{_i}}Block level button{{/i}}</button>
+
+ + +

{{_i}}Disabled state{{/i}}

+

{{_i}}Make buttons look unclickable by fading them back 50%.{{/i}}

+ +

Anchor element

+

{{_i}}Add the .disabled class to <a> buttons.{{/i}}

+

+ {{_i}}Primary link{{/i}} + {{_i}}Link{{/i}} +

+
+<a href="#" class="btn btn-large btn-primary disabled">{{_i}}Primary link{{/i}}</a>
+<a href="#" class="btn btn-large disabled">{{_i}}Link{{/i}}</a>
+
+

+ {{_i}}Heads up!{{/i}} + {{_i}}We use .disabled as a utility class here, similar to the common .active class, so no prefix is required. Also, this class is only for aesthetic; you must use custom JavaScript to disable links here.{{/i}} +

+ +

Button element

+

{{_i}}Add the disabled attribute to <button> buttons.{{/i}}

+

+ + +

+
+<button type="button" class="btn btn-large btn-primary disabled" disabled="disabled">{{_i}}Primary button{{/i}}</button>
+<button type="button" class="btn btn-large" disabled>{{_i}}Button{{/i}}</button>
+
+ + +

{{_i}}One class, multiple tags{{/i}}

+

{{_i}}Use the .btn class on an <a>, <button>, or <input> element.{{/i}}

+
+ {{_i}}Link{{/i}} + + + +
+
+<a class="btn" href="">{{_i}}Link{{/i}}</a>
+<button class="btn" type="submit">{{_i}}Button{{/i}}</button>
+<input class="btn" type="button" value="{{_i}}Input{{/i}}">
+<input class="btn" type="submit" value="{{_i}}Submit{{/i}}">
+
+

{{_i}}As a best practice, try to match the element for your context to ensure matching cross-browser rendering. If you have an input, use an <input type="submit"> for your button.{{/i}}

+ +
+ + + + +
+ + +

{{_i}}Add classes to an <img> element to easily style images in any project.{{/i}}

+
+ + + +
+
+<img src="..." class="img-rounded">
+<img src="..." class="img-circle">
+<img src="..." class="img-polaroid">
+
+

{{_i}}Heads up!{{/i}} {{_i}}.img-rounded and .img-circle do not work in IE7-8 due to lack of border-radius support.{{/i}}

+ + +
+ + + + +
+ + +

{{_i}}Icon glyphs{{/i}}

+

{{_i}}140 icons in sprite form, available in dark gray (default) and white, provided by Glyphicons.{{/i}}

+
    +
  • icon-glass
  • +
  • icon-music
  • +
  • icon-search
  • +
  • icon-envelope
  • +
  • icon-heart
  • +
  • icon-star
  • +
  • icon-star-empty
  • +
  • icon-user
  • +
  • icon-film
  • +
  • icon-th-large
  • +
  • icon-th
  • +
  • icon-th-list
  • +
  • icon-ok
  • +
  • icon-remove
  • +
  • icon-zoom-in
  • +
  • icon-zoom-out
  • +
  • icon-off
  • +
  • icon-signal
  • +
  • icon-cog
  • +
  • icon-trash
  • +
  • icon-home
  • +
  • icon-file
  • +
  • icon-time
  • +
  • icon-road
  • +
  • icon-download-alt
  • +
  • icon-download
  • +
  • icon-upload
  • +
  • icon-inbox
  • + +
  • icon-play-circle
  • +
  • icon-repeat
  • +
  • icon-refresh
  • +
  • icon-list-alt
  • +
  • icon-lock
  • +
  • icon-flag
  • +
  • icon-headphones
  • +
  • icon-volume-off
  • +
  • icon-volume-down
  • +
  • icon-volume-up
  • +
  • icon-qrcode
  • +
  • icon-barcode
  • +
  • icon-tag
  • +
  • icon-tags
  • +
  • icon-book
  • +
  • icon-bookmark
  • +
  • icon-print
  • +
  • icon-camera
  • +
  • icon-font
  • +
  • icon-bold
  • +
  • icon-italic
  • +
  • icon-text-height
  • +
  • icon-text-width
  • +
  • icon-align-left
  • +
  • icon-align-center
  • +
  • icon-align-right
  • +
  • icon-align-justify
  • +
  • icon-list
  • + +
  • icon-indent-left
  • +
  • icon-indent-right
  • +
  • icon-facetime-video
  • +
  • icon-picture
  • +
  • icon-pencil
  • +
  • icon-map-marker
  • +
  • icon-adjust
  • +
  • icon-tint
  • +
  • icon-edit
  • +
  • icon-share
  • +
  • icon-check
  • +
  • icon-move
  • +
  • icon-step-backward
  • +
  • icon-fast-backward
  • +
  • icon-backward
  • +
  • icon-play
  • +
  • icon-pause
  • +
  • icon-stop
  • +
  • icon-forward
  • +
  • icon-fast-forward
  • +
  • icon-step-forward
  • +
  • icon-eject
  • +
  • icon-chevron-left
  • +
  • icon-chevron-right
  • +
  • icon-plus-sign
  • +
  • icon-minus-sign
  • +
  • icon-remove-sign
  • +
  • icon-ok-sign
  • + +
  • icon-question-sign
  • +
  • icon-info-sign
  • +
  • icon-screenshot
  • +
  • icon-remove-circle
  • +
  • icon-ok-circle
  • +
  • icon-ban-circle
  • +
  • icon-arrow-left
  • +
  • icon-arrow-right
  • +
  • icon-arrow-up
  • +
  • icon-arrow-down
  • +
  • icon-share-alt
  • +
  • icon-resize-full
  • +
  • icon-resize-small
  • +
  • icon-plus
  • +
  • icon-minus
  • +
  • icon-asterisk
  • +
  • icon-exclamation-sign
  • +
  • icon-gift
  • +
  • icon-leaf
  • +
  • icon-fire
  • +
  • icon-eye-open
  • +
  • icon-eye-close
  • +
  • icon-warning-sign
  • +
  • icon-plane
  • +
  • icon-calendar
  • +
  • icon-random
  • +
  • icon-comment
  • +
  • icon-magnet
  • + +
  • icon-chevron-up
  • +
  • icon-chevron-down
  • +
  • icon-retweet
  • +
  • icon-shopping-cart
  • +
  • icon-folder-close
  • +
  • icon-folder-open
  • +
  • icon-resize-vertical
  • +
  • icon-resize-horizontal
  • +
  • icon-hdd
  • +
  • icon-bullhorn
  • +
  • icon-bell
  • +
  • icon-certificate
  • +
  • icon-thumbs-up
  • +
  • icon-thumbs-down
  • +
  • icon-hand-right
  • +
  • icon-hand-left
  • +
  • icon-hand-up
  • +
  • icon-hand-down
  • +
  • icon-circle-arrow-right
  • +
  • icon-circle-arrow-left
  • +
  • icon-circle-arrow-up
  • +
  • icon-circle-arrow-down
  • +
  • icon-globe
  • +
  • icon-wrench
  • +
  • icon-tasks
  • +
  • icon-filter
  • +
  • icon-briefcase
  • +
  • icon-fullscreen
  • +
+ +

Glyphicons attribution

+

{{_i}}Glyphicons Halflings are normally not available for free, but an arrangement between Bootstrap and the Glyphicons creators have made this possible at no cost to you as developers. As a thank you, we ask you to include an optional link back to Glyphicons whenever practical.{{/i}}

+ + +
+ + +

{{_i}}How to use{{/i}}

+

{{_i}}All icons require an <i> tag with a unique class, prefixed with icon-. To use, place the following code just about anywhere:{{/i}}

+
+<i class="icon-search"></i>
+
+

{{_i}}There are also styles available for inverted (white) icons, made ready with one extra class. We will specifically enforce this class on hover and active states for nav and dropdown links.{{/i}}

+
+<i class="icon-search icon-white"></i>
+
+

+ {{_i}}Heads up!{{/i}} + {{_i}}When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <i> tag for proper spacing.{{/i}} +

+ + +
+ + +

{{_i}}Icon examples{{/i}}

+

{{_i}}Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.{{/i}}

+ +

{{_i}}Buttons{{/i}}

+ +
{{_i}}Button group in a button toolbar{{/i}}
+
+
+
+ + + + +
+
+
{{! /bs-docs-example }} +
+<div class="btn-toolbar">
+  <div class="btn-group">
+    <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>
+  </div>
+</div>
+
+ +
{{_i}}Dropdown in a button group{{/i}}
+ {{! /bs-docs-example }} +
+<div class="btn-group">
+  <a class="btn btn-primary" href="#"><i class="icon-user icon-white"></i> {{_i}}User{{/i}}</a>
+  <a class="btn 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>
+    <li><a href="#"><i class="i"></i> {{_i}}Make admin{{/i}}</a></li>
+  </ul>
+</div>
+
+ +
{{_i}}Button sizes{{/i}}
+ {{! /bs-docs-example }} +
+<a class="btn btn-large" href="#"><i class="icon-star"></i> Star</a>
+<a class="btn btn-small" href="#"><i class="icon-star"></i> Star</a>
+<a class="btn btn-mini" href="#"><i class="icon-star"></i> Star</a>
+
+ +

{{_i}}Navigation{{/i}}

+ {{! /bs-docs-example }} +
+<ul class="nav nav-list">
+  <li class="active"><a href="#"><i class="icon-home icon-white"></i> {{_i}}Home{{/i}}</a></li>
+  <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>
+  <li><a href="#"><i class="i"></i> {{_i}}Misc{{/i}}</a></li>
+</ul>
+
+ +

{{_i}}Form fields{{/i}}

+
+
+ +
+
+ +
+
+
+
+
+<div class="control-group">
+  <label class="control-label" for="inputIcon">{{_i}}Email address{{/i}}</label>
+  <div class="controls">
+    <div class="input-prepend">
+      <span class="add-on"><i class="icon-envelope"></i></span>
+      <input class="span2" id="inputIcon" type="text">
+    </div>
+  </div>
+</div>
+
+ +
+ + + +
{{! /span9 }} +
{{! row}} + +
{{! /.container }} diff --git a/docs/templates/pages/components.mustache b/docs/templates/pages/components.mustache index 0172ada8a2..f78132a443 100644 --- a/docs/templates/pages/components.mustache +++ b/docs/templates/pages/components.mustache @@ -105,9 +105,9 @@
{{! /example }}
 <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
-  <li><a tabindex="-1" href="#">Regular link</a></li>
-  <li><a tabindex="-1" href="#">Disabled link</a></li>
-  <li><a tabindex="-1" href="#">Another link</a></li>
+  <li><a tabindex="-1" href="#">{{_i}}Regular link{{/i}}</a></li>
+  <li class="disabled"><a tabindex="-1" href="#">{{_i}}Disabled link{{/i}}</a></li>
+  <li><a tabindex="-1" href="#">{{_i}}Another link{{/i}}</a></li>
 </ul>
 
diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache index f87b1705ff..8a602a67dd 100644 --- a/docs/templates/pages/javascript.mustache +++ b/docs/templates/pages/javascript.mustache @@ -953,6 +953,14 @@ $('a[data-toggle="tab"]').on('shown', function (e) {

Object structure is: delay: { show: 500, hide: 100 }

+ + {{_i}}container{{/i}} + {{_i}}string | false{{/i}} + {{_i}}false{{/i}} + +

{{_i}}Appends the popover to a specific element container: 'body'{{/i}}

+ +
diff --git a/less/tests/css-tests.html b/less/tests/css-tests.html index 9a5fd589d8..22c83141a2 100644 --- a/less/tests/css-tests.html +++ b/less/tests/css-tests.html @@ -994,8 +994,59 @@ + +

Alert default

+
+ + Alert! Best check yourself, you're not looking too good. +
+
+ +

Alert! Best check yourself, you're not looking too good.

+
+

Success

+
+ + Success! Best check yourself, you're not looking too good. +
+
+ +

Success! Best check yourself, you're not looking too good.

+
+ +

Info

+
+ + Info! Best check yourself, you're not looking too good. +
+
+ +

Info! Best check yourself, you're not looking too good.

+
+ +

Warning

+
+ + Warning! Best check yourself, you're not looking too good. +
+
+ +

Warning! Best check yourself, you're not looking too good.

+
+ +

Error

+
+ + Error! Best check yourself, you're not looking too good. +
+
+ +

Error! Best check yourself, you're not looking too good.

+
diff --git a/less/type.less b/less/type.less index d5d1d8866f..563cee42e7 100644 --- a/less/type.less +++ b/less/type.less @@ -44,6 +44,10 @@ a.text-success:hover { color: darken(@state-success-text, 10%); } .text-right { text-align: right; } .text-center { text-align: center; } +.text-left { text-align: left; } +.text-right { text-align: right; } +.text-center { text-align: center; } + // Headings // -------------------------