diff options
author | Marcus Schwab <marcus1060@gmail.com> | 2012-06-11 13:04:14 +0400 |
---|---|---|
committer | Marcus Schwab <marcus1060@gmail.com> | 2012-06-11 13:04:14 +0400 |
commit | 97cbefa72f4b60dc72077f61a03b44a0d4f9b960 (patch) | |
tree | 3782ddf07bef753c3b43b02595ffaf08aa955a9b | |
parent | bd19b42c15108b3c60407924a1725473660120d9 (diff) | |
parent | a0cd886c56708bbd8d6896ee81b04579f86fb0aa (diff) |
Merge remote-tracking branch 'upstream/2.1.0-wip' into 2.1.0-wip
-rw-r--r-- | docs/assets/css/bootstrap.css | 4 | ||||
-rw-r--r-- | docs/assets/css/docs.css | 119 | ||||
-rw-r--r-- | docs/base-css.html | 1373 | ||||
-rw-r--r-- | docs/components.html | 1912 | ||||
-rw-r--r-- | docs/download.html | 142 | ||||
-rw-r--r-- | docs/examples.html | 124 | ||||
-rw-r--r-- | docs/index.html | 136 | ||||
-rw-r--r-- | docs/javascript.html | 242 | ||||
-rw-r--r-- | docs/less.html | 136 | ||||
-rw-r--r-- | docs/scaffolding.html | 166 | ||||
-rw-r--r-- | docs/templates/layout.mustache | 124 | ||||
-rw-r--r-- | docs/templates/pages/base-css.mustache | 1253 | ||||
-rw-r--r-- | docs/templates/pages/components.mustache | 1794 | ||||
-rw-r--r-- | docs/templates/pages/download.mustache | 20 | ||||
-rw-r--r-- | docs/templates/pages/index.mustache | 14 | ||||
-rw-r--r-- | docs/templates/pages/javascript.mustache | 119 | ||||
-rw-r--r-- | docs/templates/pages/less.mustache | 14 | ||||
-rw-r--r-- | docs/templates/pages/scaffolding.mustache | 42 | ||||
-rw-r--r-- | docs/upgrading.html | 124 | ||||
-rw-r--r-- | less/alerts.less | 5 |
20 files changed, 3990 insertions, 3873 deletions
diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index fe957d19f1..9803e2a6a2 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -3169,10 +3169,6 @@ input[type="submit"].btn.btn-mini { border-radius: 4px; } -.alert-heading { - color: inherit; -} - .alert .close { position: relative; top: -2px; diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index 1e02c299ea..d6791ff072 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -12,18 +12,18 @@ body { position: relative; - padding-top: 40px; + padding-top: 100px; font-size: 14px; background-color: #fff; background-image: url(../img/grid-20px.png); background-repeat: repeat-x; - background-position: 0 0; + background-position: 0 40px; } /* Custom container for the narrow docs */ .bs-docs-container { max-width: 780px; - margin: 0 0 0 240px; + margin: 0 auto; } /* Increase docs base type size and line-heights */ @@ -37,12 +37,44 @@ li { line-height: 25px; } +/* Code in headings */ +h3 code { + font-size: 14px; + font-weight: normal; +} + + + +/* Tweak navbar brand link to be super sleek +-------------------------------------------------- */ + +.navbar, +.subnav { + font-size: 13px; +} +body > .navbar-fixed-top .brand { + padding-right: 0; + padding-left: 0; + margin-left: 20px; + float: right; + font-weight: bold; + color: #000; + text-shadow: 0 1px 0 rgba(255,255,255,.1), 0 0 30px rgba(255,255,255,.125); + -webkit-transition: all .2s linear; + -moz-transition: all .2s linear; + transition: all .2s linear; +} +body > .navbar-fixed-top .brand:hover { + text-decoration: none; +} + /* Left nav -------------------------------------------------- */ .bs-docs-nav { + display: none; position: fixed; top: 0; left: 0; @@ -149,6 +181,7 @@ hr.soften { ------------------------- */ .jumbotron { position: relative; + text-align: center; } .jumbotron h1 { margin-bottom: 10px; @@ -177,7 +210,8 @@ hr.soften { /* Masthead (docs home) ------------------------- */ .masthead { - margin-bottom: 60px; + margin-top: 20px; + margin-bottom: 80px; } .masthead h1, .masthead p { @@ -224,12 +258,16 @@ hr.soften { ------------------------- */ /* supporting docs pages */ .subhead { + text-align: left; } .subhead h1 { font-size: 60px; } .subhead .lead { + margin-bottom: 30px; line-height: 25px; + font-size: 30px; + line-height: 40px; } /* Subnav */ @@ -314,7 +352,7 @@ hr.soften { filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); /* IE6-9 */ } .subnav-fixed .nav { - width: 938px; + max-width: 780px; margin: 0 auto; padding: 0 1px; } @@ -338,6 +376,7 @@ hr.soften { margin: 36px 0 27px; font-size: 40px; font-weight: 300; + text-align: center; } .marketing h2, .marketing h3 { @@ -364,6 +403,7 @@ hr.soften { font-weight: 300; line-height: 24px; color: #999; + text-align: center; } @@ -421,8 +461,12 @@ hr.soften { -moz-box-shadow: 0 1px 2px rgba(0,0,0,.075); box-shadow: 0 1px 2px rgba(0,0,0,.075); } +.mini-layout, +.mini-layout .mini-layout-body, +.mini-layout.fluid .mini-layout-sidebar { + height: 300px; +} .mini-layout { - height: 240px; margin-bottom: 20px; padding: 9px; } @@ -435,7 +479,6 @@ hr.soften { background-color: #dceaf4; margin: 0 auto; width: 70%; - height: 240px; } .mini-layout.fluid .mini-layout-sidebar, .mini-layout.fluid .mini-layout-header, @@ -445,7 +488,6 @@ hr.soften { .mini-layout.fluid .mini-layout-sidebar { background-color: #bbd8e9; width: 20%; - height: 240px; } .mini-layout.fluid .mini-layout-body { width: 77.5%; @@ -598,6 +640,9 @@ h2 + .row { } /* Example sites showcase */ +.example-sites { + margin-left: 20px; +} .example-sites img { max-width: 100%; margin: 0 auto; @@ -694,9 +739,45 @@ form.well { .bs-docs-example p:last-child { margin-bottom: 0; } -.bs-docs-example .table { +.bs-docs-example .table, +.bs-docs-example .progress, +.bs-docs-example .well, +.bs-docs-example .alert, +.bs-docs-example .hero-unit, +.bs-docs-example .pagination, +.bs-docs-example .navbar, +.bs-docs-example .nav { margin-bottom: 5px; } +.bs-docs-example .pagination { + margin-top: 0; +} +.bs-navbar-top-example, +.bs-navbar-bottom-example { + z-index: 1; + padding: 0; + height: 90px; +} +.bs-navbar-top-example { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} +.bs-navbar-top-example:after { + top: auto; + bottom: -1px; + -webkit-border-radius: 0 4px 0 4px; + -moz-border-radius: 0 4px 0 4px; + border-radius: 0 4px 0 4px; +} +.bs-navbar-bottom-example { + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.bs-navbar-bottom-example .navbar { + margin-bottom: 0; +} form.bs-docs-example { padding-bottom: 19px; } @@ -772,13 +853,6 @@ form.bs-docs-example { border: 1px solid #d6e9c6; } -/* Grid examples -------------------------- */ -.bs-docs-grid { - width: 940px; - margin-left: -80px; -} - /* Responsive Docs @@ -886,7 +960,7 @@ form.bs-docs-example { /* Jumbotron buttons */ .jumbotron .btn { margin-bottom: 10px; - } +av } /* Subnav */ .subnav { @@ -988,14 +1062,13 @@ form.bs-docs-example { /* LARGE DESKTOP SCREENS */ @media (min-width: 1210px) { - /* Update subnav container */ - .subnav-fixed .nav { - width: 1168px; /* 2px less to account for left/right borders being removed when in fixed mode */ + .bs-docs-container { + max-width: 970px; } - .bs-docs-grid { - width: 1170px; - margin-left: -195px; + /* Update subnav container */ + .subnav-fixed .nav { + max-width: 970px; /* 2px less to account for left/right borders being removed when in fixed mode */ } } diff --git a/docs/base-css.html b/docs/base-css.html index 7ed6c68ac2..ee12d62e2f 100644 --- a/docs/base-css.html +++ b/docs/base-css.html @@ -27,84 +27,50 @@ </head> - <body> - - <div class="bs-docs-nav"> - <h3 class="bs-docs-logo"><a href="./index.html">Bootstrap</a></h3> - <ul class="bs-nav"> - <li class=""> - <a href="./scaffolding.html">Scaffolding</a> - <ul> - <li><a href="./scaffolding.html#global">Global styles</a></li> - <li><a href="./scaffolding.html#gridSystem">Grid system</a></li> - <li><a href="./scaffolding.html#fluidGridSystem">Fluid grid system</a></li> - <li><a href="./scaffolding.html#gridCustomization">Customizing</a></li> - <li><a href="./scaffolding.html#layouts">Layouts</a></li> - <li><a href="./scaffolding.html#responsive">Responsive design</a></li> - </ul> - </li> - <li class="active"> - <a href="./base-css.html">Base CSS</a> - <ul> - <li><a href="./base-css.html#typography">Typography</a></li> - <li><a href="./base-css.html#code">Code</a></li> - <li><a href="./base-css.html#tables">Tables</a></li> - <li><a href="./base-css.html#forms">Forms</a></li> - <li><a href="./base-css.html#buttons">Buttons</a></li> - <li><a href="./base-css.html#icons">Icons by Glyphicons</a></li> - </ul> - </li> - <li class=""> - <a href="./components.html">Components</a> - <ul> - <li><a href="./components.html#buttonGroups">Button groups</a></li> - <li><a href="./components.html#buttonDropdowns">Button dropdowns</a></li> - <li><a href="./components.html#navs">Nav, tabs, pills</a></li> - <li><a href="./components.html#navbar">Navbar</a></li> - <li><a href="./components.html#breadcrumbs">Breadcrumbs</a></li> - <li><a href="./components.html#pagination">Pagination</a></li> - <li><a href="./components.html#labels">Labels</a></li> - <li><a href="./components.html#badges">Badges</a></li> - <li><a href="./components.html#typography">Typography</a></li> - <li><a href="./components.html#thumbnails">Thumbnails</a></li> - <li><a href="./components.html#alerts">Alerts</a></li> - <li><a href="./components.html#progress">Progress bars</a></li> - <li><a href="./components.html#misc">Miscellaneous</a></li> - </ul> - </li> - <li class=""> - <a href="./javascript.html">Javascript</a> - <ul> - <li><a href="./javascript.html#javascript">All plugins</a></li> - <li><a href="./javascript.html#modals">Modal</a></li> - <li><a href="./javascript.html#dropdowns">Dropdown</a></li> - <li><a href="./javascript.html#scrollspy">Scrollspy</a></li> - <li><a href="./javascript.html#tabs">Tab</a></li> - <li><a href="./javascript.html#tooltips">Tooltip</a></li> - <li><a href="./javascript.html#popovers">Popover</a></li> - <li><a href="./javascript.html#alerts">Alert</a></li> - <li><a href="./javascript.html#buttons">Button</a></li> - <li><a href="./javascript.html#collapse">Collapse</a></li> - <li><a href="./javascript.html#carousel">Carousel</a></li> - <li><a href="./javascript.html#typeahead">Typeahead</a></li> - </ul> - </li> - <li class=""> - <a href="./less.html">LESS</a> - <ul> - <li><a href="./less.html#builtWith">Built with Less</a></li> - <li><a href="./less.html#variables">Variables</a></li> - <li><a href="./less.html#mixins">Mixins</a></li> - <li><a href="./less.html#compiling">Compiling Bootstrap</a></li> - </ul> - </li> - <li class=""> - <a href="./download.html">Customize</a> - </li> - <li class=""> - <a href="./examples.html">Examples</a> - </li> - </ul> + <body data-spy="scroll" data-target=".subnav" data-offset="50"> + + <!-- Navbar + ================================================== --> + <div class="navbar navbar-fixed-top"> + <div class="navbar-inner"> + <div class="bs-docs-container"> + <button type="button"class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="brand" href="./index.html">Bootstrap</a> + <div class="nav-collapse collapse"> + <ul class="nav"> + <li class=""> + <a href="./index.html">Home</a> + </li> + <li class=""> + <a href="./scaffolding.html">Scaffolding</a> + </li> + <li class="active"> + <a href="./base-css.html">Base CSS</a> + </li> + <li class=""> + <a href="./components.html">Components</a> + </li> + <li class=""> + <a href="./javascript.html">Javascript</a> + </li> + <li class=""> + <a href="./less.html">LESS</a> + </li> + <li class="divider-vertical"></li> + <li class=""> + <a href="./download.html">Customize</a> + </li> + <li class=""> + <a href="./examples.html">Examples</a> + </li> + </ul> + </div> + </div> + </div> </div> <div class="bs-docs-container"> @@ -114,6 +80,16 @@ <header class="jumbotron subhead" id="overview"> <h1>Base CSS</h1> <p class="lead">On top of the scaffolding, basic HTML elements are styled and enhanced with extensible classes to provide a fresh, consistent look and feel.</p> + <div class="subnav"> + <ul class="nav nav-pills"> + <li><a href="#typography">Typography</a></li> + <li><a href="#code">Code</a></li> + <li><a href="#tables">Tables</a></li> + <li><a href="#forms">Forms</a></li> + <li><a href="#buttons">Buttons</a></li> + <li><a href="#icons">Icons by Glyphicons</a></li> + </ul> + </div> </header> @@ -448,19 +424,6 @@ For example, <code>section</code> should be wrapped as inline. </pre> <p><strong>Note:</strong> Be sure to keep code within <code><pre></code> tags as close to the left as possible; it will render all tabs.</p> <p>You may optionally add the <code>.pre-scrollable</code> class which will set a max-height of 350px and provide a y-axis scrollbar.</p> - - <h2>Google Prettify</h2> - <p>Take the same <code><pre></code> element and add two optional classes for enhanced rendering.</p> -<pre class="prettyprint linenums" style="margin-bottom: 9px;"> -<p>Sample text here...</p> -</pre> -<pre class="prettyprint linenums" style="margin-bottom: 9px;"> -<pre class="prettyprint - linenums"> - &lt;p&gt;Sample text here...&lt;/p&gt; -</pre> -</pre> - <p><a href="http://code.google.com/p/google-code-prettify/">Download google-code-prettify</a> and view the readme for <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html">how to use</a>.</p> </section> @@ -472,148 +435,8 @@ For example, <code>section</code> should be wrapped as inline. <h1>Tables <small>For, you guessed it, tabular data</small></h1> </div> - <h2>Table markup</h2> - - <table class="table table-bordered table-striped"> - <colgroup> - <col class="span1"> - <col class="span7"> - </colgroup> - <thead> - <tr> - <th>Tag</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td> - <code><table></code> - </td> - <td> - Wrapping element for displaying data in a tabular format - </td> - </tr> - <tr> - <td> - <code><thead></code> - </td> - <td> - Container element for table header rows (<code><tr></code>) to label table columns - </td> - </tr> - <tr> - <td> - <code><tbody></code> - </td> - <td> - Container element for table rows (<code><tr></code>) in the body of the table - </td> - </tr> - <tr> - <td> - <code><tr></code> - </td> - <td> - Container element for a set of table cells (<code><td></code> or <code><th></code>) that appears on a single row - </td> - </tr> - <tr> - <td> - <code><td></code> - </td> - <td> - Default table cell - </td> - </tr> - <tr> - <td> - <code><th></code> - </td> - <td> - Special table cell for column (or row, depending on scope and placement) labels<br> - Must be used within a <code><thead></code> - </td> - </tr> - <tr> - <td> - <code><caption></code> - </td> - <td> - Description or summary of what the table holds, especially useful for screen readers - </td> - </tr> - </tbody> - </table> -<pre class="prettyprint linenums"> -<table> - <thead> - <tr> - <th>…</th> - <th>…</th> - </tr> - </thead> - <tbody> - <tr> - <td>…</td> - <td>…</td> - </tr> - </tbody> -</table> -</pre> - - - <h2>Table options</h2> - <table class="table table-bordered table-striped"> - <thead> - <tr> - <th>Name</th> - <th>Class</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td>Default</td> - <td class="muted">None</td> - <td>No styles, just columns and rows</td> - </tr> - <tr> - <td>Basic</td> - <td> - <code>.table</code> - </td> - <td>Only horizontal lines between rows</td> - </tr> - <tr> - <td>Bordered</td> - <td> - <code>.table-bordered</code> - </td> - <td>Rounds corners and adds outer border</td> - </tr> - <tr> - <td>Zebra-stripe</td> - <td> - <code>.table-striped</code> - </td> - <td>Adds light gray background color to odd rows (1, 3, 5, etc)</td> - </tr> - <tr> - <td>Condensed</td> - <td> - <code>.table-condensed</code> - </td> - <td>Cuts vertical padding in half, from 8px to 4px, within all <code>td</code> and <code>th</code> elements</td> - </tr> - </tbody> - </table> - - - <h2>Example tables</h2> - - <h3>1. Default table styles</h3> - <p>Tables are automatically styled with only a few borders to ensure readability and maintain structure. With 2.0, the <code>.table</code> class is required.</p> + <h2>Default styles</h2> + <p>For basic styling—light padding and only horizontal dividers—add the base class <code>.table</code> to any <code><table></code>.</p> <div class="bs-docs-example"> <table class="table"> <thead> @@ -652,9 +475,15 @@ For example, <code>section</code> should be wrapped as inline. </table> </pre> - <h3>2. Striped table</h3> - <p>Get a little fancy with your tables by adding zebra-striping—just add the <code>.table-striped</code> class.</p> - <p class="muted"><strong>Note:</strong> Striped tables use the <code>:nth-child</code> CSS selector and is not available in IE7-IE8.</p> + + <hr class="bs-docs-separator"> + + + <h2>Optional classes</h2> + <p>Add any of the follow classes to the <code>.table</code> base class.</p> + + <h3><code>.table-striped</code></h3> + <p>Adds zebra-striping to any table row within the <code><tbody></code> via the <code>:nth-child</code> CSS selector (not available in IE7-IE8).</p> <div class="bs-docs-example"> <table class="table table-striped"> <thead> @@ -693,9 +522,8 @@ For example, <code>section</code> should be wrapped as inline. </table> </pre> - - <h3>3. Bordered table</h3> - <p>Add borders around the entire table and rounded corners for aesthetic purposes.</p> + <h3><code>.table-bordered</code></h3> + <p>Add borders and rounded corners to the table.</p> <div class="bs-docs-example"> <table class="table table-bordered"> <thead> @@ -738,8 +566,8 @@ For example, <code>section</code> should be wrapped as inline. </table> </pre> - <h3>4. Condensed table</h3> - <p>Make your tables more compact by adding the <code>.table-condensed</code> class to cut table cell padding in half (from 8px to 4px).</p> + <h3><code>.table-condensed</code></h3> + <p>Makes tables more compact by cutting cell padding in half.</p> <div class="bs-docs-example"> <table class="table table-condensed"> <thead> @@ -778,104 +606,115 @@ For example, <code>section</code> should be wrapped as inline. </pre> - <h3>5. Combine them all!</h3> - <p>Feel free to combine any of the table classes to achieve different looks by utilizing any of the available classes.</p> - <div class="bs-docs-example"> - <table class="table table-striped table-bordered table-condensed"> - <thead> - <tr> - <th></th> - <th colspan="2">Full name</th> - <th></th> - </tr> - <tr> - <th>#</th> - <th>First Name</th> - <th>Last Name</th> - <th>Username</th> - </tr> - </thead> - <tbody> - <tr> - <tr> - <td>1</td> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <td>2</td> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <td>3</td> - <td colspan="2">Larry the Bird</td> - <td>@twitter</td> - </tr> - </tbody> - </table> - </div> -<pre class="prettyprint linenums" style="margin-bottom: 18px;"> -<table class="table table-striped table-bordered table-condensed"> - ... -</table> -</pre> - -</section> - + <hr class="bs-docs-separator"> -<!-- Forms -================================================== --> -<section id="forms"> - <div class="page-header"> - <h1>Forms</h1> - </div> - - <h2>Controls and layouts</h2> - <p>Forms include styles for all the base form controls like <code>input</code>, <code>textarea</code>, and <code>select</code> you'd expect. There are also a number of custom components like appended and prepended inputs and support for lists of checkboxes.</p> - <p>Bootstrap provides simple markup and styles for four styles of common web forms. Each layout requires small changes to surrounding markup, but the controls themselves remain and behave the same.</p> - <p>Error, warning, and success states are included for form controls, as wel as disabled.</p> + <h2>Supported table markup</h2> + <p>List of supported table HTML elements and how they should be used.</p> <table class="table table-bordered table-striped"> + <colgroup> + <col class="span1"> + <col class="span7"> + </colgroup> <thead> <tr> - <th>Name</th> - <th>Class</th> + <th>Tag</th> <th>Description</th> </tr> </thead> <tbody> <tr> - <th>Vertical (default)</th> - <td><code>.form-vertical</code> <span class="muted">(not required)</span></td> - <td>Stacked, left-aligned labels over controls</td> + <td> + <code><table></code> + </td> + <td> + Wrapping element for displaying data in a tabular format + </td> + </tr> + <tr> + <td> + <code><thead></code> + </td> + <td> + Container element for table header rows (<code><tr></code>) to label table columns + </td> </tr> <tr> - <th>Inline</th> - <td><code>.form-inline</code></td> - <td>Left-aligned label and inline-block controls for compact style</td> + <td> + <code><tbody></code> + </td> + <td> + Container element for table rows (<code><tr></code>) in the body of the table + </td> </tr> <tr> - <th>Search</th> - <td><code>.form-search</code></td> - <td>Extra-rounded text input for a typical search aesthetic</td> + <td> + <code><tr></code> + </td> + <td> + Container element for a set of table cells (<code><td></code> or <code><th></code>) that appears on a single row + </td> + </tr> + <tr> + <td> + <code><td></code> + </td> + <td> + Default table cell + </td> + </tr> + <tr> + <td> + <code><th></code> + </td> + <td> + Special table cell for column (or row, depending on scope and placement) labels<br> + Must be used within a <code><thead></code> + </td> </tr> <tr> - <th>Horizontal</th> - <td><code>.form-horizontal</code></td> - <td>Float left, right-aligned labels on same line as controls</td> + <td> + <code><caption></code> + </td> + <td> + Description or summary of what the table holds, especially useful for screen readers + </td> </tr> </tbody> </table> +<pre class="prettyprint linenums"> +<table> + <thead> + <tr> + <th>…</th> + <th>…</th> + </tr> + </thead> + <tbody> + <tr> + <td>…</td> + <td>…</td> + </tr> + </tbody> +</table> +</pre> + +</section> + + + +<!-- Forms +================================================== --> +<section id="forms"> + <div class="page-header"> + <h1>Forms</h1> + </div> - <h2>Example forms <small>using just form controls, no extra markup</small></h2> - <h3>Basic form</h3> - <p>Smart and lightweight defaults without extra markup.</p> + <h2>Default styles</h2> + <p>Individual form controls receive styling, but without any required base class on the <code><form></code> or large changes in markup. Results in stacked, left-aligned labels on top of form controls.</p> <form class="bs-docs-example"> <label>Label name</label> - <input type="text" class="span3" placeholder="Type something…"> + <input type="text" placeholder="Type something…"> <p class="help-block">Example block-level help text here.</p> <label class="checkbox"> <input type="checkbox"> Check me out @@ -885,7 +724,7 @@ For example, <code>section</code> should be wrapped as inline. <pre class="prettyprint linenums"> <form class="well"> <label>Label name</label> - <input type="text" class="span3" placeholder="Type something…"> + <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 @@ -894,21 +733,28 @@ For example, <code>section</code> should be wrapped as inline. </form> </pre> + + <hr class="bs-docs-separator"></hr> + + + <h2>Optional layouts</h2> + <p>Included with Bootstrap are three optional form layouts for common use cases.</p> + <h3>Search form</h3> - <p>Add <code>.form-search</code> to the form and <code>.search-query</code> to the <code>input</code>.</p> + <p>Add <code>.form-search</code> to the form and <code>.search-query</code> to the <code><input></code> for an extra-rounded text input.</p> <form class="bs-docs-example form-search"> <input type="text" class="input-medium search-query"> <button type="submit" class="btn">Search</button> </form> <pre class="prettyprint linenums"> -<form class="well form-search"> +<form class="form-search"> <input type="text" class="input-medium search-query"> <button type="submit" class="btn">Search</button> </form> </pre> <h3>Inline form</h3> - <p>Add <code>.form-inline</code> to finesse the vertical alignment and spacing of form controls.</p> + <p>Add <code>.form-inline</code> for left-aligned labels and inline-block controls for a compact layout.</p> <form class="bs-docs-example form-inline"> <input type="text" class="input-small" placeholder="Email"> <input type="password" class="input-small" placeholder="Password"> @@ -918,7 +764,7 @@ For example, <code>section</code> should be wrapped as inline. <button type="submit" class="btn">Sign in</button> </form> <pre class="prettyprint linenums"> -<form class="well form-inline"> +<form class="form-inline"> <input type="text" class="input-small" placeholder="Email"> <input type="password" class="input-small" placeholder="Password"> <label class="checkbox"> @@ -928,331 +774,424 @@ For example, <code>section</code> should be wrapped as inline. </form> </pre> - <br> - - <h2>Horizontal forms</h2> - <p>Shown on the right are all the default form controls we support. Here's the bulleted list:</p> + <h3>Horizontal form</h3> + <p>Right align labels and float them to the left to make them appear on the same line as controls. Requires the most markup changes from a default form:</p> <ul> - <li>text inputs (text, password, email, etc)</li> - <li>checkbox</li> - <li>radio</li> - <li>select</li> - <li>multiple select</li> - <li>file input</li> - <li>textarea</li> + <li>Add <code>.form-horizontal</code> to the form</li> + <li>Wrap labels and controls in <code>.control-group</code></li> + <li>Add <code>.control-label</code> to the label</li> + <li>Wrap any associated controls in <code>.controls</code> for proper alignment</li> </ul> - - <form class="form-horizontal"> - <fieldset> - <div class="control-group"> - <label class="control-label" for="input01">Text input</label> - <div class="controls"> - <input type="text" class="input-xlarge" id="input01"> - <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="optionsCheckbox">Checkbox</label> - <div class="controls"> - <label class="checkbox"> - <input type="checkbox" id="optionsCheckbox" value="option1"> - Option one is this and that—be sure to include why it's great - </label> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="select01">Select list</label> - <div class="controls"> - <select id="select01"> - <option>something</option> - <option>2</option> - <option>3</option> - <option>4</option> - <option>5</option> - </select> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="multiSelect">Multicon-select</label> - <div class="controls"> - <select multiple="multiple" id="multiSelect"> - <option>1</option> - <option>2</option> - <option>3</option> - <option>4</option> - <option>5</option> - </select> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="fileInput">File input</label> - <div class="controls"> - <input class="input-file" id="fileInput" type="file"> - </div> + <form class="bs-docs-example form-horizontal"> + <div class="control-group"> + <label class="control-label" for="">Email</label> + <div class="controls"> + <input type="text" placeholder="Email"> </div> - <div class="control-group"> - <label class="control-label" for="textarea">Textarea</label> - <div class="controls"> - <textarea class="input-xlarge" id="textarea" rows="3"></textarea> - </div> + </div> + <div class="control-group"> + <label class="control-label" for="">Password</label> + <div class="controls"> + <input type="password" placeholder="Password"> </div> - <div class="form-actions"> - <button type="submit" class="btn btn-primary">Save changes</button> - <button class="btn">Cancel</button> + </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> - </fieldset> + </div> </form> - <h3>Example markup</h3> - <p>Given the above example form layout, here's the markup associated with the first input and control group. The <code>.control-group</code>, <code>.control-label</code>, and <code>.controls</code> classes are all required for styling.</p> <pre class="prettyprint linenums"> <form class="form-horizontal"> - <fieldset> - <legend>Legend text</legend> - <div class="control-group"> - <label class="control-label" for="input01">Text input</label> - <div class="controls"> - <input type="text" class="input-xlarge" id="input01"> - <p class="help-block">Supporting help text</p> - </div> + <div class="control-group"> + <label class="control-label" for="">Email</label> + <div class="controls"> + <input type="text" placeholder="Email"> </div> - </fieldset> + </div> + <div class="control-group"> + <label class="control-label" for="">Password</label> + <div class="controls"> + <input type="password" 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> </pre> - <br> - <h2>Form control states</h2> - <p>Bootstrap features styles for browser-supported focused and <code>disabled</code> states. We remove the default Webkit <code>outline</code> and apply a <code>box-shadow</code> in its place for <code>:focus</code>.</p> - <hr> - <h3>Form validation</h3> - <p>It also includes validation styles for errors, warnings, and success. To use, add the error class to the surrounding <code>.control-group</code>.</p> + <hr class="bs-docs-separator"></hr> + + + <h2>Supported form controls</h2> + <p>Examples of standard form controls supported in an example form layout.</p> + + <h3>Inputs</h3> + <p>Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.</p> + <p>Requires the use of a specified <code>type</code> at all times.</p> + <form class="bs-docs-example form-inline"> + <input type="text" placeholder="Text input"> + </form> <pre class="prettyprint linenums"> -<fieldset - class="control-group error"> - … -</fieldset> +<input type="text" placeholder="Text input"> </pre> - <form class="form-horizontal"> - <fieldset> - <div class="control-group"> - <label class="control-label" for="focusedInput">Focused input</label> - <div class="controls"> - <input class="input-xlarge focused" id="focusedInput" type="text" value="This is focused…"> - </div> - </div> - <div class="control-group"> - <label class="control-label">Uneditable input</label> - <div class="controls"> - <span class="input-xlarge uneditable-input">Some value here</span> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="disabledInput">Disabled input</label> - <div class="controls"> - <input class="input-xlarge disabled" id="disabledInput" type="text" placeholder="Disabled input here…" disabled> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="optionsCheckbox2">Disabled checkbox</label> - <div class="controls"> - <label class="checkbox"> - <input type="checkbox" id="optionsCheckbox2" value="option1" disabled> - This is a disabled checkbox - </label> - </div> - </div> - <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 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> - <div class="control-group success"> - <label class="control-label" for="selectError">Select with success</label> - <div class="controls"> - <select id="selectError"> - <option>1</option> - <option>2</option> - <option>3</option> - <option>4</option> - <option>5</option> - </select> - <span class="help-inline">Woohoo!</span> - </div> - </div> - <div class="form-actions"> - <button type="submit" class="btn btn-primary">Save changes</button> - <button class="btn">Cancel</button> - </div> - </fieldset> + <h3>Textarea</h3> + <p>Form control which supports multiple lines of text. Change <code>row</code> attribute as necessary.</p> + <form class="bs-docs-example form-inline"> + <textarea rows="3"></textarea> </form> +<pre class="prettyprint linenums"> +<textarea id="textarea" rows="3"></textarea> +</pre> + + <h3>Checkboxes and radios</h3> + <p>Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.</p> + <h4>Default (stacked)</h4> + <form class="bs-docs-example"> + <label class="checkbox"> + <input type="checkbox" value=""> + Option one is this and that—be sure to include why it's great + </label> + <br> + <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> + </form> +<pre class="prettyprint linenums"> +<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> +</pre> + + <h4>Inline checkboxes</h4> + <p>Add the <code>.inline</code> class to a series of checkboxes or radios for controls appear on the same line.</p> + <form class="bs-docs-example"> + <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> + </form> +<pre class="prettyprint linenums"> +<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> +</pre> + + <h3>Selects</h3> + <p>Use the default option or specify a <code>multiple="multiple"</code> to show multiple options at once.</p> + <form class="bs-docs-example"> + <select> + <option>something</option> + <option>2</option> + <option>3</option> + <option>4</option> + <option>5</option> + </select> + <br> + <select> + <option>1</option> + <option>2</option> + <option>3</option> + <option>4</option> + <option>5</option> + </select> + </form> +<pre class="prettyprint linenums"> +<select> + <option>something</option> + <option>2</option> + <option>3</option> + <option>4</option> + <option>5</option> +</select> + +<select> + <option>1</option> + <option>2</option> + <option>3</option> + <option>4</option> + <option>5</option> +</select> +</pre> + + + <hr class="bs-docs-separator"></hr> - <br> <h2>Extending form controls</h2> - <h3>Prepend & append inputs</h3> - <p>Input groups—with appended or prepended text—provide an easy way to give more context for your inputs. Great examples include the @ sign for Twitter usernames or $ for finances.</p> - <hr> - <h3>Checkboxes and radios</h3> - <p>Up to v1.4, Bootstrap required extra markup around checkboxes and radios to stack them. Now, it's a simple matter of repeating the <code><label class="checkbox"></code> that wraps the <code><input type="checkbox"></code>.</p> - <p>Inline checkboxes and radios are also supported. Just add <code>.inline</code> to any <code>.checkbox</code> or <code>.radio</code> and you're done.</p> - <hr> - <h4>Inline forms and append/prepend</h4> - <p>To use prepend or append inputs in an inline form, be sure to place the <code>.add-on</code> and <code>input</code> on the same line, without spaces.</p> - <hr> - <h4>Form help text</h4> - <p>To add help text for your form inputs, include inline help text with <code><span class="help-inline"></code> or a help text block with <code><p class="help-block"></code> after the input element.</p> - - <form class="form-horizontal"> - <fieldset> - <div class="control-group"> - <label class="control-label">Form grid sizes</label> - <div class="controls docs-input-sizes"> - <input class="span1" type="text" placeholder=".span1"> - <input class="span2" type="text" placeholder=".span2"> - <input class="span3" type="text" placeholder=".span3"> - <select class="span1"> - <option>1</option> - <option>2</option> - <option>3</option> - <option>4</option> - <option>5</option> - </select> - <select class="span2"> - <option>1</option> - <option>2</option> - <option>3</option> - <option>4</option> - <option>5</option> - </select> - <select class="span3"> - <option>1</option> - <option>2</option> - <option>3</option> - <option>4</option> - <option>5</option> - </select> - <p class="help-block">Use the same <code>.span*</code> classes from the grid system for input sizes.</p> - </div> - </div> - <div class="control-group"> - <label class="control-label">Alternate sizes</label> - <div class="controls docs-input-sizes"> - <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"> - <p class="help-block">You may also use static classes that don't map to the grid, adapt to the responsive CSS styles, or account for varying types of controls (e.g., <code>input</code> vs. <code>select</code>).</p> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="prependedInput">Prepended text</label> - <div class="controls"> - <div class="input-prepend"> - <span class="add-on">@</span><input class="span2" id="prependedInput" size="16" type="text" placeholder="Username"> - </div> - <p class="help-block">Here's some help text</p> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="appendedInput">Appended text</label> - <div class="controls"> - <div class="input-append"> - <input class="span2" id="appendedInput" size="16" type="text"><span class="add-on">.00</span> - </div> - <span class="help-inline">Here's more help text</span> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="appendedPrependedInput">Append and prepend</label> - <div class="controls"> - <div class="input-prepend input-append"> - <span class="add-on">$</span><input class="span2" id="appendedPrependedInput" size="16" type="text"><span class="add-on">.00</span> - </div> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="appendedInputButton">Append with button</label> - <div class="controls"> - <div class="input-append"> - <input class="span2" id="appendedInputButton" size="16" type="text"><button class="btn" type="button">Go!</button> - </div> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="appendedInputButtons">Two-button append</label> - <div class="controls"> - <div class="input-append"> - <input class="span2" id="appendedInputButtons" size="16" type="text"><button class="btn" type="button">Search</button><button class="btn" type="button">Options</button> - </div> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="inlineCheckboxes">Inline checkboxes</label> - <div class="controls"> - <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> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="optionsCheckboxList">Checkboxes</label> - <div class="controls"> - <label class="checkbox"> - <input type="checkbox" name="optionsCheckboxList1" value="option1"> - Option one is this and that—be sure to include why it's great - </label> - <label class="checkbox"> - <input type="checkbox" name="optionsCheckboxList2" value="option2"> - Option two can also be checked and included in form results - </label> - <label class="checkbox"> - <input type="checkbox" name="optionsCheckboxList3" value="option3"> - Option three can—yes, you guessed it—also be checked and included in form results - </label> - <p class="help-block"><strong>Note:</strong> Labels surround all the options for much larger click areas and a more usable form.</p> - </div> + <p>Adding on top of existing browser controls, Bootstrap includes other useful form components.</p> + + <h3>Prepended and appended inputs</h3> + <p>Add text or buttons before or after any text-based input.</p> + + <h4>Default options</h4> + <p>Wrap a <code>.add-on</code> and an <code>input</code> with one of two classes to prepend or append text to an input.</p> + <form class="bs-docs-example"> + <div class="input-prepend"> + <span class="add-on">@</span><input class="span2" id="prependedInput" size="16" type="text" placeholder="Username"> + </div> + <br> + <div class="input-append"> + <input class="span2" id="appendedInput" size="16" type="text"><span class="add-on">.00</span> + </div> + </form> +<pre class="prettyprint linenums"> +<div class="input-prepend"> + <span class="add-on">@</span><input class="span2" id="prependedInput" size="16" type="text" placeholder="Username"> +</div> +<div class="input-append"> + <input class="span2" id="appendedInput" size="16" type="text"><span class="add-on">.00</span> +</div> +</pre> + + <h4>Combined</h4> + <p>Use both classes and two instances of <code>.add-on</code> to prepend and append an input.</p> + <form class="bs-docs-example form-inline"> + <div class="input-prepend input-append"> + <span class="add-on">$</span><input class="span2" id="appendedPrependedInput" size="16" type="text"><span class="add-on">.00</span> + </div> + </form> +<pre class="prettyprint linenums"> +<div class="input-prepend input-append"> + <span class="add-on">$</span><input class="span2" id="appendedPrependedInput" size="16" type="text"><span class="add-on">.00</span> +</div> +</pre> + + <h4>Buttons instead of text</h4> + <p>Instead of a <code><span></code> with text, use a <code>.btn</code> to attach a button (or two) to an input.</p> + <form class="bs-docs-example"> + <div class="input-append"> + <input class="span2" id="appendedInputButton" size="16" type="text"><button class="btn" type="button">Go!</button> + </div> + <br> + <div class="input-append"> + <input class="span2" id="appendedInputButtons" size="16" type="text"><button class="btn" type="button">Search</button><button class="btn" type="button">Options</button> + </div> + </form> +<pre class="prettyprint linenums"> +<div class="input-append"> + <input class="span2" id="appendedInputButton" size="16" type="text"><button class="btn" type="button">Go!</button> +</div> + +<div class="input-append"> + <input class="span2" id="appendedInputButtons" size="16" type="text"><button class="btn" type="button">Search</button><button class="btn" type="button">Options</button> +</div> +</pre> + + <h3>Control sizing</h3> + <p>Use relative sizing classes like <code>.input-large</code> or match your inputs to the grid column sizes using <code>.span*</code> classes.</p> + + <h4>Relative sizing</h4> + <form class="bs-docs-example"> + <div class="controls docs-input-sizes"> + <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"> + </div> + </form> +<pre class="prettyprint linenums"> +<input class="input-mini" type="text"> +<input class="input-small" type="text"> +<input class="input-medium" type="text"> +<input class="input-large" type="text"> +<input class="input-xlarge" type="text"> +<input class="input-xxlarge" type="text"> +</pre> + + <h4>Grid sizing</h4> + <p>Use <code>.span1</code> to <code>.span12</code> for inputs that match the same sizes of the grid columns.</p> + <form class="bs-docs-example"> + <div class="controls docs-input-sizes"> + <input class="span1" type="text" placeholder=".span1"> + <input class="span2" type="text" placeholder=".span2"> + <input class="span3" type="text" placeholder=".span3"> + <select class="span1"> + <option>1</option> + <option>2</option> + <option>3</option> + <option>4</option> + <option>5</option> + </select> + <select class="span2"> + <option>1</option> + <option>2</option> + <option>3</option> + <option>4</option> + <option>5</option> + </select> + <select class="span3"> + <option>1</option> + <option>2</option> + <option>3</option> + <option>4</option> + <option>5</option> + </select> + </div> + </form> +<pre class="prettyprint linenums"> +<input class="span1" type="text"> +<input class="span2" type="text"> +<input class="span3" type="text"> +</pre> + + <h3>Uneditable inputs</h3> + <p>Present data in a form that's not editable without using actual form markup.</p> + <form class="bs-docs-example"> + <span class="input-xlarge uneditable-input">Some value here</span> + </form> +<pre class="prettyprint linenums"> + <span class="input-xlarge uneditable-input">Some value here</span> +</pre> + + <h3>Form actions</h3> + <p>End a form with a group of actions (buttons). When placed within a <code>.form-horizontal</code>, the buttons will automatically indent to line up with the form controls.</p> + <form class="bs-docs-example"> + <div class="form-actions"> + <button type="submit" class="btn btn-primary">Save changes</button> + <button class="btn">Cancel</button> + </div> + </form> +<pre class="prettyprint linenums"> +<div class="form-actions"> + <button type="submit" class="btn btn-primary">Save changes</button> + <button class="btn">Cancel</button> +</div> +</pre> + + <h3>Help text</h3> + <p>Inline and block level support for help text that appears around form controls.</p> + <h4>Inline help</h4> + <form class="bs-docs-example form-inline"> + <input type="text"> <span class="help-inline">Inline help text</span> + </form> +<pre class="prettyprint linenums"> +<span class="help-inline">Inline help text</span> +</pre> + + <h4>Block help</h4> + <form class="bs-docs-example form-inline"> + <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> +<pre class="prettyprint linenums"> +<span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span> +</pre> + + + <hr class="bs-docs-separator"></hr> + + + <h2>Form control states</h2> + <p>Provide feedback to users or visitors with basic feedback states on form controls and labels.</p> + + <h3>Input focus</h3> + <p>We remove the default <code>outline</code> styles on some form controls and apply a <code>box-shadow</code> in its place for <code>:focus</code>.</p> + <form class="bs-docs-example form-inline"> + <input class="input-xlarge focused" id="focusedInput" type="text" value="This is focused..."> + </form> +<pre class="prettyprint linenums"> +<input class="input-xlarge" id="focusedInput" type="text" value="This is focused..."> +</pre> + + <h3>Disabled inputs</h3> + <p>Add the <code>disabled</code> attribute on an input to prevent user input and trigger a slightly different look.</p> + <form class="bs-docs-example form-inline"> + <input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here…" disabled> + </form> +<pre class="prettyprint linenums"> +<input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here..." disabled> +</pre> + + <h3>Validation states</h3> + <p>Bootstrap includes validation styles for error, warning, and success messages. To use, add the appropriate class to the surrounding <code>.control-group</code>.</p> + + <form class="bs-docs-example form-horizontal"> + <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 class="control-group"> - <label class="control-label">Radio buttons</label> - <div class="controls"> - <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> - </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 class="form-actions"> - <button type="submit" class="btn btn-primary">Save changes</button> - <button class="btn">Cancel</button> + </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> - </fieldset> + </div> </form> +<pre class="prettyprint linenums"> +<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 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> +</pre> + </section> @@ -1263,6 +1202,9 @@ For example, <code>section</code> should be wrapped as inline. <div class="page-header"> <h1>Buttons</h1> </div> + + <h2>Default buttons</h2> + <p>Button styles can be applied to anything with the <code>.btn</code> class applied. However, typically you'll want to apply these to only <code><a></code> and <code><button></code> elements for the best rendering.</p> <table class="table table-bordered table-striped"> <thead> <tr> @@ -1310,13 +1252,14 @@ For example, <code>section</code> should be wrapped as inline. </tbody> </table> - <h3>Buttons for actions</h3> - <p>As a convention, buttons should only be used for actions while hyperlinks are to be used for objects. For instance, "Download" should be a button while "recent activity" should be a link.</p> - <p>Button styles can be applied to anything with the <code>.btn</code> class applied. However, typically you'll want to apply these to only <code><a></code> and <code><button></code> elements.</p> - <h3>Cross browser compatibility</h3> + <h4>Cross browser compatibility</h4> <p>IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled <code>button</code> elements, rendering text gray with a nasty text-shadow that we cannot fix.</p> - <h3>Multiple sizes</h3> + + <hr class="bs-docs-separator"> + + + <h2>Button sizes</h2> <p>Fancy larger or smaller buttons? Add <code>.btn-large</code>, <code>.btn-small</code>, or <code>.btn-mini</code> for two additional sizes.</p> <p> <button class="btn btn-large btn-primary">Primary action</button> @@ -1330,29 +1273,51 @@ For example, <code>section</code> should be wrapped as inline. <button class="btn btn-mini btn-primary">Primary action</button> <button class="btn btn-mini">Action</button> </p> - <br> - <h3>Disabled state</h3> - <p>For disabled buttons, add the <code>.disabled</code> class to links and the <code>disabled</code> attribute for <code><button></code> elements.</p> - <p> + + + <hr class="bs-docs-separator"> + + + <h2>Disabled state</h2> + <p>Make buttons look unclickable by fading them back 50%.</p> + + <h3>Anchor element</h3> + <p>Add the <code>.disabled</code> class to <code><a></code> buttons.</p> + <p class="bs-docs-example"> <a href="#" class="btn btn-large btn-primary disabled">Primary link</a> <a href="#" class="btn btn-large disabled">Link</a> </p> - <p style="margin-bottom: 18px;"> - <button class="btn btn-large btn-primary disabled" disabled="disabled">Primary button</button> - <button class="btn btn-large" disabled>Button</button> - </p> +<pre class="prettyprint linenums"> +<a href="#" class="btn btn-large btn-primary disabled">Primary link</a> +<a href="#" class="btn btn-large disabled">Link</a> +</pre> <p> <span class="label label-info">Heads up!</span> We use <code>.disabled</code> as a utility class here, similar to the common <code>.active</code> class, so no prefix is required. </p> - <h3>One class, multiple tags</h3> + <h3>Button element</h3> + <p>Add the <code>disabled</code> attribute to <code><button></code> buttons.</p> + <p class="bs-docs-example"> + <button class="btn btn-large btn-primary disabled" disabled="disabled">Primary button</button> + <button class="btn btn-large" disabled>Button</button> + </p> +<pre class="prettyprint linenums"> +<button class="btn btn-large btn-primary disabled" disabled="disabled">Primary button</button> +<button class="btn btn-large" disabled>Button</button> +</pre> + + + <hr class="bs-docs-separator"> + + + <h2>One class, multiple tags</h2> <p>Use the <code>.btn</code> class on an <code><a></code>, <code><button></code>, or <code><input></code> element.</p> -<form> -<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"> +<form class="bs-docs-example"> + <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"> </form> <pre class="prettyprint linenums"> <a class="btn" href="">Link</a> @@ -1376,6 +1341,9 @@ For example, <code>section</code> should be wrapped as inline. <div class="page-header"> <h1>Icons <small>Graciously provided by <a href="http://glyphicons.com" target="_blank">Glyphicons</a></small></h1> </div> + + <h2>Icon glyphs</h2> + <p>140 icons in sprite form, available in dark gray (default) and white, provided by <a href="http://glyphicons.com" target="_blank">Glyphicons</a>.</p> <div class="row"> <div class="span2"> <ul class="the-icons"> @@ -1407,6 +1375,10 @@ For example, <code>section</code> should be wrapped as inline. <li><i class="icon-download"></i> icon-download</li> <li><i class="icon-upload"></i> icon-upload</li> <li><i class="icon-inbox"></i> icon-inbox</li> + </ul> + </div> + <div class="span2"> + <ul class="the-icons"> <li><i class="icon-play-circle"></i> icon-play-circle</li> <li><i class="icon-repeat"></i> icon-repeat</li> <li><i class="icon-refresh"></i> icon-refresh</li> @@ -1414,10 +1386,6 @@ For example, <code>section</code> should be wrapped as inline. <li><i class="icon-lock"></i> icon-lock</li> <li><i class="icon-flag"></i> icon-flag</li> <li><i class="icon-headphones"></i> icon-headphones</li> - </ul> - </div> - <div class="span2"> - <ul class="the-icons"> <li><i class="icon-volume-off"></i> icon-volume-off</li> <li><i class="icon-volume-down"></i> icon-volume-down</li> <li><i class="icon-volume-up"></i> icon-volume-up</li> @@ -1439,6 +1407,10 @@ For example, <code>section</code> should be wrapped as inline. <li><i class="icon-align-right"></i> icon-align-right</li> <li><i class="icon-align-justify"></i> icon-align-justify</li> <li><i class="icon-list"></i> icon-list</li> + </ul> + </div> + <div class="span2"> + <ul class="the-icons"> <li><i class="icon-indent-left"></i> icon-indent-left</li> <li><i class="icon-indent-right"></i> icon-indent-right</li> <li><i class="icon-facetime-video"></i> icon-facetime-video</li> @@ -1453,10 +1425,6 @@ For example, <code>section</code> should be wrapped as inline. <li><i class="icon-move"></i> icon-move</li> <li><i class="icon-step-backward"></i> icon-step-backward</li> <li><i class="icon-fast-backward"></i> icon-fast-backward</li> - </ul> - </div> - <div class="span2"> - <ul class="the-icons"> <li><i class="icon-backward"></i> icon-backward</li> <li><i class="icon-play"></i> icon-play</li> <li><i class="icon-pause"></i> icon-pause</li> @@ -1471,6 +1439,10 @@ For example, <code>section</code> should be wrapped as inline. <li><i class="icon-minus-sign"></i> icon-minus-sign</li> <li><i class="icon-remove-sign"></i> icon-remove-sign</li> <li><i class="icon-ok-sign"></i> icon-ok-sign</li> + </ul> + </div> + <div class="span2"> + <ul class="the-icons"> <li><i class="icon-question-sign"></i> icon-question-sign</li> <li><i class="icon-info-sign"></i> icon-info-sign</li> <li><i class="icon-screenshot"></i> icon-screenshot</li> @@ -1492,10 +1464,6 @@ For example, <code>section</code> should be wrapped as inline. <li><i class="icon-leaf"></i> icon-leaf</li> <li><i class="icon-fire"></i> icon-fire</li> <li><i class="icon-eye-open"></i> icon-eye-open</li> - </ul> - </div> - <div class="span2"> - <ul class="the-icons"> <li><i class="icon-eye-close"></i> icon-eye-close</li> <li><i class="icon-warning-sign"></i> icon-warning-sign</li> <li><i class="icon-plane"></i> icon-plane</li> @@ -1503,6 +1471,10 @@ For example, <code>section</code> should be wrapped as inline. <li><i class="icon-random"></i> icon-random</li> <li><i class="icon-comment"></i> icon-comment</li> <li><i class="icon-magnet"></i> icon-magnet</li> + </ul> + </div> + <div class="span2"> + <ul class="the-icons"> <li><i class="icon-chevron-up"></i> icon-chevron-up</li> <li><i class="icon-chevron-down"></i> icon-chevron-down</li> <li><i class="icon-retweet"></i> icon-retweet</li> @@ -1535,16 +1507,12 @@ For example, <code>section</code> should be wrapped as inline. </div> </div> - <br> + <hr class="bs-docs-separator"> - <h3>Built as a sprite</h3> - <p>Instead of making every icon an extra request, we've compiled them into a sprite—a bunch of images in one file that uses CSS to position the images with <code>background-position</code>. This is the same method we use on Twitter.com and it has worked well for us.</p> - <p>All icons classes are prefixed with <code>.icon-</code> for proper namespacing and scoping, much like our other components. This will help avoid conflicts with other tools.</p> - <p><a href="http://glyphicons.com" target="_blank">Glyphicons</a> has granted us use of the Halflings set in our open-source toolkit so long as we provide a link and credit here in the docs. Please consider doing the same in your projects.</p> - <h3>How to use</h3> - <p>Bootstrap uses an <code><i></code> tag for all icons, but they have no case class—only a shared prefix. To use, place the following code just about anywhere:</p> + <h2>How to use</h2> + <p>All icons require an <code><i></code> tag with a unique class, prefixed with <code>icon-</code>. To use, place the following code just about anywhere:</p> <pre class="prettyprint linenums"> <i class="icon-search"></i> </pre> @@ -1552,66 +1520,55 @@ For example, <code>section</code> should be wrapped as inline. <pre class="prettyprint linenums"> <i class="icon-search icon-white"></i> </pre> - <p>There are 140 classes to choose from for your icons. Just add an <code><i></code> tag with the right classes and you're set. You can find the full list in <strong>sprites.less</strong> or right here in this document.</p> <p> <span class="label label-info">Heads up!</span> When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <code><i></code> tag for proper spacing. </p> - <h3>Use cases</h3> - <p>Icons are great, but where would one use them? Here are a few ideas:</p> - <ul> - <li>As visuals for your sidebar navigation</li> - <li>For a purely icon-driven navigation</li> - <li>For buttons to help convey the meaning of an action</li> - <li>With links to share context on a user's destination</li> - </ul> - <p>Essentially, anywhere you can put an <code><i></code> tag, you can put an icon.</p> + + <hr class="bs-docs-separator"> - <h3>Examples</h3> + <h2>Icon examples</h2> <p>Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.</p> - <div class="btn-toolbar" style="margin-bottom: 9px"> - <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> + <h4>Buttons</h4> + <div class="bs-docs-example"> + <div class="btn-toolbar" style="margin-bottom: 9px"> + <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 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> </div> - <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> + </div> + + <h4>Navigation</h4> + <div class="bs-docs-example"> + <div class="well" style="padding: 8px 0; margin-bottom: 0;"> + <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> </div> </div> - <p> - <a class="btn" href="#"><i class="icon-refresh"></i> Refresh</a> - <a class="btn btn-success" href="#"><i class="icon-shopping-cart icon-white"></i> Checkout</a> - <a class="btn btn-danger" href="#"><i class="icon-trash icon-white"></i> Delete</a> - </p> - <p> - <a class="btn btn-large" href="#"><i class="icon-comment"></i> Comment</a> - <a class="btn btn-small" href="#"><i class="icon-cog"></i> Settings</a> - <a class="btn btn-small btn-info" href="#"><i class="icon-info-sign icon-white"></i> More Info</a> - </p> - - <div class="well" style="padding: 8px 0;"> - <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> - </div> <!-- /well --> - <form> + <h4>Form fields</h4> + <form class="bs-docs-example form-horizontal"> <div class="control-group"> <label class="control-label" for="inputIcon">Email address</label> <div class="controls"> @@ -1634,7 +1591,7 @@ For example, <code>section</code> should be wrapped as inline. <p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> </footer> - </div><!-- /container --> + </div> diff --git a/docs/components.html b/docs/components.html index 63cfac9ae6..9d25a8b057 100644 --- a/docs/components.html +++ b/docs/components.html @@ -27,84 +27,50 @@ </head> - <body> - - <div class="bs-docs-nav"> - <h3 class="bs-docs-logo"><a href="./index.html">Bootstrap</a></h3> - <ul class="bs-nav"> - <li class=""> - <a href="./scaffolding.html">Scaffolding</a> - <ul> - <li><a href="./scaffolding.html#global">Global styles</a></li> - <li><a href="./scaffolding.html#gridSystem">Grid system</a></li> - <li><a href="./scaffolding.html#fluidGridSystem">Fluid grid system</a></li> - <li><a href="./scaffolding.html#gridCustomization">Customizing</a></li> - <li><a href="./scaffolding.html#layouts">Layouts</a></li> - <li><a href="./scaffolding.html#responsive">Responsive design</a></li> - </ul> - </li> - <li class=""> - <a href="./base-css.html">Base CSS</a> - <ul> - <li><a href="./base-css.html#typography">Typography</a></li> - <li><a href="./base-css.html#code">Code</a></li> - <li><a href="./base-css.html#tables">Tables</a></li> - <li><a href="./base-css.html#forms">Forms</a></li> - <li><a href="./base-css.html#buttons">Buttons</a></li> - <li><a href="./base-css.html#icons">Icons by Glyphicons</a></li> - </ul> - </li> - <li class="active"> - <a href="./components.html">Components</a> - <ul> - <li><a href="./components.html#buttonGroups">Button groups</a></li> - <li><a href="./components.html#buttonDropdowns">Button dropdowns</a></li> - <li><a href="./components.html#navs">Nav, tabs, pills</a></li> - <li><a href="./components.html#navbar">Navbar</a></li> - <li><a href="./components.html#breadcrumbs">Breadcrumbs</a></li> - <li><a href="./components.html#pagination">Pagination</a></li> - <li><a href="./components.html#labels">Labels</a></li> - <li><a href="./components.html#badges">Badges</a></li> - <li><a href="./components.html#typography">Typography</a></li> - <li><a href="./components.html#thumbnails">Thumbnails</a></li> - <li><a href="./components.html#alerts">Alerts</a></li> - <li><a href="./components.html#progress">Progress bars</a></li> - <li><a href="./components.html#misc">Miscellaneous</a></li> - </ul> - </li> - <li class=""> - <a href="./javascript.html">Javascript</a> - <ul> - <li><a href="./javascript.html#javascript">All plugins</a></li> - <li><a href="./javascript.html#modals">Modal</a></li> - <li><a href="./javascript.html#dropdowns">Dropdown</a></li> - <li><a href="./javascript.html#scrollspy">Scrollspy</a></li> - <li><a href="./javascript.html#tabs">Tab</a></li> - <li><a href="./javascript.html#tooltips">Tooltip</a></li> - <li><a href="./javascript.html#popovers">Popover</a></li> - <li><a href="./javascript.html#alerts">Alert</a></li> - <li><a href="./javascript.html#buttons">Button</a></li> - <li><a href="./javascript.html#collapse">Collapse</a></li> - <li><a href="./javascript.html#carousel">Carousel</a></li> - <li><a href="./javascript.html#typeahead">Typeahead</a></li> - </ul> - </li> - <li class=""> - <a href="./less.html">LESS</a> - <ul> - <li><a href="./less.html#builtWith">Built with Less</a></li> - <li><a href="./less.html#variables">Variables</a></li> - <li><a href="./less.html#mixins">Mixins</a></li> - <li><a href="./less.html#compiling">Compiling Bootstrap</a></li> - </ul> - </li> - <li class=""> - <a href="./download.html">Customize</a> - </li> - <li class=""> - <a href="./examples.html">Examples</a> - </li> - </ul> + <body data-spy="scroll" data-target=".subnav" data-offset="50"> + + <!-- Navbar + ================================================== --> + <div class="navbar navbar-fixed-top"> + <div class="navbar-inner"> + <div class="bs-docs-container"> + <button type="button"class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="brand" href="./index.html">Bootstrap</a> + <div class="nav-collapse collapse"> + <ul class="nav"> + <li class=""> + <a href="./index.html">Home</a> + </li> + <li class=""> + <a href="./scaffolding.html">Scaffolding</a> + </li> + <li class=""> + <a href="./base-css.html">Base CSS</a> + </li> + <li class="active"> + <a href="./components.html">Components</a> + </li> + <li class=""> + <a href="./javascript.html">Javascript</a> + </li> + <li class=""> + <a href="./less.html">LESS</a> + </li> + <li class="divider-vertical"></li> + <li class=""> + <a href="./download.html">Customize</a> + </li> + <li class=""> + <a href="./examples.html">Examples</a> + </li> + </ul> + </div> + </div> + </div> </div> <div class="bs-docs-container"> @@ -114,9 +80,37 @@ <header class="jumbotron subhead" id="overview"> <h1>Components</h1> <p class="lead">Dozens of reusable components are built into Bootstrap to provide navigation, alerts, popovers, and much more.</p> + <div class="subnav"> + <ul class="nav nav-pills"> + <li class="dropdown"> + <a class="dropdown-toggle" data-toggle="dropdown" href="#">Buttons <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="#buttonGroups">Button groups</a></li> + <li><a href="#buttonDropdowns">Button dropdowns</a></li> + </ul> + </li> + <li class="dropdown"> + <a class="dropdown-toggle" data-toggle="dropdown" href="#">Navigation <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="#navs">Nav, tabs, pills</a></li> + <li><a href="#navbar">Navbar</a></li> + <li><a href="#breadcrumbs">Breadcrumbs</a></li> + <li><a href="#pagination">Pagination</a></li> + </ul> + </li> + <li><a href="#labels">Labels</a></li> + <li><a href="#badges">Badges</a></li> + <li><a href="#typography">Typography</a></li> + <li><a href="#thumbnails">Thumbnails</a></li> + <li><a href="#alerts">Alerts</a></li> + <li><a href="#progress">Progress bars</a></li> + <li><a href="#misc">Miscellaneous</a></li> + </ul> + </div> </header> + <!-- Button Groups ================================================== --> <section id="buttonGroups"> @@ -124,10 +118,9 @@ <h1>Button groups <small>Join buttons for more toolbar-like functionality</small></h1> </div> - <h3>Button groups</h3> - <p>Use button groups to join multiple buttons together as one composite component. Build them with a series of <code><a></code> or <code><button></code> elements.</p> - <h3>Best practices</h3> - <p>We recommend the following guidelines for using button groups and toolbars:</p> + + <h2>Description and best practices</h2> + <p>Use button groups to join multiple buttons together as one composite component. Build them with a series of <code><a></code> or <code><button></code> elements. We recommend the following guidelines for using button groups and toolbars:</p> <ul> <li>Always use the same element in a single button group, <code><a></code> or <code><button></code>.</li> <li>Don't mix buttons of different colors in the same button group.</li> @@ -135,10 +128,17 @@ </ul> <p><span class="label label-info">Related</span> Button groups with dropdowns (see below) should be called out separately and always include a dropdown caret to indicate intended behavior.</p> - <h3>Default example</h3> - <p>Here's how the HTML looks for a standard button group built with anchor tag buttons:</p> - <div class=""> - <div class="btn-group" style="margin: 9px 0;"> + + <hr class="bs-docs-separator"> + + + <h2>Examples and variations</h2> + <p>Two basic options, along with two more specific variations.</p> + + <h3>Basic button group</h3> + <p>Wrap a series of buttons with <code>.btn</code> in <code>.btn-group</code>.</p> + <div class="bs-docs-example"> + <div class="btn-group" style="margin: 9px 0 5px;"> <button class="btn">Left</button> <button class="btn">Middle</button> <button class="btn">Right</button> @@ -151,22 +151,25 @@ <button class="btn">3</button> </div> </pre> + <h3>Toolbar example</h3> <p>Combine sets of <code><div class="btn-group"></code> into a <code><div class="btn-toolbar"></code> for more complex components.</p> - <div class="btn-toolbar"> - <div class="btn-group"> - <button class="btn">1</button> - <button class="btn">2</button> - <button class="btn">3</button> - <button class="btn">4</button> - </div> - <div class="btn-group"> - <button class="btn">5</button> - <button class="btn">6</button> - <button class="btn">7</button> - </div> - <div class="btn-group"> - <button class="btn">8</button> + <div class="bs-docs-example"> + <div class="btn-toolbar" style="margin: 0;"> + <div class="btn-group"> + <button class="btn">1</button> + <button class="btn">2</button> + <button class="btn">3</button> + <button class="btn">4</button> + </div> + <div class="btn-group"> + <button class="btn">5</button> + <button class="btn">6</button> + <button class="btn">7</button> + </div> + <div class="btn-group"> + <button class="btn">8</button> + </div> </div> </div> <pre class="prettyprint linenums"> @@ -176,9 +179,10 @@ </div> </div> </pre> + <h3>Checkbox and radio flavors</h3> <p>Button groups can also function as radios, where only one button may be active, or checkboxes, where any number of buttons may be active. View <a href="./javascript.html#buttons">the Javascript docs</a> for that.</p> - <p><a class="btn js-btn" href="./javascript.html#buttons">Get the javascript »</a></p> + <h3>Dropdowns in button groups</h3> <p><span class="label label-info">Heads up!</span> Buttons with dropdowns must be individually wrapped in their own <code>.btn-group</code> within a <code>.btn-toolbar</code> for proper rendering.</p> </section> @@ -192,87 +196,83 @@ <h1>Button dropdown menus <small>Built on button groups to provide contextual menus</small></h1> </div> - <h2>Button dropdowns</h2> - <h3>Overview and examples</h3> + <h2>Overview and examples</h2> <p>Use any button to trigger a dropdown menu by placing it within a <code>.btn-group</code> and providing the proper menu markup.</p> - <div class="btn-toolbar" style="margin-top: 18px;"> - <div class="btn-group"> - <button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-danger dropdown-toggle" data-toggle="dropdown">Danger <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> + <div class="bs-docs-example"> + <div class="btn-toolbar" style="margin: 0;"> + <div class="btn-group"> + <button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-danger dropdown-toggle" data-toggle="dropdown">Danger <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-warning dropdown-toggle" data-toggle="dropdown">Warning <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-success dropdown-toggle" data-toggle="dropdown">Success <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-info dropdown-toggle" data-toggle="dropdown">Info <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-inverse dropdown-toggle" data-toggle="dropdown">Inverse <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + </div><!-- /btn-toolbar --> </div> - <div class="btn-toolbar"> - <div class="btn-group"> - <button class="btn btn-warning dropdown-toggle" data-toggle="dropdown">Warning <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-success dropdown-toggle" data-toggle="dropdown">Success <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-info dropdown-toggle" data-toggle="dropdown">Info <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-inverse dropdown-toggle" data-toggle="dropdown">Inverse <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - </div><!-- /btn-toolbar --> - - <h3>Example markup</h3> - <p>Similar to a button group, our markup uses regular button markup, but with a handful of additions to refine the style and support Bootstrap's dropdown jQuery plugin.</p> <pre class="prettyprint linenums"> <div class="btn-group"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> @@ -287,188 +287,191 @@ <h3>Works with all button sizes</h3> <p>Button dropdowns work at any size. your button sizes to <code>.btn-large</code>, <code>.btn-small</code>, or <code>.btn-mini</code>.</p> - <div class="btn-toolbar" style="margin-top: 18px;"> - <div class="btn-group"> - <button class="btn btn-large dropdown-toggle" data-toggle="dropdown">Large button <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-small dropdown-toggle" data-toggle="dropdown">Small button <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-mini dropdown-toggle" data-toggle="dropdown">Mini button <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - </div><!-- /btn-toolbar --> + <div class="bs-docs-example"> + <div class="btn-toolbar" style="margin: 0;"> + <div class="btn-group"> + <button class="btn btn-large dropdown-toggle" data-toggle="dropdown">Large button <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-small dropdown-toggle" data-toggle="dropdown">Small button <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-mini dropdown-toggle" data-toggle="dropdown">Mini button <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + </div><!-- /btn-toolbar --> + </div> <h3>Requires javascript</h3> <p>Button dropdowns require the <a href="./javascript.html#dropdowns">Bootstrap dropdown plugin</a> to function.</p> <p>In some cases—like mobile—dropdown menus will extend outside the viewport. You need to resolve the alignment manually or with custom javascript.</p> - <br> - <h2>Split button dropdowns</h2> + <hr class="bs-docs-separator"> + - <h3>Overview and examples</h3> + <h2>Split button dropdowns</h2> <p>Building on the button group styles and markup, we can easily create a split button. Split buttons feature a standard action on the left and a dropdown toggle on the right with contextual links.</p> - <div class="btn-toolbar" style="margin-top: 18px;"> - <div class="btn-group"> - <button class="btn">Action</button> - <button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-primary">Action</button> - <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-danger">Danger</button> - <button class="btn btn-danger dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - </div> - <div class="btn-toolbar"> - <div class="btn-group"> - <button class="btn btn-warning">Warning</button> - <button class="btn btn-warning dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-success">Success</button> - <button class="btn btn-success dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-info">Info</button> - <button class="btn btn-info dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> + <div class="bs-docs-example"> + <div class="btn-toolbar" style="margin: 0;"> + <div class="btn-group"> + <button class="btn">Action</button> + <button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-primary">Action</button> + <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-danger">Danger</button> + <button class="btn btn-danger dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-warning">Warning</button> + <button class="btn btn-warning dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-success">Success</button> + <button class="btn btn-success dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-info">Info</button> + <button class="btn btn-info dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-inverse">Inverse</button> + <button class="btn btn-inverse dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + </div><!-- /btn-toolbar --> </div> - <div class="btn-toolbar"> - <div class="btn-group"> - <button class="btn btn-inverse">Inverse</button> - <button class="btn btn-inverse dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - </div><!-- /btn-toolbar --> - <h3>Sizes</h3> - <p>Utilize the extra button classes <code>.btn-mini</code>, <code>.btn-small</code>, or <code>.btn-large</code> for sizing.</p> - <div class="btn-toolbar"> - <div class="btn-group"> - <button class="btn btn-large">Large action</button> - <button class="btn btn-large dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - </div><!-- /btn-toolbar --> - <div class="btn-toolbar"> - <div class="btn-group"> - <button class="btn btn-small">Small action</button> - <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - </div><!-- /btn-toolbar --> - <div class="btn-toolbar"> - <div class="btn-group"> - <button class="btn btn-mini">Mini action</button> - <button class="btn btn-mini dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - </div><!-- /btn-toolbar --> <pre class="prettyprint linenums"> <div class="btn-group"> - ... - <ul class="dropdown-menu pull-right"> + <button class="btn">Action</button> + <button class="btn dropdown-toggle" data-toggle="dropdown"> + <span class="caret"></span> + </button> + <ul class="dropdown-menu"> <!-- dropdown menu links --> </ul> </div> </pre> - <h3>Example markup</h3> - <p>We expand on the normal button dropdowns to provide a second button action that operates as a separate dropdown trigger.</p> + <h3>Sizes</h3> + <p>Utilize the extra button classes <code>.btn-mini</code>, <code>.btn-small</code>, or <code>.btn-large</code> for sizing.</p> + <div class="bs-docs-example"> + <div class="btn-toolbar"> + <div class="btn-group"> + <button class="btn btn-large">Large action</button> + <button class="btn btn-large dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + </div><!-- /btn-toolbar --> + <div class="btn-toolbar"> + <div class="btn-group"> + <button class="btn btn-small">Small action</button> + <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + </div><!-- /btn-toolbar --> + <div class="btn-toolbar"> + <div class="btn-group"> + <button class="btn btn-mini">Mini action</button> + <button class="btn btn-mini dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + </div><!-- /btn-toolbar --> + </div> <pre class="prettyprint linenums"> <div class="btn-group"> - <button class="btn">Action</button> - <button class="btn dropdown-toggle" data-toggle="dropdown"> + <button class="btn btn-mini">Action</button> + <button class="btn btn-mini dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span> </button> <ul class="dropdown-menu"> @@ -476,31 +479,34 @@ </ul> </div> </pre> + <h3>Dropup menus</h3> <p>Dropdown menus can also be toggled from the bottom up by adding a single class to the immediate parent of <code>.dropdown-menu</code>. It will flip the direction of the <code>.caret</code> and reposition the menu itself to move from the bottom up instead of top down.</p> - <div class="btn-toolbar" style="margin-top: 9px;"> - <div class="btn-group dropup"> - <button class="btn">Dropup</button> - <button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group dropup"> - <button class="btn primary">Right dropup</button> - <button class="btn primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu pull-right"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </div><!-- /btn-group --> + <div class="bs-docs-example"> + <div class="btn-toolbar" style="margin: 0;"> + <div class="btn-group dropup"> + <button class="btn">Dropup</button> + <button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group dropup"> + <button class="btn primary">Right dropup</button> + <button class="btn primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu pull-right"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + </div> </div> <pre class="prettyprint linenums"> <div class="btn-group dropup"> @@ -526,21 +532,17 @@ </div> <h2>Lightweight defaults <small>Same markup, different classes</small></h2> - - <h3>Powerful base class</h3> <p>All nav components here—tabs, pills, and lists—<strong>share the same base markup and styles</strong> through the <code>.nav</code> class.</p> - <h3>When to use</h3> - <p>Tabs and pills are great for sections of content or navigating between pages of related content.</p> - <h3>Component alignment</h3> - <p>To align nav links, use the <code>.pull-left</code> or <code>.pull-right</code> utility classes. Both classes will add a CSS float in the specified direction.</p> <h3>Basic tabs</h3> <p>Take a regular <code><ul></code> of links and add <code>.nav-tabs</code>:</p> - <ul class="nav nav-tabs"> - <li class="active"><a href="#">Home</a></li> - <li><a href="#">Profile</a></li> - <li><a href="#">Messages</a></li> - </ul> + <div class="bs-docs-example"> + <ul class="nav nav-tabs"> + <li class="active"><a href="#">Home</a></li> + <li><a href="#">Profile</a></li> + <li><a href="#">Messages</a></li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="nav nav-tabs"> <li class="active"> @@ -553,11 +555,13 @@ <h3>Basic pills</h3> <p>Take that same HTML, but use <code>.nav-pills</code> instead:</p> - <ul class="nav nav-pills"> - <li class="active"><a href="#">Home</a></li> - <li><a href="#">Profile</a></li> - <li><a href="#">Messages</a></li> - </ul> + <div class="bs-docs-example"> + <ul class="nav nav-pills"> + <li class="active"><a href="#">Home</a></li> + <li><a href="#">Profile</a></li> + <li><a href="#">Messages</a></li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="nav nav-pills"> <li class="active"> @@ -568,18 +572,24 @@ </ul> </pre> + <h3>Component alignment</h3> + <p>To align nav links, use the <code>.pull-left</code> or <code>.pull-right</code> utility classes. Both classes will add a CSS float in the specified direction.</p> + - <h2>Stackable <small>Make tabs or pills vertical</small></h2> + <hr class="bs-docs-separator"> - <h3>How to stack 'em</h3> + + <h2>Stackable</h2> <p>As tabs and pills are horizontal by default, just add a second class, <code>.nav-stacked</code>, to make them appear vertically stacked.</p> <h3>Stacked tabs</h3> - <ul class="nav nav-tabs nav-stacked"> - <li class="active"><a href="#">Home</a></li> - <li><a href="#">Profile</a></li> - <li><a href="#">Messages</a></li> - </ul> + <div class="bs-docs-example"> + <ul class="nav nav-tabs nav-stacked"> + <li class="active"><a href="#">Home</a></li> + <li><a href="#">Profile</a></li> + <li><a href="#">Messages</a></li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="nav nav-tabs nav-stacked"> ... @@ -587,38 +597,43 @@ </pre> <h3>Stacked pills</h3> - <ul class="nav nav-pills nav-stacked"> - <li class="active"><a href="#">Home</a></li> - <li><a href="#">Profile</a></li> - <li><a href="#">Messages</a></li> - </ul> + <div class="bs-docs-example"> + <ul class="nav nav-pills nav-stacked"> + <li class="active"><a href="#">Home</a></li> + <li><a href="#">Profile</a></li> + <li><a href="#">Messages</a></li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="nav nav-pills nav-stacked"> ... </ul> </pre> - <h2>Dropdowns <small>For advanced nav components</small></h2> - <h3>Rich menus made easy</h3> - <p>Dropdown menus in Bootstrap tabs and pills are super easy and require only a little extra HTML and a lightweight jQuery plugin.</p> - <p>Head over to the Javascript page to read the docs on <a href="./javascript.html#tabs">initializing dropdowns</a> in Bootstrap.</p> + <hr class="bs-docs-separator"> + + + <h2>Dropdowns</h2> + <p>Add dropdown menus with a little extra HTML and the <a href="./javascript.html#dropdowns">dropdowns javascript plugin</a>.</p> <h3>Tabs with dropdowns</h3> - <ul class="nav nav-tabs"> - <li class="active"><a href="#">Home</a></li> - <li><a href="#">Help</a></li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </li> - </ul> + <div class="bs-docs-example"> + <ul class="nav nav-tabs"> + <li class="active"><a href="#">Home</a></li> + <li><a href="#">Help</a></li> + <li class="dropdown"> + <a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="nav nav-tabs"> <li class="dropdown"> @@ -636,20 +651,22 @@ </pre> <h3>Pills with dropdowns</h3> - <ul class="nav nav-pills"> - <li class="active"><a href="#">Home</a></li> - <li><a href="#">Help</a></li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </li> - </ul> + <div class="bs-docs-example"> + <ul class="nav nav-pills"> + <li class="active"><a href="#">Home</a></li> + <li><a href="#">Help</a></li> + <li class="dropdown"> + <a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="nav nav-pills"> <li class="dropdown"> @@ -666,39 +683,30 @@ </ul> </pre> - <h2>Nav lists <small>Build simple stacked navs, great for sidebars</small></h2> - <h3>Application-style navigation</h3> - <p>Nav lists provide a simple and easy way to build groups of nav links with optional headers. They're best used in sidebars like the Finder in OS X.</p> - <p>Structurally, they're built on the same core nav styles as tabs and pills, so usage and customization are straightforward.</p> - <hr> - <h4>With icons</h4> - <p>Nav lists are also easy to equip with icons. Add the proper <code><i></code> tag with class and you're set.</p> - <h4>Horizontal dividers</h4> - <p>Add a horizontal divider by creating an empty list item with the class <code>.divider</code>, like so:</p> -<pre class="prettyprint linenums"> -<ul class="nav nav-list"> - ... - <li class="divider"></li> - ... -</ul> -</pre> + <hr class="bs-docs-separator"> + + + <h2>Nav lists</h2> + <p>A simple and easy way to build groups of nav links with optional headers. They're best used in sidebars like the Finder in OS X.</p> <h3>Example nav list</h3> <p>Take a list of links and add <code>class="nav nav-list"</code>:</p> - <div class="well" style="padding: 8px 0;"> - <ul class="nav nav-list"> - <li class="nav-header">List header</li> - <li class="active"><a href="#">Home</a></li> - <li><a href="#">Library</a></li> - <li><a href="#">Applications</a></li> - <li class="nav-header">Another list header</li> - <li><a href="#">Profile</a></li> - <li><a href="#">Settings</a></li> - <li class="divider"></li> - <li><a href="#">Help</a></li> - </ul> - </div> <!-- /well --> + <div class="bs-docs-example"> + <div class="well" style="max-width: 340px; padding: 8px 0;"> + <ul class="nav nav-list"> + <li class="nav-header">List header</li> + <li class="active"><a href="#">Home</a></li> + <li><a href="#">Library</a></li> + <li><a href="#">Applications</a></li> + <li class="nav-header">Another list header</li> + <li><a href="#">Profile</a></li> + <li><a href="#">Settings</a></li> + <li class="divider"></li> + <li><a href="#">Help</a></li> + </ul> + </div> <!-- /well --> + </div> <pre class="prettyprint linenums"> <ul class="nav nav-list"> <li class="nav-header"> @@ -716,19 +724,21 @@ <h3>Example with icons</h3> <p>Same example, but with <code><i></code> tags for icons.</p> - <div class="well" style="padding: 8px 0;"> - <ul class="nav nav-list"> - <li class="nav-header">List header</li> - <li class="active"><a href="#"><i class="icon-white icon-home"></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 class="nav-header">Another list header</li> - <li><a href="#"><i class="icon-user"></i> Profile</a></li> - <li><a href="#"><i class="icon-cog"></i> Settings</a></li> - <li class="divider"></li> - <li><a href="#"><i class="icon-flag"></i> Help</a></li> - </ul> - </div> <!-- /well --> + <div class="bs-docs-example"> + <div class="well" style="max-width: 340px; padding: 8px 0;"> + <ul class="nav nav-list"> + <li class="nav-header">List header</li> + <li class="active"><a href="#"><i class="icon-white icon-home"></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 class="nav-header">Another list header</li> + <li><a href="#"><i class="icon-user"></i> Profile</a></li> + <li><a href="#"><i class="icon-cog"></i> Settings</a></li> + <li class="divider"></li> + <li><a href="#"><i class="icon-flag"></i> Help</a></li> + </ul> + </div> <!-- /well --> + </div> <pre class="prettyprint linenums"> <ul class="nav nav-list"> ... @@ -742,44 +752,45 @@ </ul> </pre> + <h3>Horizontal dividers</h3> + <p>Add a horizontal divider by creating an empty list item with the class <code>.divider</code>, like so:</p> +<pre class="prettyprint linenums"> +<ul class="nav nav-list"> + ... + <li class="divider"></li> + ... +</ul> +</pre> + - <h2>Tabbable nav <small>Bring tabs to life via javascript</small></h2> + <hr class="bs-docs-separator"> - <h3>What's included</h3> + + <h2>Tabbable nav</h2> <p>Bring your tabs to life with a simple plugin to toggle between content via tabs. Bootstrap integrates tabbable tabs in four styles: top (default), right, bottom, and left.</p> - <p>Changing between them is easy and only requires changing very little markup.</p> - <hr> - <h4>Fade in tabs</h4> - <p>To make tabs fade in, add <code>.fade</code> to each <code>.tab-pane</code>.</p> - <hr> - <h4>Requires jQuery plugin</h4> - <p>All tabbable tabs are powered by our lightweight jQuery plugin. Read more about how to bring tabbable tabs to life <a href="./javascript.html#tabs">on the javascript docs page</a>.</p> - <p><a class="btn" href="./javascript.html#tabs">Get the javascript →</a></p> <h3>Tabbable example</h3> <p>To make tabs tabbable, create a <code>.tab-pane</code> with unique ID for every tab and wrap them in <code>.tab-content</code>.</p> - <div class="tabbable" style="margin-bottom: 18px;"> - <ul class="nav nav-tabs"> - <li class="active"><a href="#tab1" data-toggle="tab">Section 1</a></li> - <li><a href="#tab2" data-toggle="tab">Section 2</a></li> - <li><a href="#tab3" data-toggle="tab">Section 3</a></li> - </ul> - <div class="tab-content" style="padding-bottom: 9px; border-bottom: 1px solid #ddd;"> - <div class="tab-pane active" id="tab1"> - <p>I'm in Section 1.</p> - </div> - <div class="tab-pane" id="tab2"> - <p>Howdy, I'm in Section 2.</p> - </div> - <div class="tab-pane" id="tab3"> - <p>What up girl, this is Section 3.</p> + <div class="bs-docs-example"> + <div class="tabbable" style="margin-bottom: 18px;"> + <ul class="nav nav-tabs"> + <li class="active"><a href="#tab1" data-toggle="tab">Section 1</a></li> + <li><a href="#tab2" data-toggle="tab">Section 2</a></li> + <li><a href="#tab3" data-toggle="tab">Section 3</a></li> + </ul> + <div class="tab-content" style="padding-bottom: 9px; border-bottom: 1px solid #ddd;"> + <div class="tab-pane active" id="tab1"> + <p>I'm in Section 1.</p> + </div> + <div class="tab-pane" id="tab2"> + <p>Howdy, I'm in Section 2.</p> + </div> + <div class="tab-pane" id="tab3"> + <p>What up girl, this is Section 3.</p> + </div> </div> - </div> - </div> <!-- /tabbable --> - <p>For right or left aligned tabs, wrap the <code>.nav-tabs</code> and <code>.tab-content</code> in <code>.tabbable</code>.</p> - - <h3>Straightforward markup</h3> - <p>Using tabbable tabs requires a wrapping div, a set of tabs, and a set of tabbable panes of content.</p> + </div> <!-- /tabbable --> + </div> <pre class="prettyprint linenums"> <div class="tabbable"> <!-- Only required for left/right tabs --> <ul class="nav nav-tabs"> @@ -797,30 +808,37 @@ </div> </pre> + <h4>Fade in tabs</h4> + <p>To make tabs fade in, add <code>.fade</code> to each <code>.tab-pane</code>.</p> + + <h4>Requires jQuery plugin</h4> + <p>All tabbable tabs are powered by our lightweight jQuery plugin. Read more about how to bring tabbable tabs to life <a href="./javascript.html#tabs">on the javascript docs page</a>.</p> <h3>Tabbable in any direction</h3> <h4>Tabs on the bottom</h4> <p>Flip the order of the HTML and add a class to put tabs on the bottom.</p> - <div class="tabbable tabs-below"> - <div class="tab-content"> - <div class="tab-pane active" id="A"> - <p>I'm in Section A.</p> - </div> - <div class="tab-pane" id="B"> - <p>Howdy, I'm in Section B.</p> - </div> - <div class="tab-pane" id="C"> - <p>What up girl, this is Section C.</p> + <div class="bs-docs-example"> + <div class="tabbable tabs-below"> + <div class="tab-content"> + <div class="tab-pane active" id="A"> + <p>I'm in Section A.</p> + </div> + <div class="tab-pane" id="B"> + <p>Howdy, I'm in Section B.</p> + </div> + <div class="tab-pane" id="C"> + <p>What up girl, this is Section C.</p> + </div> </div> - </div> - <ul class="nav nav-tabs"> - <li class="active"><a href="#A" data-toggle="tab">Section 1</a></li> - <li><a href="#B" data-toggle="tab">Section 2</a></li> - <li><a href="#C" data-toggle="tab">Section 3</a></li> - </ul> - </div> <!-- /tabbable --> -<pre class="prettyprint linenums" style="margin-top: 11px;"> + <ul class="nav nav-tabs"> + <li class="active"><a href="#A" data-toggle="tab">Section 1</a></li> + <li><a href="#B" data-toggle="tab">Section 2</a></li> + <li><a href="#C" data-toggle="tab">Section 3</a></li> + </ul> + </div> <!-- /tabbable --> + </div> +<pre class="prettyprint linenums"> <div class="tabbable tabs-below"> <div class="tab-content"> ... @@ -833,24 +851,26 @@ <h4>Tabs on the left</h4> <p>Swap the class to put tabs on the left.</p> - <div class="tabbable tabs-left"> - <ul class="nav nav-tabs"> - <li class="active"><a href="#lA" data-toggle="tab">Section 1</a></li> - <li><a href="#lB" data-toggle="tab">Section 2</a></li> - <li><a href="#lC" data-toggle="tab">Section 3</a></li> - </ul> - <div class="tab-content"> - <div class="tab-pane active" id="lA"> - <p>I'm in Section A.</p> - </div> - <div class="tab-pane" id="lB"> - <p>Howdy, I'm in Section B.</p> - </div> - <div class="tab-pane" id="lC"> - <p>What up girl, this is Section C.</p> + <div class="bs-docs-example"> + <div class="tabbable tabs-left"> + <ul class="nav nav-tabs"> + <li class="active"><a href="#lA" data-toggle="tab">Section 1</a></li> + <li><a href="#lB" data-toggle="tab">Section 2</a></li> + <li><a href="#lC" data-toggle="tab">Section 3</a></li> + </ul> + <div class="tab-content"> + <div class="tab-pane active" id="lA"> + <p>I'm in Section A.</p> + </div> + <div class="tab-pane" id="lB"> + <p>Howdy, I'm in Section B.</p> + </div> + <div class="tab-pane" id="lC"> + <p>What up girl, this is Section C.</p> + </div> </div> - </div> - </div> <!-- /tabbable --> + </div> <!-- /tabbable --> + </div> <pre class="prettyprint linenums"> <div class="tabbable tabs-left"> <ul class="nav nav-tabs"> @@ -864,24 +884,26 @@ <h4>Tabs on the right</h4> <p>Swap the class to put tabs on the right.</p> - <div class="tabbable tabs-right"> - <ul class="nav nav-tabs"> - <li class="active"><a href="#rA" data-toggle="tab">Section 1</a></li> - <li><a href="#rB" data-toggle="tab">Section 2</a></li> - <li><a href="#rC" data-toggle="tab">Section 3</a></li> - </ul> - <div class="tab-content"> - <div class="tab-pane active" id="rA"> - <p>I'm in Section A.</p> - </div> - <div class="tab-pane" id="rB"> - <p>Howdy, I'm in Section B.</p> - </div> - <div class="tab-pane" id="rC"> - <p>What up girl, this is Section C.</p> + <div class="bs-docs-example"> + <div class="tabbable tabs-right"> + <ul class="nav nav-tabs"> + <li class="active"><a href="#rA" data-toggle="tab">Section 1</a></li> + <li><a href="#rB" data-toggle="tab">Section 2</a></li> + <li><a href="#rC" data-toggle="tab">Section 3</a></li> + </ul> + <div class="tab-content"> + <div class="tab-pane active" id="rA"> + <p>I'm in Section A.</p> + </div> + <div class="tab-pane" id="rB"> + <p>Howdy, I'm in Section B.</p> + </div> + <div class="tab-pane" id="rC"> + <p>What up girl, this is Section C.</p> + </div> </div> - </div> - </div> <!-- /tabbable --> + </div> <!-- /tabbable --> + </div> <pre class="prettyprint linenums"> <div class="tabbable tabs-right"> <ul class="nav nav-tabs"> @@ -903,105 +925,213 @@ <div class="page-header"> <h1>Navbar</h1> </div> - <h2>Static navbar example</h2> - <p>An example of a static (not fixed to the top) navbar with project name, navigation, and search form.</p> - <div class="navbar"> - <div class="navbar-inner"> - <div class="container"> - <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </a> - <a class="brand" href="#">Title</a> - <div class="nav-collapse"> - <ul class="nav"> - <li class="active"><a href="#">Home</a></li> - <li><a href="#">Link</a></li> - <li><a href="#">Link</a></li> - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li class="nav-header">Nav header</li> - <li><a href="#">Separated link</a></li> - <li><a href="#">One more separated link</a></li> - </ul> - </li> - </ul> - <form class="navbar-search pull-left" action=""> - <input type="text" class="search-query span2" placeholder="Search"> - </form> - <ul class="nav pull-right"> - <li><a href="#">Link</a></li> - <li class="divider-vertical"></li> - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li><a href="#">Action</a></li> - <li><a href="#">Another action</a></li> - <li><a href="#">Something else here</a></li> - <li class="divider"></li> - <li><a href="#">Separated link</a></li> - </ul> - </li> - </ul> - </div><!-- /.nav-collapse --> - </div> - </div><!-- /navbar-inner --> - </div><!-- /navbar --> - <h3>Navbar scaffolding</h3> - <p>The navbar requires only a few divs to structure it well for static or fixed display.</p> + <h2>Basic navbar</h2> + <p>To start, navbars are static (not fixed to the top) and include support for a project name and basic navigation. Place one anywhere within a <code>.container</code>, which sets the width of your site and content.</p> + <div class="bs-docs-example"> + <div class="navbar"> + <div class="navbar-inner"> + <a class="brand" href="#">Title</a> + <ul class="nav"> + <li class="active"><a href="#">Home</a></li> + <li><a href="#">Link</a></li> + <li><a href="#">Link</a></li> + </ul> + </div> + </div> + </div> <pre class="prettyprint linenums"> <div class="navbar"> <div class="navbar-inner"> - <div class="container"> - ... - </div> + <a class="brand" href="#">Title</a> + <ul class="nav"> + <li class="active"><a href="#">Home</a></li> + <li><a href="#">Link</a></li> + <li><a href="#">Link</a></li> + </ul> </div> </div> </pre> - <h3>Fixed navbar</h3> - <p>Fix the navbar to the top or bottom of the viewport with an additional class on the outermost div, <code>.navbar</code>.</p> + + + <hr class="bs-docs-separator"> + + + <h2>Navbar components</h2> + + <h3>Brand</h3> + <p>A simple link to show your brand or project name only requires an anchor tag.</p> <pre class="prettyprint linenums"> -<div class="navbar navbar-fixed-top"> - ... -</div> +<a class="brand" href="#">Project name</a> </pre> + + <h3>Nav links</h3> + <p>Nav items are simple to add via unordered lists.</p> <pre class="prettyprint linenums"> -<div class="navbar navbar-fixed-bottom"> - ... -</div> +<ul class="nav"> + <li class="active"> + <a href="#">Home</a> + </li> + <li><a href="#">Link</a></li> + <li><a href="#">Link</a></li> +</ul> </pre> - - <p>When you affix the navbar, remember to account for the hidden area underneath. Add 40px or more of padding to the <code><body></code>. Be sure to add this after the core Bootstrap CSS and before the optional responsive CSS.</p> - <h3>Brand name</h3> - <p>A simple link to show your brand or project name only requires an anchor tag.</p> + <p>You can easily add dividers to your nav links with an empty list item and a simple class. Just add this between links:</p> <pre class="prettyprint linenums"> -<a class="brand" href="#"> - Project name -</a> +<ul class="nav"> + ... + <li class="divider-vertical"></li> + ... +</ul> </pre> - <h3>Forms in navbar</h3> + + <h3>Forms</h3> <p>To properly style and position a form within the navbar, add the appropriate classes as shown below. For a default form, include <code>.navbar-form</code> and either <code>.pull-left</code> or <code>.pull-right</code> to properly align it.</p> <pre class="prettyprint linenums"> <form class="navbar-form pull-left"> <input type="text" class="span2"> </form> </pre> + + <h3>Search form</h3> <p>For a more customized search form, add <code>.navbar-search</code> to the <code>form</code> and <code>.search-query</code> to the input for specialized styles in the navbar.</p> <pre class="prettyprint linenums"> <form class="navbar-search pull-left"> <input type="text" class="search-query" placeholder="Search"> </form> </pre> - <h3>Optional responsive variation</h3> - <p>Depending on the amount of content in your topbar, you might want to implement the responsive options. To do so, wrap your nav content in a containing div, <code>.nav-collapse.collapse</code>, and add the navbar toggle button, <code>.btn-navbar</code>.</p> + + <h3>Component alignment</h3> + <p>Align nav links, search form, or text, use the <code>.pull-left</code> or <code>.pull-right</code> utility classes. Both classes will add a CSS float in the specified direction.</p> + + <h3>Using dropdowns</h3> + <p>Add dropdowns and dropups to the nav with a bit of markup and the <a href="./javascript.html#dropdowns">dropdowns javascript plugin</a>.</p> +<pre class="prettyprint linenums"> +<ul class="nav"> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown"> + Account + <b class="caret"></b> + </a> + <ul class="dropdown-menu"> + ... + </ul> + </li> +</ul> +</pre> + <p>Visit the <a href="./javascript.html#dropdowns">javascript dropdowns documentation</a> for more markup and information on calling dropdowns.</p> + + <h3>Text</h3> + <p>Wrap strings of text in an element with <code>.navbar-text</code>, usually on a <code><p></code> tag for proper leading and color.</p> + + + <hr class="bs-docs-separator"> + + + <h2>Fixed navigation</h2> + <p>Fix the navbar to the top or bottom of the viewport with an additional class on the outermost div, <code>.navbar</code>.</p> + + <h3>Fixed to top</h3> + <p>Add <code>.navbar-fixed-top</code> and remember to account for the hidden area underneath it by adding at least 40px <code>padding</code> to the <code><body></code>. Be sure to add this after the core Bootstrap CSS and before the optional responsive CSS.</p> + <div class="bs-docs-example bs-navbar-top-example"> + <div class="navbar navbar-fixed-top" style="position: absolute;"> + <div class="navbar-inner"> + <div class="container" style="width: auto; padding: 0 20px;"> + <a class="brand" href="#">Title</a> + <ul class="nav"> + <li class="active"><a href="#">Home</a></li> + <li><a href="#">Link</a></li> + <li><a href="#">Link</a></li> + </ul> + </div> + </div> + </div> + </div> +<pre class="prettyprint linenums"> +<div class="navbar navbar-fixed-top"> + ... +</div> +</pre> + + <h3>Fixed to bottom</h3> + <p>Add <code>.navbar-fixed-bottom</code> instead.</p> + <div class="bs-docs-example bs-navbar-bottom-example"> + <div class="navbar navbar-fixed-bottom" style="position: absolute;"> + <div class="navbar-inner"> + <div class="container" style="width: auto; padding: 0 20px;"> + <a class="brand" href="#">Title</a> + <ul class="nav"> + <li class="active"><a href="#">Home</a></li> + <li><a href="#">Link</a></li> + <li><a href="#">Link</a></li> + </ul> + </div> + </div> + </div> + </div> +<pre class="prettyprint linenums"> +<div class="navbar navbar-fixed-bottom"> + ... +</div> +</pre> + + + <hr class="bs-docs-separator"> + + + <h2>Responsive navbar</h2> + <p>To implement a collapsing responsive navbar, wrap your navbar content in a containing div, <code>.nav-collapse.collapse</code>, and add the navbar toggle button, <code>.btn-navbar</code>.</p> + <div class="bs-docs-example"> + <div class="navbar"> + <div class="navbar-inner"> + <div class="container"> + <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </a> + <a class="brand" href="#">Title</a> + <div class="nav-collapse"> + <ul class="nav"> + <li class="active"><a href="#">Home</a></li> + <li><a href="#">Link</a></li> + <li><a href="#">Link</a></li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li class="nav-header">Nav header</li> + <li><a href="#">Separated link</a></li> + <li><a href="#">One more separated link</a></li> + </ul> + </li> + </ul> + <form class="navbar-search pull-left" action=""> + <input type="text" class="search-query span2" placeholder="Search"> + </form> + <ul class="nav pull-right"> + <li><a href="#">Link</a></li> + <li class="divider-vertical"></li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="#">Separated link</a></li> + </ul> + </li> + </ul> + </div><!-- /.nav-collapse --> + </div> + </div><!-- /navbar-inner --> + </div><!-- /navbar --> + </div> <pre class="prettyprint linenums"> <div class="navbar"> <div class="navbar-inner"> @@ -1030,49 +1160,6 @@ <strong>Heads up!</strong> The responsive navbar requires the <a href="./javascript.html#collapse">collapse plugin</a> and <a href="./scaffolding.html#responsive">responsive Bootstrap CSS file</a>. </div> - <h3>Nav links</h3> - <p>Nav items are simple to add via unordered lists.</p> -<pre class="prettyprint linenums"> -<ul class="nav"> - <li class="active"> - <a href="#">Home</a> - </li> - <li><a href="#">Link</a></li> - <li><a href="#">Link</a></li> -</ul> -</pre> - <p>You can easily add dividers to your nav links with an empty list item and a simple class. Just add this between links:</p> -<pre class="prettyprint linenums"> -<ul class="nav"> - ... - <li class="divider-vertical"></li> - ... -</ul> -</pre> - <h3>Component alignment</h3> - <p>To align a nav, search form, or text, use the <code>.pull-left</code> or <code>.pull-right</code> utility classes. Both classes will add a CSS float in the specified direction.</p> - <h3>Adding dropdown menus</h3> - <p>Adding dropdowns and dropups to the nav is super simple, but does require the use of <a href="./javascript.html#dropdowns">our javascript plugin</a>.</p> -<pre class="prettyprint linenums"> -<ul class="nav"> - <li class="dropdown"> - <a href="#" - class="dropdown-toggle" - data-toggle="dropdown"> - Account - <b class="caret"></b> - </a> - <ul class="dropdown-menu"> - ... - </ul> - </li> -</ul> -</pre> - <p><a class="btn" href="./javascript.html#dropdowns">Get the javascript →</a></p> - <hr> - <h3>Text in the navbar</h3> - <p>Wrap strings of text in a <code><.navbar-text></code>, usually on a <code><p></code> tag for proper leading and color.</p> - </section> @@ -1084,34 +1171,26 @@ <h1>Breadcrumbs <small></small></h1> </div> - <h3>Why use them</h3> - <p>Breadcrumb navigation is used as a way to show users where they are within an app or a site, but not for primary navigation. Keep their use sparse and succinct to be most effective.</p> - - <h3>Examples</h3> + <h2>Examples</h2> <p>A single example shown as it might be displayed across multiple pages.</p> - <ul class="breadcrumb"> - <li class="active">Home</li> - </ul> - <ul class="breadcrumb"> - <li><a href="#">Home</a> <span class="divider">/</span></li> - <li class="active">Library</li> - </ul> - <ul class="breadcrumb"> - <li><a href="#">Home</a> <span class="divider">/</span></li> - <li><a href="#">Library</a> <span class="divider">/</span></li> - <li class="active">Data</li> - </ul> - - <h3>Markup</h3> - <p>HTML is your standard unordered list with links.</p> + <div class="bs-docs-example"> + <ul class="breadcrumb"> + <li class="active">Home</li> + </ul> + <ul class="breadcrumb"> + <li><a href="#">Home</a> <span class="divider">/</span></li> + <li class="active">Library</li> + </ul> + <ul class="breadcrumb" style="margin-bottom: 5px;"> + <li><a href="#">Home</a> <span class="divider">/</span></li> + <li><a href="#">Library</a> <span class="divider">/</span></li> + <li class="active">Data</li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="breadcrumb"> - <li> - <a href="#">Home</a> <span class="divider">/</span> - </li> - <li> - <a href="#">Library</a> <span class="divider">/</span> - </li> + <li><a href="#">Home</a> <span class="divider">/</span></li> + <li><a href="#">Library</a> <span class="divider">/</span></li> <li class="active">Data</li> </ul> </pre> @@ -1127,85 +1206,119 @@ <h1>Pagination <small>Two options for paging through content</small></h1> </div> - <h2>Multicon-page pagination</h2> - - <h3>When to use</h3> - <p>Ultra simplistic and minimally styled pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.</p> - <h3>Stateful page links</h3> - <p>Links are customizable and work in a number of circumstances with the right class. <code>.disabled</code> for unclickable links and <code>.active</code> for current page.</p> - <h3>Flexible alignment</h3> - <p>Add either of two optional classes to change the alignment of pagination links: <code>.pagination-centered</code> and <code>.pagination-right</code>.</p> - - <h3>Examples</h3> - <p>The default pagination component is flexible and works in a number of variations.</p> - <div class="pagination"> - <ul> - <li class="disabled"><a href="#">«</a></li> - <li class="active"><a href="#">1</a></li> - <li><a href="#">2</a></li> - <li><a href="#">3</a></li> - <li><a href="#">4</a></li> - <li><a href="#">»</a></li> - </ul> - </div> - <div class="pagination"> - <ul> - <li><a href="#">«</a></li> - <li><a href="#">10</a></li> - <li class="active"><a href="#">11</a></li> - <li><a href="#">12</a></li> - <li><a href="#">»</a></li> - </ul> - </div> - <div class="pagination"> - <ul> - <li><a href="#">«</a></li> - <li class="active"><a href="#">10</a></li> - <li class="disabled"><a href="#">...</a></li> - <li><a href="#">20</a></li> - <li><a href="#">»</a></li> - </ul> - </div> - <div class="pagination pagination-centered"> - <ul> - <li class="active"><a href="#">1</a></li> - <li><a href="#">2</a></li> - <li><a href="#">3</a></li> - <li><a href="#">4</a></li> - <li><a href="#">5</a></li> - </ul> + <h2>Standard pagination</h2> + <p>Simple pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.</p> + <div class="bs-docs-example"> + <div class="pagination"> + <ul> + <li><a href="#">«</a></li> + <li><a href="#">1</a></li> + <li><a href="#">2</a></li> + <li><a href="#">3</a></li> + <li><a href="#">4</a></li> + <li><a href="#">5</a></li> + <li><a href="#">»</a></li> + </ul> + </div> </div> - - <h3>Markup</h3> - <p>Wrapped in a <code><div></code>, pagination is just a <code><ul></code>.</p> <pre class="prettyprint linenums"> <div class="pagination"> <ul> <li><a href="#">Prev</a></li> - <li class="active"> - <a href="#">1</a> - </li> + <li><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> - <li><a href="#">Next</a></li> + <li><a href="#">Next</a></li> </ul> </div> </pre> - <h2>Pager <small>For quick previous and next links</small></h2> - <h3>About pager</h3> - <p>The pager component is a set of links for simple pagination implementations with light markup and even lighter styles. It's great for simple sites like blogs or magazines.</p> - <h4>Optional disabled state</h4> - <p>Pager links also use the general <code>.disabled</code> class from the pagination.</p> + <hr class="bs-docs-separator"> + + + <h2>Options</h2> + + <h3>Disabled and active states</h3> + <p>Links are customizable for different circumstances. Use <code>.disabled</code> for unclickable links and <code>.active</code> to indicate the current page.</p> + <div class="bs-docs-example"> + <div class="pagination pagination-centered"> + <ul> + <li class="disabled"><a href="#">«</a></li> + <li class="active"><a href="#">1</a></li> + <li><a href="#">2</a></li> + <li><a href="#">3</a></li> + <li><a href="#">4</a></li> + <li><a href="#">5</a></li> + <li><a href="#">»</a></li> + </ul> + </div> + </div> +<pre class="prettyprint linenums"> +<div class="pagination "> + <ul> + <li class="disabled"><a href="#">Prev</a></li> + <li class="active"><a href="#">1</a></li> + ... + </ul> +</div> +</pre> + + <h3>Alignment</h3> + <p>Add one of two optional classes to change the alignment of pagination links: <code>.pagination-centered</code> and <code>.pagination-right</code>.</p> + <div class="bs-docs-example"> + <div class="pagination pagination-centered"> + <ul> + <li><a href="#">«</a></li> + <li><a href="#">1</a></li> + <li><a href="#">2</a></li> + <li><a href="#">3</a></li> + <li><a href="#">4</a></li> + <li><a href="#">5</a></li> + <li><a href="#">»</a></li> + </ul> + </div> + </div> +<pre class="prettyprint linenums"> +<div class="pagination pagination-centered"> + ... +</div> +</pre> + <div class="bs-docs-example"> + <div class="pagination pagination-right"> + <ul> + <li><a href="#">«</a></li> + <li><a href="#">1</a></li> + <li><a href="#">2</a></li> + <li><a href="#">3</a></li> + <li><a href="#">4</a></li> + <li><a href="#">5</a></li> + <li><a href="#">»</a></li> + </ul> + </div> + </div> +<pre class="prettyprint linenums"> +<div class="pagination pagination-right"> + ... +</div> +</pre> + + + <hr class="bs-docs-separator"> + + + <h2>Pager</h2> + <p>Quick previous and next links for simple pagination implementations with light markup and styles. It's great for simple sites like blogs or magazines.</p> <h3>Default example</h3> <p>By default, the pager centers links.</p> - <ul class="pager"> - <li><a href="#">Previous</a></li> - <li><a href="#">Next</a></li> - </ul> + <div class="bs-docs-example"> + <ul class="pager"> + <li><a href="#">Previous</a></li> + <li><a href="#">Next</a></li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="pager"> <li> @@ -1219,10 +1332,12 @@ <h3>Aligned links</h3> <p>Alternatively, you can align each link to the sides:</p> - <ul class="pager"> - <li class="previous"><a href="#">← Older</a></li> - <li class="next"><a href="#">Newer →</a></li> - </ul> + <div class="bs-docs-example"> + <ul class="pager"> + <li class="previous"><a href="#">← Older</a></li> + <li class="next"><a href="#">Newer →</a></li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="pager"> <li class="previous"> @@ -1234,6 +1349,23 @@ </ul> </pre> + <h3>Optional disabled state</h3> + <p>Pager links also use the general <code>.disabled</code> utility class from the pagination.</p> + <div class="bs-docs-example"> + <ul class="pager"> + <li class="previous disabled"><a href="#">← Older</a></li> + <li class="next"><a href="#">Newer →</a></li> + </ul> + </div> +<pre class="prettyprint linenums"> +<ul class="pager"> + <li class="previous disabled"> + <a href="#">&larr; Older</a> + </li> + ... +</ul> +</pre> + </section> @@ -1405,11 +1537,16 @@ <div class="page-header"> <h1>Typographic components <small>Page header and hero unit for segmenting content</small></h1> </div> - <h2>Hero unit</h2> - <p>Bootstrap provides a lightweight, flexible component called a hero unit to showcase content on your site. It works well on marketing and content-heavy sites.</p> - <h3>Markup</h3> - <p>Wrap your content in a <code>div</code> like so:</p> + <h2>Hero unit</h2> + <p>A lightweight, flexible component called a hero unit to showcase content on your site. It works well on marketing and content-heavy sites.</p> + <div class="bs-docs-example"> + <div class="hero-unit"> + <h1>Hello, world!</h1> + <p>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p> + <p><a class="btn btn-primary btn-large">Learn more</a></p> + </div> + </div> <pre class="prettyprint linenums"> <div class="hero-unit"> <h1>Heading</h1> @@ -1422,16 +1559,7 @@ </div> </pre> - <div class="bs-docs-example"> - <div class="hero-unit"> - <h1>Hello, world!</h1> - <p>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p> - <p><a class="btn btn-primary btn-large">Learn more</a></p> - </div> - </div> - <h2>Page header</h2> - <p>A simple shell for an <code>h1</code> to appropriately space out and segment sections of content on a page. It can utilize the <code>h1</code>'s default <code>small</code>, element as well most other components (with additional styles).</p> <div class="bs-docs-example"> <div class="page-header"> @@ -1586,50 +1714,68 @@ <h1>Alerts <small>Styles for success, warning, and error messages</small></h1> </div> - <h2>Lightweight defaults</h2> - - <h3>Rewritten base class</h3> - <p>With Bootstrap 2, we've simplified the base class: <code>.alert</code> instead of <code>.alert-message</code>. We've also reduced the minimum required markup—no <code><p></code> is required by default, just the outer <code><div></code>.</p> - <h3>Single alert message</h3> - <p>For a more durable component with less code, we've removed the differentiating look for block alerts, messages that come with more padding and typically more text. The class also has changed to <code>.alert-block</code>.</p> - <hr> - <h3>Goes great with javascript</h3> - <p>Bootstrap comes with a great jQuery plugin that supports alert messages, making dismissing them quick and easy.</p> - <p><a class="btn js-btn" href="./javascript.html#alerts">Get the plugin »</a></p> - - <h3>Example alerts</h3> - <p>Wrap your message and an optional close icon in a div with simple class.</p> - <div class="alert"> - <button type="button" class="close" data-dismiss="alert">×</button> - <strong>Warning!</strong> Best check yo self, you're not looking too good. + <h2>Default alert</h2> + <p>Wrap any text and an optional dismiss button in <code>.alert</code> for a basic warning alert message.</p> + <div class="bs-docs-example"> + <div class="alert"> + <button type="button" class="close" data-dismiss="alert">×</button> + <strong>Warning!</strong> Best check yo self, you're not looking too good. + </div> </div> <pre class="prettyprint linenums"> <div class="alert"> - <button class="close" data-dismiss="alert">×</button> + <button type="button" class="close" data-dismiss="alert">×</button> <strong>Warning!</strong> Best check yo self, you're not looking too good. </div> </pre> - <p><span class="label label-info">Heads up!</span> iOS devices require an <code>href="#"</code> for the dismissal of alerts. Be sure to include it and the data attribute for anchor close icons. Alternatively, you may use a <code><button></code> element with the data attribute, which we have opted to do for our docs. When using <code><button></code>, you must include <code>type="button"</code> or your forms may not submit.</p> - <p>Easily extend the standard alert message with two optional classes: <code>.alert-block</code> for more padding and text controls and <code>.alert-heading</code> for a matching heading.</p> - <div class="alert alert-block"> - <button type="button" class="close" data-dismiss="alert">×</button> - <h4 class="alert-heading">Warning!</h4> - <p>Best check yo self, you're not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p> + + <h3>Dismiss buttons</h3> + <p>Mobile Safari and Mobile Opera browsers, in addition to the <code>data-dismiss="alert"</code> attribute, require an <code>href="#"</code> for the dismissal of alerts when using an <code><a></code> tag.</p> +<pre class="prettyprint linenums"> +<a href="#" class="close" data-dismiss="alert">×</button> +</pre> + <p>Alternatively, you may use a <code><button></code> element with the data attribute, which we have opted to do for our docs. When using <code><button></code>, you must include <code>type="button"</code> or your forms may not submit.</p> +<pre class="prettyprint linenums"> +<button type="button" class="close" data-dismiss="alert">×</button> +</pre> + + <h3>Dismiss alerts via javascript</h3> + <p>Use the <a href="./javascript.html#alerts">alerts jQuery plugin</a> for quick and easy dismissal of alerts.</p> + + + <hr class="bs-docs-separator"> + + + <h2>Options</h2> + <p>For longer messages, increase the padding on the top and bottom of the alert wrapper by adding <code>.alert-block</code>.</p> + <div class="bs-docs-example"> + <div class="alert alert-block"> + <button type="button" class="close" data-dismiss="alert">×</button> + <h4>Warning!</h4> + <p>Best check yo self, you're not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p> + </div> </div> <pre class="prettyprint linenums"> <div class="alert alert-block"> - <a class="close" data-dismiss="alert" href="#">×</a> - <h4 class="alert-heading">Warning!</h4> + <a class="close" data-dismiss="alert" href="#">&times;</a> + <h4>Warning!</h4> Best check yo self, you're not... </div> </pre> - <h2>Contextual alternatives <small>Add optional classes to change an alert's connotation</small></h2> + + <hr class="bs-docs-separator"> + + + <h2>Contextual alternatives</h2> + <p>Add optional classes to change an alert's connotation.</p> <h3>Error or danger</h3> - <div class="alert alert-error"> - <button type="button" class="close" data-dismiss="alert">×</button> - <strong>Oh snap!</strong> Change a few things up and try submitting again. + <div class="bs-docs-example"> + <div class="alert alert-error"> + <button type="button" class="close" data-dismiss="alert">×</button> + <strong>Oh snap!</strong> Change a few things up and try submitting again. + </div> </div> <pre class="prettyprint linenums"> <div class="alert alert-error"> @@ -1638,9 +1784,11 @@ </pre> <h3>Success</h3> - <div class="alert alert-success"> - <button type="button" class="close" data-dismiss="alert">×</button> - <strong>Well done!</strong> You successfully read this important alert message. + <div class="bs-docs-example"> + <div class="alert alert-success"> + <button type="button" class="close" data-dismiss="alert">×</button> + <strong>Well done!</strong> You successfully read this important alert message. + </div> </div> <pre class="prettyprint linenums"> <div class="alert alert-success"> @@ -1649,9 +1797,11 @@ </pre> <h3>Information</h3> - <div class="alert alert-info"> - <button type="button" class="close" data-dismiss="alert">×</button> - <strong>Heads up!</strong> This alert needs your attention, but it's not super important. + <div class="bs-docs-example"> + <div class="alert alert-info"> + <button type="button" class="close" data-dismiss="alert">×</button> + <strong>Heads up!</strong> This alert needs your attention, but it's not super important. + </div> </div> <pre class="prettyprint linenums"> <div class="alert alert-info"> @@ -1674,78 +1824,116 @@ <h3>Basic</h3> <p>Default progress bar with a vertical gradient.</p> - <div class="progress"> - <div class="bar" style="width: 60%;"></div> + <div class="bs-docs-example"> + <div class="progress"> + <div class="bar" style="width: 60%;"></div> + </div> </div> <pre class="prettyprint linenums"> <div class="progress"> - <div class="bar" - style="width: 60%;"></div> + <div class="bar" style="width: 60%;"></div> </div> </pre> <h3>Striped</h3> - <p>Uses a gradient to create a striped effect (no IE).</p> - <div class="progress progress-striped"> - <div class="bar" style="width: 20%;"></div> + <p>Uses a gradient to create a striped effect. Not available in IE7-8.</p> + <div class="bs-docs-example"> + <div class="progress progress-striped"> + <div class="bar" style="width: 20%;"></div> + </div> </div> <pre class="prettyprint linenums"> <div class="progress progress-striped"> - <div class="bar" - style="width: 20%;"></div> + <div class="bar" style="width: 20%;"></div> </div> </pre> <h3>Animated</h3> - <p>Takes the striped example and animates it (no IE).</p> - <div class="progress progress-striped active"> - <div class="bar" style="width: 45%"></div> + <p>Add <code>.active</code> to <code>.progress-striped</code> to animate the stripes right to left. Not available in all versions of IE.</p> + <div class="bs-docs-example"> + <div class="progress progress-striped active"> + <div class="bar" style="width: 45%"></div> + </div> </div> <pre class="prettyprint linenums"> -<div class="progress progress-striped - active"> - <div class="bar" - style="width: 40%;"></div> +<div class="progress progress-striped active"> + <div class="bar" style="width: 40%;"></div> </div> </pre> - <h2>Options and browser support</h2> + + <hr class="bs-docs-separator"> + + + <h2>Options</h2> <h3>Additional colors</h3> <p>Progress bars use some of the same button and alert classes for consistent styles.</p> - <div class="progress progress-info" style="margin-bottom: 9px;"> - <div class="bar" style="width: 20%"></div> - </div> - <div class="progress progress-success" style="margin-bottom: 9px;"> - <div class="bar" style="width: 40%"></div> - </div> - <div class="progress progress-warning" style="margin-bottom: 9px;"> - <div class="bar" style="width: 60%"></div> - </div> - <div class="progress progress-danger" style="margin-bottom: 9px;"> - <div class="bar" style="width: 80%"></div> + <div class="bs-docs-example"> + <div class="progress progress-info" style="margin-bottom: 9px;"> + <div class="bar" style="width: 20%"></div> + </div> + <div class="progress progress-success" style="margin-bottom: 9px;"> + <div class="bar" style="width: 40%"></div> + </div> + <div class="progress progress-warning" style="margin-bottom: 9px;"> + <div class="bar" style="width: 60%"></div> + </div> + <div class="progress progress-danger"> + <div class="bar" style="width: 80%"></div> + </div> </div> +<pre class="prettyprint linenums"> +<div class="progress progress-info"> + <div class="bar" style="width: 20%"></div> +</div> +<div class="progress progress-success"> + <div class="bar" style="width: 40%"></div> +</div> +<div class="progress progress-warning"> + <div class="bar" style="width: 60%"></div> +</div> +<div class="progress progress-danger"> + <div class="bar" style="width: 80%"></div> +</div> +</pre> <h3>Striped bars</h3> <p>Similar to the solid colors, we have varied striped progress bars.</p> - <div class="progress progress-info progress-striped" style="margin-bottom: 9px;"> - <div class="bar" style="width: 20%"></div> - </div> - <div class="progress progress-success progress-striped" style="margin-bottom: 9px;"> - <div class="bar" style="width: 40%"></div> - </div> - <div class="progress progress-warning progress-striped" style="margin-bottom: 9px;"> - <div class="bar" style="width: 60%"></div> - </div> - <div class="progress progress-danger progress-striped" style="margin-bottom: 9px;"> - <div class="bar" style="width: 80%"></div> + <div class="bs-docs-example"> + <div class="progress progress-info progress-striped" style="margin-bottom: 9px;"> + <div class="bar" style="width: 20%"></div> + </div> + <div class="progress progress-success progress-striped" style="margin-bottom: 9px;"> + <div class="bar" style="width: 40%"></div> + </div> + <div class="progress progress-warning progress-striped" style="margin-bottom: 9px;"> + <div class="bar" style="width: 60%"></div> + </div> + <div class="progress progress-danger progress-striped"> + <div class="bar" style="width: 80%"></div> + </div> </div> +<pre class="prettyprint linenums"> +<div class="progress progress-info progress-striped"> + <div class="bar" style="width: 20%"></div> +</div> +<div class="progress progress-success progress-striped"> + <div class="bar" style="width: 40%"></div> +</div> +<div class="progress progress-warning progress-striped"> + <div class="bar" style="width: 60%"></div> +</div> +<div class="progress progress-danger progress-striped"> + <div class="bar" style="width: 80%"></div> +</div> +</pre> + - <h3>Behavior</h3> - <p>Progress bars use CSS3 transitions, so if you dynamically adjust the width via javascript, it will smoothly resize.</p> - <p>If you use the <code>.active</code> class, your <code>.progress-striped</code> progress bars will animate the stripes left to right.</p> + <hr class="bs-docs-separator"> - <h3>Browser support</h3> + + <h2>Browser support</h2> <p>Progress bars use CSS3 gradients, transitions, and animations to achieve all their effects. These features are not supported in IE7-9 or older versions of Firefox.</p> <p>Opera and IE do not support animations at this time.</p> @@ -1764,21 +1952,33 @@ <h2>Wells</h2> <p>Use the well as a simple effect on an element to give it an inset effect.</p> - <div class="well"> - Look, I'm in a well! + <div class="bs-docs-example"> + <div class="well"> + Look, I'm in a well! + </div> </div> <pre class="prettyprint linenums"> <div class="well"> ... </div> </pre> - <h4>Optional classes</h4> + <h3>Optional classes</h3> <p>Control padding and rounded corners with two optional modifier classes.</p> + <div class="bs-docs-example"> + <div class="well well-large"> + Look, I'm in a well! + </div> + </div> <pre class="prettyprint linenums"> <div class="well well-large"> ... </div> </pre> + <div class="bs-docs-example"> + <div class="well well-small"> + Look, I'm in a well! + </div> + </div> <pre class="prettyprint linenums"> <div class="well well-small"> ... @@ -1786,7 +1986,9 @@ </pre> <h2>Close icon</h2> <p>Use the generic close icon for dismissing content like modals and alerts.</p> - <p><button class="close" style="float: none;">×</button></p> + <div class="bs-docs-example"> + <p><button class="close" style="float: none;">×</button></p> + </div> <pre class="prettyprint linenums"><button class="close">&times;</button></pre> <p>iOS devices require an href="#" for click events if you rather use an anchor.</p> <pre class="prettyprint linenums"><a class="close" href="#">&times;</a></pre> @@ -1858,7 +2060,7 @@ class="clearfix" <p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> </footer> - </div><!-- /container --> + </div> diff --git a/docs/download.html b/docs/download.html index 20e8605591..83097b3d16 100644 --- a/docs/download.html +++ b/docs/download.html @@ -27,84 +27,50 @@ </head> - <body> + <body data-spy="scroll" data-target=".subnav" data-offset="50"> - <div class="bs-docs-nav"> - <h3 class="bs-docs-logo"><a href="./index.html">Bootstrap</a></h3> - <ul class="bs-nav"> - <li class=""> - <a href="./scaffolding.html">Scaffolding</a> - <ul> - <li><a href="./scaffolding.html#global">Global styles</a></li> - <li><a href="./scaffolding.html#gridSystem">Grid system</a></li> - <li><a href="./scaffolding.html#fluidGridSystem">Fluid grid system</a></li> - <li><a href="./scaffolding.html#gridCustomization">Customizing</a></li> - <li><a href="./scaffolding.html#layouts">Layouts</a></li> - <li><a href="./scaffolding.html#responsive">Responsive design</a></li> - </ul> - </li> - <li class=""> - <a href="./base-css.html">Base CSS</a> - <ul> - <li><a href="./base-css.html#typography">Typography</a></li> - <li><a href="./base-css.html#code">Code</a></li> - <li><a href="./base-css.html#tables">Tables</a></li> - <li><a href="./base-css.html#forms">Forms</a></li> - <li><a href="./base-css.html#buttons">Buttons</a></li> - <li><a href="./base-css.html#icons">Icons by Glyphicons</a></li> - </ul> - </li> - <li class=""> - <a href="./components.html">Components</a> - <ul> - <li><a href="./components.html#buttonGroups">Button groups</a></li> - <li><a href="./components.html#buttonDropdowns">Button dropdowns</a></li> - <li><a href="./components.html#navs">Nav, tabs, pills</a></li> - <li><a href="./components.html#navbar">Navbar</a></li> - <li><a href="./components.html#breadcrumbs">Breadcrumbs</a></li> - <li><a href="./components.html#pagination">Pagination</a></li> - <li><a href="./components.html#labels">Labels</a></li> - <li><a href="./components.html#badges">Badges</a></li> - <li><a href="./components.html#typography">Typography</a></li> - <li><a href="./components.html#thumbnails">Thumbnails</a></li> - <li><a href="./components.html#alerts">Alerts</a></li> - <li><a href="./components.html#progress">Progress bars</a></li> - <li><a href="./components.html#misc">Miscellaneous</a></li> - </ul> - </li> - <li class=""> - <a href="./javascript.html">Javascript</a> - <ul> - <li><a href="./javascript.html#javascript">All plugins</a></li> - <li><a href="./javascript.html#modals">Modal</a></li> - <li><a href="./javascript.html#dropdowns">Dropdown</a></li> - <li><a href="./javascript.html#scrollspy">Scrollspy</a></li> - <li><a href="./javascript.html#tabs">Tab</a></li> - <li><a href="./javascript.html#tooltips">Tooltip</a></li> - <li><a href="./javascript.html#popovers">Popover</a></li> - <li><a href="./javascript.html#alerts">Alert</a></li> - <li><a href="./javascript.html#buttons">Button</a></li> - <li><a href="./javascript.html#collapse">Collapse</a></li> - <li><a href="./javascript.html#carousel">Carousel</a></li> - <li><a href="./javascript.html#typeahead">Typeahead</a></li> - </ul> - </li> - <li class=""> - <a href="./less.html">LESS</a> - <ul> - <li><a href="./less.html#builtWith">Built with Less</a></li> - <li><a href="./less.html#variables">Variables</a></li> - <li><a href="./less.html#mixins">Mixins</a></li> - <li><a href="./less.html#compiling">Compiling Bootstrap</a></li> - </ul> - </li> - <li class="active"> - <a href="./download.html">Customize</a> - </li> - <li class=""> - <a href="./examples.html">Examples</a> - </li> - </ul> + <!-- Navbar + ================================================== --> + <div class="navbar navbar-fixed-top"> + <div class="navbar-inner"> + <div class="bs-docs-container"> + <button type="button"class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="brand" href="./index.html">Bootstrap</a> + <div class="nav-collapse collapse"> + <ul class="nav"> + <li class=""> + <a href="./index.html">Home</a> + </li> + <li class=""> + <a href="./scaffolding.html">Scaffolding</a> + </li> + <li class=""> + <a href="./base-css.html">Base CSS</a> + </li> + <li class=""> + <a href="./components.html">Components</a> + </li> + <li class=""> + <a href="./javascript.html">Javascript</a> + </li> + <li class=""> + <a href="./less.html">LESS</a> + </li> + <li class="divider-vertical"></li> + <li class="active"> + <a href="./download.html">Customize</a> + </li> + <li class=""> + <a href="./examples.html">Examples</a> + </li> + </ul> + </div> + </div> + </div> </div> <div class="bs-docs-container"> @@ -114,22 +80,18 @@ <header class="jumbotron subhead" id="overview"> <h1>Customize and download</h1> <p class="lead"><a href="https://github.com/twitter/bootstrap/zipball/master">Download the full repository</a> or customize your entire Bootstrap build by selecting only the components, javascript plugins, and assets you need.</p> + <div class="subnav"> + <ul class="nav nav-pills"> + <li><a href="#components">1. Choose components</a></li> + <li><a href="#plugins">2. Select jQuery plugins</a></li> + <li><a href="#variables">3. Customize variables</a></li> + <li><a href="#download">4. Download</a></li> + </ul> + </div> </header> -<section id="contents"> - <div class="bs-docs-contents"> - <h3>Contents</h3> - <ol> - <li><a href="#components">Choose components</a></li> - <li><a href="#plugins">Select jQuery plugins</a></li> - <li><a href="#variables">Customize variables</a></li> - <li><a href="#download">Download</a></li> - </ol> - </div> -</section> - <form> <section class="download" id="components"> <div class="page-header"> @@ -466,7 +428,7 @@ <p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> </footer> - </div><!-- /container --> + </div> diff --git a/docs/examples.html b/docs/examples.html index 374b69ef62..3c4b69169b 100644 --- a/docs/examples.html +++ b/docs/examples.html @@ -27,84 +27,50 @@ </head> - <body> - - <div class="bs-docs-nav"> - <h3 class="bs-docs-logo"><a href="./index.html">Bootstrap</a></h3> - <ul class="bs-nav"> - <li class=""> - <a href="./scaffolding.html">Scaffolding</a> - <ul> - <li><a href="./scaffolding.html#global">Global styles</a></li> - <li><a href="./scaffolding.html#gridSystem">Grid system</a></li> - <li><a href="./scaffolding.html#fluidGridSystem">Fluid grid system</a></li> - <li><a href="./scaffolding.html#gridCustomization">Customizing</a></li> - <li><a href="./scaffolding.html#layouts">Layouts</a></li> - <li><a href="./scaffolding.html#responsive">Responsive design</a></li> - </ul> - </li> - <li class=""> - <a href="./base-css.html">Base CSS</a> - <ul> - <li><a href="./base-css.html#typography">Typography</a></li> - <li><a href="./base-css.html#code">Code</a></li> - <li><a href="./base-css.html#tables">Tables</a></li> - <li><a href="./base-css.html#forms">Forms</a></li> - <li><a href="./base-css.html#buttons">Buttons</a></li> - <li><a href="./base-css.html#icons">Icons by Glyphicons</a></li> - </ul> - </li> - <li class=""> - <a href="./components.html">Components</a> - <ul> - <li><a href="./components.html#buttonGroups">Button groups</a></li> - <li><a href="./components.html#buttonDropdowns">Button dropdowns</a></li> - <li><a href="./components.html#navs">Nav, tabs, pills</a></li> - <li><a href="./components.html#navbar">Navbar</a></li> - <li><a href="./components.html#breadcrumbs">Breadcrumbs</a></li> - <li><a href="./components.html#pagination">Pagination</a></li> - <li><a href="./components.html#labels">Labels</a></li> - <li><a href="./components.html#badges">Badges</a></li> - <li><a href="./components.html#typography">Typography</a></li> - <li><a href="./components.html#thumbnails">Thumbnails</a></li> - <li><a href="./components.html#alerts">Alerts</a></li> - <li><a href="./components.html#progress">Progress bars</a></li> - <li><a href="./components.html#misc">Miscellaneous</a></li> - </ul> - </li> - <li class=""> - <a href="./javascript.html">Javascript</a> - <ul> - <li><a href="./javascript.html#javascript">All plugins</a></li> - <li><a href="./javascript.html#modals">Modal</a></li> - <li><a href="./javascript.html#dropdowns">Dropdown</a></li> - <li><a href="./javascript.html#scrollspy">Scrollspy</a></li> - <li><a href="./javascript.html#tabs">Tab</a></li> - <li><a href="./javascript.html#tooltips">Tooltip</a></li> - <li><a href="./javascript.html#popovers">Popover</a></li> - <li><a href="./javascript.html#alerts">Alert</a></li> - <li><a href="./javascript.html#buttons">Button</a></li> - <li><a href="./javascript.html#collapse">Collapse</a></li> - <li><a href="./javascript.html#carousel">Carousel</a></li> - <li><a href="./javascript.html#typeahead">Typeahead</a></li> - </ul> - </li> - <li class=""> - <a href="./less.html">LESS</a> - <ul> - <li><a href="./less.html#builtWith">Built with Less</a></li> - <li><a href="./less.html#variables">Variables</a></li> - <li><a href="./less.html#mixins">Mixins</a></li> - <li><a href="./less.html#compiling">Compiling Bootstrap</a></li> - </ul> - </li> - <li class=""> - <a href="./download.html">Customize</a> - </li> - <li class="active"> - <a href="./examples.html">Examples</a> - </li> - </ul> + <body data-spy="scroll" data-target=".subnav" data-offset="50"> + + <!-- Navbar + ================================================== --> + <div class="navbar navbar-fixed-top"> + <div class="navbar-inner"> + <div class="bs-docs-container"> + <button type="button"class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="brand" href="./index.html">Bootstrap</a> + <div class="nav-collapse collapse"> + <ul class="nav"> + <li class=""> + <a href="./index.html">Home</a> + </li> + <li class=""> + <a href="./scaffolding.html">Scaffolding</a> + </li> + <li class=""> + <a href="./base-css.html">Base CSS</a> + </li> + <li class=""> + <a href="./components.html">Components</a> + </li> + <li class=""> + <a href="./javascript.html">Javascript</a> + </li> + <li class=""> + <a href="./less.html">LESS</a> + </li> + <li class="divider-vertical"></li> + <li class=""> + <a href="./download.html">Customize</a> + </li> + <li class="active"> + <a href="./examples.html">Examples</a> + </li> + </ul> + </div> + </div> + </div> </div> <div class="bs-docs-container"> @@ -151,7 +117,7 @@ <p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> </footer> - </div><!-- /container --> + </div> diff --git a/docs/index.html b/docs/index.html index ccba2ee61b..4e2de4da5f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -27,84 +27,50 @@ </head> - <body> + <body data-spy="scroll" data-target=".subnav" data-offset="50"> - <div class="bs-docs-nav"> - <h3 class="bs-docs-logo"><a href="./index.html">Bootstrap</a></h3> - <ul class="bs-nav"> - <li class=""> - <a href="./scaffolding.html">Scaffolding</a> - <ul> - <li><a href="./scaffolding.html#global">Global styles</a></li> - <li><a href="./scaffolding.html#gridSystem">Grid system</a></li> - <li><a href="./scaffolding.html#fluidGridSystem">Fluid grid system</a></li> - <li><a href="./scaffolding.html#gridCustomization">Customizing</a></li> - <li><a href="./scaffolding.html#layouts">Layouts</a></li> - <li><a href="./scaffolding.html#responsive">Responsive design</a></li> - </ul> - </li> - <li class=""> - <a href="./base-css.html">Base CSS</a> - <ul> - <li><a href="./base-css.html#typography">Typography</a></li> - <li><a href="./base-css.html#code">Code</a></li> - <li><a href="./base-css.html#tables">Tables</a></li> - <li><a href="./base-css.html#forms">Forms</a></li> - <li><a href="./base-css.html#buttons">Buttons</a></li> - <li><a href="./base-css.html#icons">Icons by Glyphicons</a></li> - </ul> - </li> - <li class=""> - <a href="./components.html">Components</a> - <ul> - <li><a href="./components.html#buttonGroups">Button groups</a></li> - <li><a href="./components.html#buttonDropdowns">Button dropdowns</a></li> - <li><a href="./components.html#navs">Nav, tabs, pills</a></li> - <li><a href="./components.html#navbar">Navbar</a></li> - <li><a href="./components.html#breadcrumbs">Breadcrumbs</a></li> - <li><a href="./components.html#pagination">Pagination</a></li> - <li><a href="./components.html#labels">Labels</a></li> - <li><a href="./components.html#badges">Badges</a></li> - <li><a href="./components.html#typography">Typography</a></li> - <li><a href="./components.html#thumbnails">Thumbnails</a></li> - <li><a href="./components.html#alerts">Alerts</a></li> - <li><a href="./components.html#progress">Progress bars</a></li> - <li><a href="./components.html#misc">Miscellaneous</a></li> - </ul> - </li> - <li class=""> - <a href="./javascript.html">Javascript</a> - <ul> - <li><a href="./javascript.html#javascript">All plugins</a></li> - <li><a href="./javascript.html#modals">Modal</a></li> - <li><a href="./javascript.html#dropdowns">Dropdown</a></li> - <li><a href="./javascript.html#scrollspy">Scrollspy</a></li> - <li><a href="./javascript.html#tabs">Tab</a></li> - <li><a href="./javascript.html#tooltips">Tooltip</a></li> - <li><a href="./javascript.html#popovers">Popover</a></li> - <li><a href="./javascript.html#alerts">Alert</a></li> - <li><a href="./javascript.html#buttons">Button</a></li> - <li><a href="./javascript.html#collapse">Collapse</a></li> - <li><a href="./javascript.html#carousel">Carousel</a></li> - <li><a href="./javascript.html#typeahead">Typeahead</a></li> - </ul> - </li> - <li class=""> - <a href="./less.html">LESS</a> - <ul> - <li><a href="./less.html#builtWith">Built with Less</a></li> - <li><a href="./less.html#variables">Variables</a></li> - <li><a href="./less.html#mixins">Mixins</a></li> - <li><a href="./less.html#compiling">Compiling Bootstrap</a></li> - </ul> - </li> - <li class=""> - <a href="./download.html">Customize</a> - </li> - <li class=""> - <a href="./examples.html">Examples</a> - </li> - </ul> + <!-- Navbar + ================================================== --> + <div class="navbar navbar-fixed-top"> + <div class="navbar-inner"> + <div class="bs-docs-container"> + <button type="button"class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="brand" href="./index.html">Bootstrap</a> + <div class="nav-collapse collapse"> + <ul class="nav"> + <li class="active"> + <a href="./index.html">Home</a> + </li> + <li class=""> + <a href="./scaffolding.html">Scaffolding</a> + </li> + <li class=""> + <a href="./base-css.html">Base CSS</a> + </li> + <li class=""> + <a href="./components.html">Components</a> + </li> + <li class=""> + <a href="./javascript.html">Javascript</a> + </li> + <li class=""> + <a href="./less.html">LESS</a> + </li> + <li class="divider-vertical"></li> + <li class=""> + <a href="./download.html">Customize</a> + </li> + <li class=""> + <a href="./examples.html">Examples</a> + </li> + </ul> + </div> + </div> + </div> </div> <div class="bs-docs-container"> @@ -152,7 +118,7 @@ <h1>Designed for everyone, everywhere.</h1> <p class="marketing-byline">Need reasons to love Bootstrap? Look no further.</p> <div class="row"> - <div class="span4"> + <div class="span5"> <img class="bs-icon" src="assets/img/glyphicons/glyphicons_042_group.png"> <h2>Built for and by nerds</h2> <p>We love building awesome products on the web just like you, so we made Bootstrap. No matter your skill level, use it as a complete kit or use to start something more complex.</p> @@ -169,7 +135,7 @@ <h2>Responsive design</h2> <p>As of Bootstrap 2, our components are scaled according to a range of resolutions and devices to provide a consistent experience, no matter what.</p> </div> - <div class="span4"> + <div class="span5"> <img class="bs-icon" src="assets/img/glyphicons/glyphicons_266_book_open.png"> <h2>Styleguide docs</h2> <p>Unlike other front-end toolkits, Bootstrap was designed first and foremost as a styleguide to document not only our features, but best practices and living, coded examples.</p> @@ -193,27 +159,27 @@ <h1>Built with Bootstrap.</h1> <p class="marketing-byline">For even more sites built with Bootstrap, <a href="http://builtwithbootstrap.tumblr.com/" target="_blank">visit the unofficial Tumblr</a> or <a href="./examples.html">browse the examples</a>.</p> <ul class="thumbnails example-sites"> - <li class="span2"> + <li class="span3"> <a class="thumbnail" href="http://soundready.fm/" target="_blank"> <img src="assets/img/example-sites/soundready.png" alt="SoundReady.fm"> </a> </li> - <li class="span2"> + <li class="span3"> <a class="thumbnail" href="http://kippt.com/" target="_blank"> <img src="assets/img/example-sites/kippt.png" alt="Kippt"> </a> </li> - <li class="span2"> + <li class="span3"> <a class="thumbnail" href="http://www.fleetio.com/" target="_blank"> <img src="assets/img/example-sites/fleetio.png" alt="Fleetio"> </a> </li> - <li class="span2"> +<!-- <li class="span2"> <a class="thumbnail" href="http://www.jshint.com/" target="_blank"> <img src="assets/img/example-sites/jshint.png" alt="JS Hint"> </a> </li> - </ul> + --> </ul> </div><!-- /.marketing --> @@ -227,7 +193,7 @@ <p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> </footer> - </div><!-- /container --> + </div> diff --git a/docs/javascript.html b/docs/javascript.html index d21ca2d616..90079292b4 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -27,84 +27,50 @@ </head> - <body> - - <div class="bs-docs-nav"> - <h3 class="bs-docs-logo"><a href="./index.html">Bootstrap</a></h3> - <ul class="bs-nav"> - <li class=""> - <a href="./scaffolding.html">Scaffolding</a> - <ul> - <li><a href="./scaffolding.html#global">Global styles</a></li> - <li><a href="./scaffolding.html#gridSystem">Grid system</a></li> - <li><a href="./scaffolding.html#fluidGridSystem">Fluid grid system</a></li> - <li><a href="./scaffolding.html#gridCustomization">Customizing</a></li> - <li><a href="./scaffolding.html#layouts">Layouts</a></li> - <li><a href="./scaffolding.html#responsive">Responsive design</a></li> - </ul> - </li> - <li class=""> - <a href="./base-css.html">Base CSS</a> - <ul> - <li><a href="./base-css.html#typography">Typography</a></li> - <li><a href="./base-css.html#code">Code</a></li> - <li><a href="./base-css.html#tables">Tables</a></li> - <li><a href="./base-css.html#forms">Forms</a></li> - <li><a href="./base-css.html#buttons">Buttons</a></li> - <li><a href="./base-css.html#icons">Icons by Glyphicons</a></li> - </ul> - </li> - <li class=""> - <a href="./components.html">Components</a> - <ul> - <li><a href="./components.html#buttonGroups">Button groups</a></li> - <li><a href="./components.html#buttonDropdowns">Button dropdowns</a></li> - <li><a href="./components.html#navs">Nav, tabs, pills</a></li> - <li><a href="./components.html#navbar">Navbar</a></li> - <li><a href="./components.html#breadcrumbs">Breadcrumbs</a></li> - <li><a href="./components.html#pagination">Pagination</a></li> - <li><a href="./components.html#labels">Labels</a></li> - <li><a href="./components.html#badges">Badges</a></li> - <li><a href="./components.html#typography">Typography</a></li> - <li><a href="./components.html#thumbnails">Thumbnails</a></li> - <li><a href="./components.html#alerts">Alerts</a></li> - <li><a href="./components.html#progress">Progress bars</a></li> - <li><a href="./components.html#misc">Miscellaneous</a></li> - </ul> - </li> - <li class="active"> - <a href="./javascript.html">Javascript</a> - <ul> - <li><a href="./javascript.html#javascript">All plugins</a></li> - <li><a href="./javascript.html#modals">Modal</a></li> - <li><a href="./javascript.html#dropdowns">Dropdown</a></li> - <li><a href="./javascript.html#scrollspy">Scrollspy</a></li> - <li><a href="./javascript.html#tabs">Tab</a></li> - <li><a href="./javascript.html#tooltips">Tooltip</a></li> - <li><a href="./javascript.html#popovers">Popover</a></li> - <li><a href="./javascript.html#alerts">Alert</a></li> - <li><a href="./javascript.html#buttons">Button</a></li> - <li><a href="./javascript.html#collapse">Collapse</a></li> - <li><a href="./javascript.html#carousel">Carousel</a></li> - <li><a href="./javascript.html#typeahead">Typeahead</a></li> - </ul> - </li> - <li class=""> - <a href="./less.html">LESS</a> - <ul> - <li><a href="./less.html#builtWith">Built with Less</a></li> - <li><a href="./less.html#variables">Variables</a></li> - <li><a href="./less.html#mixins">Mixins</a></li> - <li><a href="./less.html#compiling">Compiling Bootstrap</a></li> - </ul> - </li> - <li class=""> - <a href="./download.html">Customize</a> - </li> - <li class=""> - <a href="./examples.html">Examples</a> - </li> - </ul> + <body data-spy="scroll" data-target=".subnav" data-offset="50"> + + <!-- Navbar + ================================================== --> + <div class="navbar navbar-fixed-top"> + <div class="navbar-inner"> + <div class="bs-docs-container"> + <button type="button"class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="brand" href="./index.html">Bootstrap</a> + <div class="nav-collapse collapse"> + <ul class="nav"> + <li class=""> + <a href="./index.html">Home</a> + </li> + <li class=""> + <a href="./scaffolding.html">Scaffolding</a> + </li> + <li class=""> + <a href="./base-css.html">Base CSS</a> + </li> + <li class=""> + <a href="./components.html">Components</a> + </li> + <li class="active"> + <a href="./javascript.html">Javascript</a> + </li> + <li class=""> + <a href="./less.html">LESS</a> + </li> + <li class="divider-vertical"></li> + <li class=""> + <a href="./download.html">Customize</a> + </li> + <li class=""> + <a href="./examples.html">Examples</a> + </li> + </ul> + </div> + </div> + </div> </div> <div class="bs-docs-container"> @@ -114,73 +80,54 @@ <header class="jumbotron subhead" id="overview"> <h1>Javascript for Bootstrap</h1> <p class="lead">Bring Bootstrap's components to life—now with 12 custom <a href="http://jquery.com/" target="_blank">jQuery</a> plugins. + <div class="subnav"> + <ul class="nav nav-pills"> + <li><a href="#modals">Modal</a></li> + <li><a href="#dropdowns">Dropdown</a></li> + <li><a href="#scrollspy">Scrollspy</a></li> + <li><a href="#tabs">Tab</a></li> + <li><a href="#tooltips">Tooltip</a></li> + <li><a href="#popovers">Popover</a></li> + <li><a href="#alerts">Alert</a></li> + <li><a href="#buttons">Button</a></li> + <li><a href="#collapse">Collapse</a></li> + <li><a href="#carousel">Carousel</a></li> + <li><a href="#typeahead">Typeahead</a></li> + </ul> + </div> </header> - <!-- Using Javascript w/ Bootstrap - ================================================== --> - <section id="javascript"> - <div class="page-header"> - <h1>jQuery plugins <small>A dozen Bootstrap plugins to get you started</small></h1> - </div> - <div class="row"> - <div class="span4"> - <h3><a href="./javascript.html#modals">Modals</a></h3> - <p>A streamlined, but flexible, take on the traditional javascript modal plugin with only the minimum required functionality and smart defaults.</p> - </div> - <div class="span4"> - <h3><a href="./javascript.html#dropdowns">Dropdowns</a></h3> - <p>Add dropdown menus to nearly anything in Bootstrap with this simple plugin. Bootstrap features full dropdown menu support on in the navbar, tabs, and pills.</p> - </div> - <div class="span4"> - <h3><a href="./javascript.html#scrollspy">Scrollspy</a></h3> - <p>Use scrollspy to automatically update the links in your navbar to show the current active link based on scroll position.</p> - </div> - <div class="span4"> - <h3><a href="./javascript.html#tabs">Togglable tabs</a></h3> - <p>Use this plugin to make tabs and pills more useful by allowing them to toggle through tabbable panes of local content.</p> - </div> - </div> <!-- /row --> - <div class="row"> - <div class="span4"> - <h3><a href="./javascript.html#tooltips">Tooltips</a></h3> - <p>A new take on the jQuery Tipsy plugin, Tooltips don't rely on images—they use CSS3 for animations and data-attributes for local title storage.</p> - </div> - <div class="span4"> - <h3><a href="./javascript.html#popovers">Popovers</a> <small class="muted">*</small></h3> - <p>Add small overlays of content, like those on the iPad, to any element for housing secondary information.</p> - <p class="muted"><strong>*</strong> Requires <a href="#tooltips">Tooltips</a> to be included</p> - </div> - <div class="span4"> - <h3><a href="./javascript.html#alerts">Alert messages</a></h3> - <p>The alert plugin is a tiny class for adding close functionality to alerts.</p> - </div> - <div class="span4"> - <h3><a href="./javascript.html#buttons">Buttons</a></h3> - <p>Do more with buttons. Control button states or create groups of buttons for more components like toolbars.</p> - </div> - </div> <!-- /row --> - <div class="row" style="margin-bottom: 9px;"> - <div class="span4"> - <h3><a href="./javascript.html#collapse">Collapse</a></h3> - <p>Get base styles and flexible support for collapsible components like accordions and navigation.</p> - </div> - <div class="span4"> - <h3><a href="./javascript.html#carousel">Carousel</a></h3> - <p>Create a merry-go-round of any content you wish to provide an interactive slideshow of content.</p> - </div> - <div class="span4"> - <h3><a href="./javascript.html#typeahead">Typeahead</a></h3> - <p>A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.</p> - </div> - <div class="span4"> - <h3>Transitions <small class="muted">*</small></h3> - <p>For simple transition effects, include bootstrap-transition.js once to slide in modals or fade out alerts.</p> - <p class="muted"><strong>*</strong> Required for animation in plugins</p> - </div> - </div> <!-- /row --> - <div class="alert alert-info"><strong>Heads up!</strong> If you have downloaded the latest version of Bootstrap, both <strong>bootstrap.js</strong> and <strong>bootstrap.min.js</strong> contain all of these plugins.</div> + +<!-- Overview +================================================== --> +<section id="overview"> + <div class="page-header"> + <h1>Javascript in Bootstrap</h1> + </div> + <h3>Individual or compiled</h3> + <p>If you have downloaded the latest version of Bootstrap, both <strong>bootstrap.js</strong> and <strong>bootstrap.min.js</strong> contain all of these plugins.</p> + <h3>Data attributea</h3> + <p>...</p> + <h3>Programmatic API</h3> + <p>...</p> + + + +</section> + + + +<!-- Transitions +================================================== --> +<section id="modals"> + <div class="page-header"> + <h1>Transitions <small>bootstrap-transition.js</small></h1> + </div> + <h3>About transitions</h3> + <p>For simple transition effects, include bootstrap-transition.js once to slide in modals or fade out alerts.</p> + <p class="muted"><strong>*</strong> Required for animation in plugins</p> </section> @@ -194,7 +141,6 @@ <h3>About modals</h3> <p>A streamlined, but flexible, take on the traditional javascript modal plugin with only the minimum required functionality and smart defaults.</p> - <a href="assets/js/bootstrap-modal.js" target="_blank" class="btn">Download file</a> <h2>Static example</h2> <p>Below is a statically rendered modal.</p> @@ -384,7 +330,6 @@ $('#myModal').on('hidden', function () { <h3>About dropdowns</h3> <p>Add dropdown menus to nearly anything in Bootstrap with this simple plugin. Bootstrap features full dropdown menu support on in the navbar, tabs, and pills.</p> - <a href="assets/js/bootstrap-dropdown.js" target="_blank" class="btn">Download file</a> <h2>Examples</h2> <p>Click on the dropdown nav links in the navbar and pills below to test dropdowns.</p> @@ -527,7 +472,6 @@ $('#myModal').on('hidden', function () { </div> <p>The ScrollSpy plugin is for automatically updating nav targets based on scroll position.</p> - <a href="assets/js/bootstrap-scrollspy.js" target="_blank" class="btn">Download file</a> <h2>Example navbar with scrollspy</h2> <p>Scroll the area below and watch the navigation update. The dropdown sub items will be highlighted as well. Try it!</p> @@ -643,7 +587,6 @@ $('[data-spy="scroll"]').each(function () { </div> <p>This plugin adds quick, dynamic tab and pill functionality for transitioning through local content.</p> - <a href="assets/js/bootstrap-tab.js" target="_blank" class="btn">Download file</a> <h2>Example tabs</h2> <p>Click the tabs below to toggle between hidden panes, even via dropdown menus.</p> @@ -759,7 +702,6 @@ $('a[data-toggle="tab"]').on('shown', function (e) { <h3>About Tooltips</h3> <p>Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use css3 for animations, and data-attributes for local title storage.</p> - <a href="assets/js/bootstrap-tooltip.js" target="_blank" class="btn">Download file</a> <h2>Example use of Tooltips</h2> <p>Hover over the links below to see tooltips:</p> @@ -866,7 +808,6 @@ $('a[data-toggle="tab"]').on('shown', function (e) { <h3>About popovers</h3> <p>Add small overlays of content, like those on the iPad, to any element for housing secondary information.</p> <p class="muted"><strong>*</strong> Requires <a href="#tooltips">Tooltip</a> to be included</p> - <a href="assets/js/bootstrap-popover.js" target="_blank" class="btn">Download file</a> <h2>Example hover popover</h2> <p>Hover over the button to trigger the popover.</p> @@ -975,7 +916,6 @@ $('a[data-toggle="tab"]').on('shown', function (e) { <h3>About alerts</h3> <p>The alert plugin is a tiny class for adding close functionality to alerts.</p> - <a href="assets/js/bootstrap-alert.js" target="_blank" class="btn">Download</a> <h2>Example alerts</h2> <p>The alerts plugin works on regular alert messages, and block messages.</p> @@ -1046,7 +986,6 @@ $('#my-alert').bind('closed', function () { <h3>About</h3> <p>Do more with buttons. Control button states or create groups of buttons for more components like toolbars.</p> - <a href="assets/js/bootstrap-button.js" target="_blank" class="btn">Download file</a> <h2>Example uses</h2> <p>Use the buttons plugin for states and toggles.</p> @@ -1141,7 +1080,6 @@ $('#my-alert').bind('closed', function () { <h3>About</h3> <p>Get base styles and flexible support for collapsible components like accordions and navigation.</p> - <a href="assets/js/bootstrap-collapse.js" target="_blank" class="btn">Download file</a> <p class="muted"><strong>*</strong> Requires the Transitions plugin to be included.</p> <h2>Example accordion</h2> @@ -1290,7 +1228,6 @@ $('#myCollapsible').on('hidden', function () { <h3>About</h3> <p>A generic plugin for cycling through elements. A merry-go-round.</p> - <a href="assets/js/bootstrap-carousel.js" target="_blank" class="btn">Download file</a> <h2>Example carousel</h2> <p>Watch the slideshow below.</p> @@ -1424,7 +1361,6 @@ $('.carousel').carousel({ <h3>About</h3> <p>A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.</p> - <a href="assets/js/bootstrap-typeahead.js" target="_blank" class="btn">Download file</a> <h2>Example</h2> <p>Start typing in the field below to show the typeahead results.</p> @@ -1499,7 +1435,7 @@ $('.carousel').carousel({ <p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> </footer> - </div><!-- /container --> + </div> diff --git a/docs/less.html b/docs/less.html index c383660d20..52b91e0c6d 100644 --- a/docs/less.html +++ b/docs/less.html @@ -27,84 +27,50 @@ </head> - <body> + <body data-spy="scroll" data-target=".subnav" data-offset="50"> - <div class="bs-docs-nav"> - <h3 class="bs-docs-logo"><a href="./index.html">Bootstrap</a></h3> - <ul class="bs-nav"> - <li class=""> - <a href="./scaffolding.html">Scaffolding</a> - <ul> - <li><a href="./scaffolding.html#global">Global styles</a></li> - <li><a href="./scaffolding.html#gridSystem">Grid system</a></li> - <li><a href="./scaffolding.html#fluidGridSystem">Fluid grid system</a></li> - <li><a href="./scaffolding.html#gridCustomization">Customizing</a></li> - <li><a href="./scaffolding.html#layouts">Layouts</a></li> - <li><a href="./scaffolding.html#responsive">Responsive design</a></li> - </ul> - </li> - <li class=""> - <a href="./base-css.html">Base CSS</a> - <ul> - <li><a href="./base-css.html#typography">Typography</a></li> - <li><a href="./base-css.html#code">Code</a></li> - <li><a href="./base-css.html#tables">Tables</a></li> - <li><a href="./base-css.html#forms">Forms</a></li> - <li><a href="./base-css.html#buttons">Buttons</a></li> - <li><a href="./base-css.html#icons">Icons by Glyphicons</a></li> - </ul> - </li> - <li class=""> - <a href="./components.html">Components</a> - <ul> - <li><a href="./components.html#buttonGroups">Button groups</a></li> - <li><a href="./components.html#buttonDropdowns">Button dropdowns</a></li> - <li><a href="./components.html#navs">Nav, tabs, pills</a></li> - <li><a href="./components.html#navbar">Navbar</a></li> - <li><a href="./components.html#breadcrumbs">Breadcrumbs</a></li> - <li><a href="./components.html#pagination">Pagination</a></li> - <li><a href="./components.html#labels">Labels</a></li> - <li><a href="./components.html#badges">Badges</a></li> - <li><a href="./components.html#typography">Typography</a></li> - <li><a href="./components.html#thumbnails">Thumbnails</a></li> - <li><a href="./components.html#alerts">Alerts</a></li> - <li><a href="./components.html#progress">Progress bars</a></li> - <li><a href="./components.html#misc">Miscellaneous</a></li> - </ul> - </li> - <li class=""> - <a href="./javascript.html">Javascript</a> - <ul> - <li><a href="./javascript.html#javascript">All plugins</a></li> - <li><a href="./javascript.html#modals">Modal</a></li> - <li><a href="./javascript.html#dropdowns">Dropdown</a></li> - <li><a href="./javascript.html#scrollspy">Scrollspy</a></li> - <li><a href="./javascript.html#tabs">Tab</a></li> - <li><a href="./javascript.html#tooltips">Tooltip</a></li> - <li><a href="./javascript.html#popovers">Popover</a></li> - <li><a href="./javascript.html#alerts">Alert</a></li> - <li><a href="./javascript.html#buttons">Button</a></li> - <li><a href="./javascript.html#collapse">Collapse</a></li> - <li><a href="./javascript.html#carousel">Carousel</a></li> - <li><a href="./javascript.html#typeahead">Typeahead</a></li> - </ul> - </li> - <li class="active"> - <a href="./less.html">LESS</a> - <ul> - <li><a href="./less.html#builtWith">Built with Less</a></li> - <li><a href="./less.html#variables">Variables</a></li> - <li><a href="./less.html#mixins">Mixins</a></li> - <li><a href="./less.html#compiling">Compiling Bootstrap</a></li> - </ul> - </li> - <li class=""> - <a href="./download.html">Customize</a> - </li> - <li class=""> - <a href="./examples.html">Examples</a> - </li> - </ul> + <!-- Navbar + ================================================== --> + <div class="navbar navbar-fixed-top"> + <div class="navbar-inner"> + <div class="bs-docs-container"> + <button type="button"class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="brand" href="./index.html">Bootstrap</a> + <div class="nav-collapse collapse"> + <ul class="nav"> + <li class=""> + <a href="./index.html">Home</a> + </li> + <li class=""> + <a href="./scaffolding.html">Scaffolding</a> + </li> + <li class=""> + <a href="./base-css.html">Base CSS</a> + </li> + <li class=""> + <a href="./components.html">Components</a> + </li> + <li class=""> + <a href="./javascript.html">Javascript</a> + </li> + <li class="active"> + <a href="./less.html">LESS</a> + </li> + <li class="divider-vertical"></li> + <li class=""> + <a href="./download.html">Customize</a> + </li> + <li class=""> + <a href="./examples.html">Examples</a> + </li> + </ul> + </div> + </div> + </div> </div> <div class="bs-docs-container"> @@ -114,21 +80,15 @@ <header class="jumbotron subhead" id="overview"> <h1>Using LESS with Bootstrap</h1> <p class="lead">Customize and extend Bootstrap with <a href="http://lesscss.org" target="_blank">LESS</a>, a CSS preprocessor, to take advantage of the variables, mixins, and more used to build Bootstrap's CSS.</p> -</header> - - - -<section id="contents"> - <div class="bs-docs-contents"> - <h3>Contents</h3> - <ol> + <div class="subnav"> + <ul class="nav nav-pills"> <li><a href="#builtWith">Built with Less</a></li> <li><a href="#variables">Variables</a></li> <li><a href="#mixins">Mixins</a></li> <li><a href="#compiling">Compiling Bootstrap</a></li> - </ol> + </ul> </div> -</section> +</header> @@ -1053,7 +1013,7 @@ <p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> </footer> - </div><!-- /container --> + </div> diff --git a/docs/scaffolding.html b/docs/scaffolding.html index 9b7b66cd2e..f30bb8c322 100644 --- a/docs/scaffolding.html +++ b/docs/scaffolding.html @@ -27,84 +27,50 @@ </head> - <body> - - <div class="bs-docs-nav"> - <h3 class="bs-docs-logo"><a href="./index.html">Bootstrap</a></h3> - <ul class="bs-nav"> - <li class="active"> - <a href="./scaffolding.html">Scaffolding</a> - <ul> - <li><a href="./scaffolding.html#global">Global styles</a></li> - <li><a href="./scaffolding.html#gridSystem">Grid system</a></li> - <li><a href="./scaffolding.html#fluidGridSystem">Fluid grid system</a></li> - <li><a href="./scaffolding.html#gridCustomization">Customizing</a></li> - <li><a href="./scaffolding.html#layouts">Layouts</a></li> - <li><a href="./scaffolding.html#responsive">Responsive design</a></li> - </ul> - </li> - <li class=""> - <a href="./base-css.html">Base CSS</a> - <ul> - <li><a href="./base-css.html#typography">Typography</a></li> - <li><a href="./base-css.html#code">Code</a></li> - <li><a href="./base-css.html#tables">Tables</a></li> - <li><a href="./base-css.html#forms">Forms</a></li> - <li><a href="./base-css.html#buttons">Buttons</a></li> - <li><a href="./base-css.html#icons">Icons by Glyphicons</a></li> - </ul> - </li> - <li class=""> - <a href="./components.html">Components</a> - <ul> - <li><a href="./components.html#buttonGroups">Button groups</a></li> - <li><a href="./components.html#buttonDropdowns">Button dropdowns</a></li> - <li><a href="./components.html#navs">Nav, tabs, pills</a></li> - <li><a href="./components.html#navbar">Navbar</a></li> - <li><a href="./components.html#breadcrumbs">Breadcrumbs</a></li> - <li><a href="./components.html#pagination">Pagination</a></li> - <li><a href="./components.html#labels">Labels</a></li> - <li><a href="./components.html#badges">Badges</a></li> - <li><a href="./components.html#typography">Typography</a></li> - <li><a href="./components.html#thumbnails">Thumbnails</a></li> - <li><a href="./components.html#alerts">Alerts</a></li> - <li><a href="./components.html#progress">Progress bars</a></li> - <li><a href="./components.html#misc">Miscellaneous</a></li> - </ul> - </li> - <li class=""> - <a href="./javascript.html">Javascript</a> - <ul> - <li><a href="./javascript.html#javascript">All plugins</a></li> - <li><a href="./javascript.html#modals">Modal</a></li> - <li><a href="./javascript.html#dropdowns">Dropdown</a></li> - <li><a href="./javascript.html#scrollspy">Scrollspy</a></li> - <li><a href="./javascript.html#tabs">Tab</a></li> - <li><a href="./javascript.html#tooltips">Tooltip</a></li> - <li><a href="./javascript.html#popovers">Popover</a></li> - <li><a href="./javascript.html#alerts">Alert</a></li> - <li><a href="./javascript.html#buttons">Button</a></li> - <li><a href="./javascript.html#collapse">Collapse</a></li> - <li><a href="./javascript.html#carousel">Carousel</a></li> - <li><a href="./javascript.html#typeahead">Typeahead</a></li> - </ul> - </li> - <li class=""> - <a href="./less.html">LESS</a> - <ul> - <li><a href="./less.html#builtWith">Built with Less</a></li> - <li><a href="./less.html#variables">Variables</a></li> - <li><a href="./less.html#mixins">Mixins</a></li> - <li><a href="./less.html#compiling">Compiling Bootstrap</a></li> - </ul> - </li> - <li class=""> - <a href="./download.html">Customize</a> - </li> - <li class=""> - <a href="./examples.html">Examples</a> - </li> - </ul> + <body data-spy="scroll" data-target=".subnav" data-offset="50"> + + <!-- Navbar + ================================================== --> + <div class="navbar navbar-fixed-top"> + <div class="navbar-inner"> + <div class="bs-docs-container"> + <button type="button"class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="brand" href="./index.html">Bootstrap</a> + <div class="nav-collapse collapse"> + <ul class="nav"> + <li class=""> + <a href="./index.html">Home</a> + </li> + <li class="active"> + <a href="./scaffolding.html">Scaffolding</a> + </li> + <li class=""> + <a href="./base-css.html">Base CSS</a> + </li> + <li class=""> + <a href="./components.html">Components</a> + </li> + <li class=""> + <a href="./javascript.html">Javascript</a> + </li> + <li class=""> + <a href="./less.html">LESS</a> + </li> + <li class="divider-vertical"></li> + <li class=""> + <a href="./download.html">Customize</a> + </li> + <li class=""> + <a href="./examples.html">Examples</a> + </li> + </ul> + </div> + </div> + </div> </div> <div class="bs-docs-container"> @@ -114,6 +80,16 @@ <header class="jumbotron subhead" id="overview"> <h1>Scaffolding</h1> <p class="lead">Bootstrap is built on a responsive 12-column grid. We've also included fixed- and fluid-width layouts based on that system.</p> + <div class="subnav"> + <ul class="nav nav-pills"> + <li><a href="#global">Global styles</a></li> + <li><a href="#gridSystem">Grid system</a></li> + <li><a href="#fluidGridSystem">Fluid grid system</a></li> + <li><a href="#gridCustomization">Customizing</a></li> + <li><a href="#layouts">Layouts</a></li> + <li><a href="#responsive">Responsive design</a></li> + </ul> + </div> </header> @@ -173,24 +149,22 @@ <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> - <div class="span1">1</div> - <div class="span1">1</div> </div> <div class="row show-grid"> - <div class="span4">4</div> + <div class="span2">2</div> <div class="span4">4</div> <div class="span4">4</div> </div> <div class="row show-grid"> <div class="span4">4</div> - <div class="span8">8</div> + <div class="span6">6</div> </div> <div class="row show-grid"> - <div class="span6">6</div> - <div class="span6">6</div> + <div class="span5">5</div> + <div class="span5">5</div> </div> <div class="row show-grid"> - <div class="span12">12</div> + <div class="span10">10</div> </div> </div> @@ -209,14 +183,14 @@ <div class="bs-docs-grid"> <div class="row show-grid"> <div class="span4">4</div> - <div class="span4 offset4">4 offset 4</div> + <div class="span4 offset2">4 offset 2</div> </div><!-- /row --> <div class="row show-grid"> - <div class="span3 offset3">3 offset 3</div> - <div class="span3 offset3">3 offset 3</div> + <div class="span3 offset2">3 offset 2</div> + <div class="span3 offset2">3 offset 2</div> </div><!-- /row --> <div class="row show-grid"> - <div class="span8 offset4">8 offset 4</div> + <div class="span6 offset4">6 offset 4</div> </div><!-- /row --> </div> <pre class="prettyprint linenums"> @@ -231,13 +205,13 @@ <h3>Example</h3> <p>Here two nested <code>.span4</code> columns are placed within a <code>.span8</code>.</p> <div class="row show-grid"> - <div class="span8"> + <div class="span10"> Level 1 of column <div class="row show-grid"> - <div class="span4"> + <div class="span5"> Level 2 </div> - <div class="span4"> + <div class="span5"> Level 2 </div> </div> @@ -245,11 +219,11 @@ </div> <pre class="prettyprint linenums"> <div class="row"> - <div class="span8"> + <div class="span10"> Level 1 column <div class="row"> - <div class="span4">Level 2</div> - <div class="span4">Level 2</div> + <div class="span5">Level 2</div> + <div class="span5">Level 2</div> </div> </div> </div> @@ -604,7 +578,7 @@ <p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> </footer> - </div><!-- /container --> + </div> diff --git a/docs/templates/layout.mustache b/docs/templates/layout.mustache index 3c0d2b4ca3..766cac8221 100644 --- a/docs/templates/layout.mustache +++ b/docs/templates/layout.mustache @@ -39,84 +39,50 @@ {{/production}} </head> - <body> - - <div class="bs-docs-nav"> - <h3 class="bs-docs-logo"><a href="./index.html">{{_i}}Bootstrap{{/i}}</a></h3> - <ul class="bs-nav"> - <li class="{{scaffolding}}"> - <a href="./scaffolding.html">{{_i}}Scaffolding{{/i}}</a> - <ul> - <li><a href="./scaffolding.html#global">{{_i}}Global styles{{/i}}</a></li> - <li><a href="./scaffolding.html#gridSystem">{{_i}}Grid system{{/i}}</a></li> - <li><a href="./scaffolding.html#fluidGridSystem">{{_i}}Fluid grid system{{/i}}</a></li> - <li><a href="./scaffolding.html#gridCustomization">{{_i}}Customizing{{/i}}</a></li> - <li><a href="./scaffolding.html#layouts">{{_i}}Layouts{{/i}}</a></li> - <li><a href="./scaffolding.html#responsive">{{_i}}Responsive design{{/i}}</a></li> - </ul> - </li> - <li class="{{base-css}}"> - <a href="./base-css.html">{{_i}}Base CSS{{/i}}</a> - <ul> - <li><a href="./base-css.html#typography">{{_i}}Typography{{/i}}</a></li> - <li><a href="./base-css.html#code">{{_i}}Code{{/i}}</a></li> - <li><a href="./base-css.html#tables">{{_i}}Tables{{/i}}</a></li> - <li><a href="./base-css.html#forms">{{_i}}Forms{{/i}}</a></li> - <li><a href="./base-css.html#buttons">{{_i}}Buttons{{/i}}</a></li> - <li><a href="./base-css.html#icons">{{_i}}Icons by Glyphicons{{/i}}</a></li> - </ul> - </li> - <li class="{{components}}"> - <a href="./components.html">{{_i}}Components{{/i}}</a> - <ul> - <li><a href="./components.html#buttonGroups">{{_i}}Button groups{{/i}}</a></li> - <li><a href="./components.html#buttonDropdowns">{{_i}}Button dropdowns{{/i}}</a></li> - <li><a href="./components.html#navs">{{_i}}Nav, tabs, pills{{/i}}</a></li> - <li><a href="./components.html#navbar">{{_i}}Navbar{{/i}}</a></li> - <li><a href="./components.html#breadcrumbs">{{_i}}Breadcrumbs{{/i}}</a></li> - <li><a href="./components.html#pagination">{{_i}}Pagination{{/i}}</a></li> - <li><a href="./components.html#labels">{{_i}}Labels{{/i}}</a></li> - <li><a href="./components.html#badges">{{_i}}Badges{{/i}}</a></li> - <li><a href="./components.html#typography">{{_i}}Typography{{/i}}</a></li> - <li><a href="./components.html#thumbnails">{{_i}}Thumbnails{{/i}}</a></li> - <li><a href="./components.html#alerts">{{_i}}Alerts{{/i}}</a></li> - <li><a href="./components.html#progress">{{_i}}Progress bars{{/i}}</a></li> - <li><a href="./components.html#misc">{{_i}}Miscellaneous{{/i}}</a></li> - </ul> - </li> - <li class="{{javascript}}"> - <a href="./javascript.html">{{_i}}Javascript{{/i}}</a> - <ul> - <li><a href="./javascript.html#javascript">{{_i}}All plugins{{/i}}</a></li> - <li><a href="./javascript.html#modals">{{_i}}Modal{{/i}}</a></li> - <li><a href="./javascript.html#dropdowns">{{_i}}Dropdown{{/i}}</a></li> - <li><a href="./javascript.html#scrollspy">{{_i}}Scrollspy{{/i}}</a></li> - <li><a href="./javascript.html#tabs">{{_i}}Tab{{/i}}</a></li> - <li><a href="./javascript.html#tooltips">{{_i}}Tooltip{{/i}}</a></li> - <li><a href="./javascript.html#popovers">{{_i}}Popover{{/i}}</a></li> - <li><a href="./javascript.html#alerts">{{_i}}Alert{{/i}}</a></li> - <li><a href="./javascript.html#buttons">{{_i}}Button{{/i}}</a></li> - <li><a href="./javascript.html#collapse">{{_i}}Collapse{{/i}}</a></li> - <li><a href="./javascript.html#carousel">{{_i}}Carousel{{/i}}</a></li> - <li><a href="./javascript.html#typeahead">{{_i}}Typeahead{{/i}}</a></li> - </ul> - </li> - <li class="{{less}}"> - <a href="./less.html">{{_i}}LESS{{/i}}</a> - <ul> - <li><a href="./less.html#builtWith">{{_i}}Built with Less{{/i}}</a></li> - <li><a href="./less.html#variables">{{_i}}Variables{{/i}}</a></li> - <li><a href="./less.html#mixins">{{_i}}Mixins{{/i}}</a></li> - <li><a href="./less.html#compiling">{{_i}}Compiling Bootstrap{{/i}}</a></li> - </ul> - </li> - <li class="{{download}}"> - <a href="./download.html">{{_i}}Customize{{/i}}</a> - </li> - <li class="{{examples}}"> - <a href="./examples.html">{{_i}}Examples{{/i}}</a> - </li> - </ul> + <body data-spy="scroll" data-target=".subnav" data-offset="50"> + + <!-- Navbar + ================================================== --> + <div class="navbar navbar-fixed-top"> + <div class="navbar-inner"> + <div class="bs-docs-container"> + <button type="button"class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="brand" href="./index.html">Bootstrap</a> + <div class="nav-collapse collapse"> + <ul class="nav"> + <li class="{{index}}"> + <a href="./index.html">{{_i}}Home{{/i}}</a> + </li> + <li class="{{scaffolding}}"> + <a href="./scaffolding.html">{{_i}}Scaffolding{{/i}}</a> + </li> + <li class="{{base-css}}"> + <a href="./base-css.html">{{_i}}Base CSS{{/i}}</a> + </li> + <li class="{{components}}"> + <a href="./components.html">{{_i}}Components{{/i}}</a> + </li> + <li class="{{javascript}}"> + <a href="./javascript.html">{{_i}}Javascript{{/i}}</a> + </li> + <li class="{{less}}"> + <a href="./less.html">{{_i}}LESS{{/i}}</a> + </li> + <li class="divider-vertical"></li> + <li class="{{download}}"> + <a href="./download.html">{{_i}}Customize{{/i}}</a> + </li> + <li class="{{examples}}"> + <a href="./examples.html">{{_i}}Examples{{/i}}</a> + </li> + </ul> + </div> + </div> + </div> </div> <div class="bs-docs-container"> @@ -133,7 +99,7 @@ <p>{{_i}}Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.{{/i}}</p> </footer> - </div><!-- /container --> + </div>{{! /container }} diff --git a/docs/templates/pages/base-css.mustache b/docs/templates/pages/base-css.mustache index 1f0546657c..a1f4a3501d 100644 --- a/docs/templates/pages/base-css.mustache +++ b/docs/templates/pages/base-css.mustache @@ -3,6 +3,16 @@ <header class="jumbotron subhead" id="overview"> <h1>{{_i}}Base CSS{{/i}}</h1> <p class="lead">{{_i}}On top of the scaffolding, basic HTML elements are styled and enhanced with extensible classes to provide a fresh, consistent look and feel.{{/i}}</p> + <div class="subnav"> + <ul class="nav nav-pills"> + <li><a href="#typography">{{_i}}Typography{{/i}}</a></li> + <li><a href="#code">{{_i}}Code{{/i}}</a></li> + <li><a href="#tables">{{_i}}Tables{{/i}}</a></li> + <li><a href="#forms">{{_i}}Forms{{/i}}</a></li> + <li><a href="#buttons">{{_i}}Buttons{{/i}}</a></li> + <li><a href="#icons">{{_i}}Icons by Glyphicons{{/i}}</a></li> + </ul> + </div> </header> @@ -345,19 +355,6 @@ </pre> <p>{{_i}}<strong>Note:</strong> Be sure to keep code within <code><pre></code> tags as close to the left as possible; it will render all tabs.{{/i}}</p> <p>{{_i}}You may optionally add the <code>.pre-scrollable</code> class which will set a max-height of 350px and provide a y-axis scrollbar.{{/i}}</p> - - <h2>Google Prettify</h2> - <p>Take the same <code><pre></code> element and add two optional classes for enhanced rendering.</p> -<pre class="prettyprint linenums" style="margin-bottom: 9px;"> -<p>{{_i}}Sample text here...{{/i}}</p> -</pre> -<pre class="prettyprint linenums" style="margin-bottom: 9px;"> -<pre class="prettyprint - linenums"> - &lt;p&gt;{{_i}}Sample text here...{{/i}}&lt;/p&gt; -</pre> -</pre> - <p>{{_i}}<a href="http://code.google.com/p/google-code-prettify/">Download google-code-prettify</a> and view the readme for <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html">how to use</a>.{{/i}}</p> </section> @@ -369,148 +366,8 @@ <h1>{{_i}}Tables <small>For, you guessed it, tabular data</small>{{/i}}</h1> </div> - <h2>{{_i}}Table markup{{/i}}</h2> - - <table class="table table-bordered table-striped"> - <colgroup> - <col class="span1"> - <col class="span7"> - </colgroup> - <thead> - <tr> - <th>{{_i}}Tag{{/i}}</th> - <th>{{_i}}Description{{/i}}</th> - </tr> - </thead> - <tbody> - <tr> - <td> - <code><table></code> - </td> - <td> - {{_i}}Wrapping element for displaying data in a tabular format{{/i}} - </td> - </tr> - <tr> - <td> - <code><thead></code> - </td> - <td> - {{_i}}Container element for table header rows (<code><tr></code>) to label table columns{{/i}} - </td> - </tr> - <tr> - <td> - <code><tbody></code> - </td> - <td> - {{_i}}Container element for table rows (<code><tr></code>) in the body of the table{{/i}} - </td> - </tr> - <tr> - <td> - <code><tr></code> - </td> - <td> - {{_i}}Container element for a set of table cells (<code><td></code> or <code><th></code>) that appears on a single row{{/i}} - </td> - </tr> - <tr> - <td> - <code><td></code> - </td> - <td> - {{_i}}Default table cell{{/i}} - </td> - </tr> - <tr> - <td> - <code><th></code> - </td> - <td> - {{_i}}Special table cell for column (or row, depending on scope and placement) labels{{/i}}<br> - {{_i}}Must be used within a <code><thead></code>{{/i}} - </td> - </tr> - <tr> - <td> - <code><caption></code> - </td> - <td> - {{_i}}Description or summary of what the table holds, especially useful for screen readers{{/i}} - </td> - </tr> - </tbody> - </table> -<pre class="prettyprint linenums"> -<table> - <thead> - <tr> - <th>…</th> - <th>…</th> - </tr> - </thead> - <tbody> - <tr> - <td>…</td> - <td>…</td> - </tr> - </tbody> -</table> -</pre> - - - <h2>{{_i}}Table options{{/i}}</h2> - <table class="table table-bordered table-striped"> - <thead> - <tr> - <th>{{_i}}Name{{/i}}</th> - <th>{{_i}}Class{{/i}}</th> - <th>{{_i}}Description{{/i}}</th> - </tr> - </thead> - <tbody> - <tr> - <td>{{_i}}Default{{/i}}</td> - <td class="muted">{{_i}}None{{/i}}</td> - <td>{{_i}}No styles, just columns and rows{{/i}}</td> - </tr> - <tr> - <td>{{_i}}Basic{{/i}}</td> - <td> - <code>.table</code> - </td> - <td>{{_i}}Only horizontal lines between rows{{/i}}</td> - </tr> - <tr> - <td>{{_i}}Bordered{{/i}}</td> - <td> - <code>.table-bordered</code> - </td> - <td>{{_i}}Rounds corners and adds outer border{{/i}}</td> - </tr> - <tr> - <td>{{_i}}Zebra-stripe{{/i}}</td> - <td> - <code>.table-striped</code> - </td> - <td>{{_i}}Adds light gray background color to odd rows (1, 3, 5, etc){{/i}}</td> - </tr> - <tr> - <td>{{_i}}Condensed{{/i}}</td> - <td> - <code>.table-condensed</code> - </td> - <td>{{_i}}Cuts vertical padding in half, from 8px to 4px, within all <code>td</code> and <code>th</code> elements{{/i}}</td> - </tr> - </tbody> - </table> - - - <h2>{{_i}}Example tables{{/i}}</h2> - - <h3>1. {{_i}}Default table styles{{/i}}</h3> - <p>{{_i}}Tables are automatically styled with only a few borders to ensure readability and maintain structure. With 2.0, the <code>.table</code> class is required.{{/i}}</p> + <h2>{{_i}}Default styles{{/i}}</h2> + <p>{{_i}}For basic styling—light padding and only horizontal dividers—add the base class <code>.table</code> to any <code><table></code>.{{/i}}</p> <div class="bs-docs-example"> <table class="table"> <thead> @@ -549,9 +406,15 @@ </table> </pre> - <h3>2. {{_i}}Striped table{{/i}}</h3> - <p>{{_i}}Get a little fancy with your tables by adding zebra-striping—just add the <code>.table-striped</code> class.{{/i}}</p> - <p class="muted">{{_i}}<strong>Note:</strong> Striped tables use the <code>:nth-child</code> CSS selector and is not available in IE7-IE8.{{/i}}</p> + + <hr class="bs-docs-separator"> + + + <h2>{{_i}}Optional classes{{/i}}</h2> + <p>{{_i}}Add any of the follow classes to the <code>.table</code> base class.{{/i}}</p> + + <h3><code>{{_i}}.table-striped{{/i}}</code></h3> + <p>{{_i}}Adds zebra-striping to any table row within the <code><tbody></code> via the <code>:nth-child</code> CSS selector (not available in IE7-IE8).{{/i}}</p> <div class="bs-docs-example"> <table class="table table-striped"> <thead> @@ -590,9 +453,8 @@ </table> </pre> - - <h3>3. {{_i}}Bordered table{{/i}}</h3> - <p>{{_i}}Add borders around the entire table and rounded corners for aesthetic purposes.{{/i}}</p> + <h3><code>{{_i}}.table-bordered{{/i}}</code></h3> + <p>{{_i}}Add borders and rounded corners to the table.{{/i}}</p> <div class="bs-docs-example"> <table class="table table-bordered"> <thead> @@ -635,8 +497,8 @@ </table> </pre> - <h3>4. {{_i}}Condensed table{{/i}}</h3> - <p>{{_i}}Make your tables more compact by adding the <code>.table-condensed</code> class to cut table cell padding in half (from 8px to 4px).{{/i}}</p> + <h3><code>{{_i}}.table-condensed{{/i}}</code></h3> + <p>{{_i}}Makes tables more compact by cutting cell padding in half.{{/i}}</p> <div class="bs-docs-example"> <table class="table table-condensed"> <thead> @@ -675,104 +537,115 @@ </pre> - <h3>5. {{_i}}Combine them all!{{/i}}</h3> - <p>{{_i}}Feel free to combine any of the table classes to achieve different looks by utilizing any of the available classes.{{/i}}</p> - <div class="bs-docs-example"> - <table class="table table-striped table-bordered table-condensed"> - <thead> - <tr> - <th></th> - <th colspan="2">{{_i}}Full name{{/i}}</th> - <th></th> - </tr> - <tr> - <th>#</th> - <th>{{_i}}First Name{{/i}}</th> - <th>{{_i}}Last Name{{/i}}</th> - <th>{{_i}}Username{{/i}}</th> - </tr> - </thead> - <tbody> - <tr> - <tr> - <td>1</td> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <td>2</td> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <td>3</td> - <td colspan="2">Larry the Bird</td> - <td>@twitter</td> - </tr> - </tbody> - </table> - </div>{{! /example }} -<pre class="prettyprint linenums" style="margin-bottom: 18px;"> -<table class="table table-striped table-bordered table-condensed"> - ... -</table> -</pre> - -</section> - - + <hr class="bs-docs-separator"> -<!-- Forms -================================================== --> -<section id="forms"> - <div class="page-header"> - <h1>{{_i}}Forms{{/i}}</h1> - </div> - <h2>{{_i}}Controls and layouts{{/i}}</h2> - <p>{{_i}}Forms include styles for all the base form controls like <code>input</code>, <code>textarea</code>, and <code>select</code> you'd expect. There are also a number of custom components like appended and prepended inputs and support for lists of checkboxes.{{/i}}</p> - <p>{{_i}}Bootstrap provides simple markup and styles for four styles of common web forms. Each layout requires small changes to surrounding markup, but the controls themselves remain and behave the same.{{/i}}</p> - <p>{{_i}}Error, warning, and success states are included for form controls, as wel as disabled.{{/i}}</p> + <h2>{{_i}}Supported table markup{{/i}}</h2> + <p>{{_i}}List of supported table HTML elements and how they should be used.{{/i}}</p> <table class="table table-bordered table-striped"> + <colgroup> + <col class="span1"> + <col class="span7"> + </colgroup> <thead> <tr> - <th>{{_i}}Name{{/i}}</th> - <th>{{_i}}Class{{/i}}</th> + <th>{{_i}}Tag{{/i}}</th> <th>{{_i}}Description{{/i}}</th> </tr> </thead> <tbody> <tr> - <th>{{_i}}Vertical (default){{/i}}</th> - <td><code>.form-vertical</code> <span class="muted">({{_i}}not required{{/i}})</span></td> - <td>{{_i}}Stacked, left-aligned labels over controls{{/i}}</td> + <td> + <code><table></code> + </td> + <td> + {{_i}}Wrapping element for displaying data in a tabular format{{/i}} + </td> + </tr> + <tr> + <td> + <code><thead></code> + </td> + <td> + {{_i}}Container element for table header rows (<code><tr></code>) to label table columns{{/i}} + </td> </tr> <tr> - <th>{{_i}}Inline{{/i}}</th> - <td><code>.form-inline</code></td> - <td>{{_i}}Left-aligned label and inline-block controls for compact style{{/i}}</td> + <td> + <code><tbody></code> + </td> + <td> + {{_i}}Container element for table rows (<code><tr></code>) in the body of the table{{/i}} + </td> </tr> <tr> - <th>{{_i}}Search{{/i}}</th> - <td><code>.form-search</code></td> - <td>{{_i}}Extra-rounded text input for a typical search aesthetic{{/i}}</td> + <td> + <code><tr></code> + </td> + <td> + {{_i}}Container element for a set of table cells (<code><td></code> or <code><th></code>) that appears on a single row{{/i}} + </td> </tr> <tr> - <th>{{_i}}Horizontal{{/i}}</th> - <td><code>.form-horizontal</code></td> - <td>{{_i}}Float left, right-aligned labels on same line as controls{{/i}}</td> + <td> + <code><td></code> + </td> + <td> + {{_i}}Default table cell{{/i}} + </td> + </tr> + <tr> + <td> + <code><th></code> + </td> + <td> + {{_i}}Special table cell for column (or row, depending on scope and placement) labels{{/i}}<br> + {{_i}}Must be used within a <code><thead></code>{{/i}} + </td> + </tr> + <tr> + <td> + <code><caption></code> + </td> + <td> + {{_i}}Description or summary of what the table holds, especially useful for screen readers{{/i}} + </td> </tr> </tbody> </table> +<pre class="prettyprint linenums"> +<table> + <thead> + <tr> + <th>…</th> + <th>…</th> + </tr> + </thead> + <tbody> + <tr> + <td>…</td> + <td>…</td> + </tr> + </tbody> +</table> +</pre> + +</section> + - <h2>{{_i}}Example forms <small>using just form controls, no extra markup</small>{{/i}}</h2> - <h3>{{_i}}Basic form{{/i}}</h3> - <p>{{_i}}Smart and lightweight defaults without extra markup.{{/i}}</p> + +<!-- Forms +================================================== --> +<section id="forms"> + <div class="page-header"> + <h1>{{_i}}Forms{{/i}}</h1> + </div> + + <h2>{{_i}}Default styles{{/i}}</h2> + <p>{{_i}}Individual form controls receive styling, but without any required base class on the <code><form></code> or large changes in markup. Results in stacked, left-aligned labels on top of form controls.{{/i}}</p> <form class="bs-docs-example"> <label>{{_i}}Label name{{/i}}</label> - <input type="text" class="span3" placeholder="{{_i}}Type something…{{/i}}"> + <input type="text" placeholder="{{_i}}Type something…{{/i}}"> <p class="help-block">{{_i}}Example block-level help text here.{{/i}}</p> <label class="checkbox"> <input type="checkbox"> {{_i}}Check me out{{/i}} @@ -782,7 +655,7 @@ <pre class="prettyprint linenums"> <form class="well"> <label>{{_i}}Label name{{/i}}</label> - <input type="text" class="span3" placeholder="{{_i}}Type something…{{/i}}"> + <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}} @@ -791,21 +664,28 @@ </form> </pre> + + <hr class="bs-docs-separator"></hr> + + + <h2>{{_i}}Optional layouts{{/i}}</h2> + <p>{{_i}}Included with Bootstrap are three optional form layouts for common use cases.{{/i}}</p> + <h3>{{_i}}Search form{{/i}}</h3> - <p>{{_i}}Add <code>.form-search</code> to the form and <code>.search-query</code> to the <code>input</code>.{{/i}}</p> + <p>{{_i}}Add <code>.form-search</code> to the form and <code>.search-query</code> to the <code><input></code> for an extra-rounded text input.{{/i}}</p> <form class="bs-docs-example form-search"> <input type="text" class="input-medium search-query"> <button type="submit" class="btn">{{_i}}Search{{/i}}</button> </form>{{! /example }} <pre class="prettyprint linenums"> -<form class="well form-search"> +<form class="form-search"> <input type="text" class="input-medium search-query"> <button type="submit" class="btn">{{_i}}Search{{/i}}</button> </form> </pre> <h3>{{_i}}Inline form{{/i}}</h3> - <p>{{_i}}Add <code>.form-inline</code> to finesse the vertical alignment and spacing of form controls.{{/i}}</p> + <p>{{_i}}Add <code>.form-inline</code> for left-aligned labels and inline-block controls for a compact layout.{{/i}}</p> <form class="bs-docs-example form-inline"> <input type="text" class="input-small" placeholder="{{_i}}Email{{/i}}"> <input type="password" class="input-small" placeholder="{{_i}}Password{{/i}}"> @@ -815,7 +695,7 @@ <button type="submit" class="btn">{{_i}}Sign in{{/i}}</button> </form>{{! /example }} <pre class="prettyprint linenums"> -<form class="well form-inline"> +<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"> @@ -825,331 +705,424 @@ </form> </pre> - <br> - - <h2>{{_i}}Horizontal forms{{/i}}</h2> - <p>{{_i}}Shown on the right are all the default form controls we support. Here's the bulleted list:{{/i}}</p> + <h3>{{_i}}Horizontal form{{/i}}</h3> + <p>{{_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}}</p> <ul> - <li>{{_i}}text inputs (text, password, email, etc){{/i}}</li> - <li>{{_i}}checkbox{{/i}}</li> - <li>{{_i}}radio{{/i}}</li> - <li>{{_i}}select{{/i}}</li> - <li>{{_i}}multiple select{{/i}}</li> - <li>{{_i}}file input{{/i}}</li> - <li>{{_i}}textarea{{/i}}</li> + <li>{{_i}}Add <code>.form-horizontal</code> to the form{{/i}}</li> + <li>{{_i}}Wrap labels and controls in <code>.control-group</code>{{/i}}</li> + <li>{{_i}}Add <code>.control-label</code> to the label{{/i}}</li> + <li>{{_i}}Wrap any associated controls in <code>.controls</code> for proper alignment{{/i}}</li> </ul> - - <form class="form-horizontal"> - <fieldset> - <div class="control-group"> - <label class="control-label" for="input01">{{_i}}Text input{{/i}}</label> - <div class="controls"> - <input type="text" class="input-xlarge" id="input01"> - <p class="help-block">{{_i}}In addition to freeform text, any HTML5 text-based input appears like so.{{/i}}</p> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="optionsCheckbox">{{_i}}Checkbox{{/i}}</label> - <div class="controls"> - <label class="checkbox"> - <input type="checkbox" id="optionsCheckbox" value="option1"> - {{_i}}Option one is this and that—be sure to include why it's great{{/i}} - </label> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="select01">{{_i}}Select list{{/i}}</label> - <div class="controls"> - <select id="select01"> - <option>something</option> - <option>2</option> - <option>3</option> - <option>4</option> - <option>5</option> - </select> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="multiSelect">{{_i}}Multicon-select{{/i}}</label> - <div class="controls"> - <select multiple="multiple" id="multiSelect"> - <option>1</option> - <option>2</option> - <option>3</option> - <option>4</option> - <option>5</option> - </select> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="fileInput">{{_i}}File input{{/i}}</label> - <div class="controls"> - <input class="input-file" id="fileInput" type="file"> - </div> + <form class="bs-docs-example form-horizontal"> + <div class="control-group"> + <label class="control-label" for="">{{_i}}Email{{/i}}</label> + <div class="controls"> + <input type="text" placeholder="{{_i}}Email{{/i}}"> </div> - <div class="control-group"> - <label class="control-label" for="textarea">{{_i}}Textarea{{/i}}</label> - <div class="controls"> - <textarea class="input-xlarge" id="textarea" rows="3"></textarea> - </div> + </div> + <div class="control-group"> + <label class="control-label" for="">{{_i}}Password{{/i}}</label> + <div class="controls"> + <input type="password" placeholder="{{_i}}Password{{/i}}"> </div> - <div class="form-actions"> - <button type="submit" class="btn btn-primary">{{_i}}Save changes{{/i}}</button> - <button class="btn">{{_i}}Cancel{{/i}}</button> + </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> - </fieldset> + </div> </form> - <h3>{{_i}}Example markup{{/i}}</h3> - <p>{{_i}}Given the above example form layout, here's the markup associated with the first input and control group. The <code>.control-group</code>, <code>.control-label</code>, and <code>.controls</code> classes are all required for styling.{{/i}}</p> <pre class="prettyprint linenums"> <form class="form-horizontal"> - <fieldset> - <legend>{{_i}}Legend text{{/i}}</legend> - <div class="control-group"> - <label class="control-label" for="input01">{{_i}}Text input{{/i}}</label> - <div class="controls"> - <input type="text" class="input-xlarge" id="input01"> - <p class="help-block">{{_i}}Supporting help text{{/i}}</p> - </div> + <div class="control-group"> + <label class="control-label" for="">{{_i}}Email{{/i}}</label> + <div class="controls"> + <input type="text" placeholder="{{_i}}Email{{/i}}"> </div> - </fieldset> + </div> + <div class="control-group"> + <label class="control-label" for="">{{_i}}Password{{/i}}</label> + <div class="controls"> + <input type="password" 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> </pre> - <br> - <h2>{{_i}}Form control states{{/i}}</h2> - <p>{{_i}}Bootstrap features styles for browser-supported focused and <code>disabled</code> states. We remove the default Webkit <code>outline</code> and apply a <code>box-shadow</code> in its place for <code>:focus</code>.{{/i}}</p> - <hr> - <h3>{{_i}}Form validation{{/i}}</h3> - <p>{{_i}}It also includes validation styles for errors, warnings, and success. To use, add the error class to the surrounding <code>.control-group</code>.{{/i}}</p> + <hr class="bs-docs-separator"></hr> + + + <h2>{{_i}}Supported form controls{{/i}}</h2> + <p>{{_i}}Examples of standard form controls supported in an example form layout.{{/i}}</p> + + <h3>{{_i}}Inputs{{/i}}</h3> + <p>{{_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}}</p> + <p>{{_i}}Requires the use of a specified <code>type</code> at all times.{{/i}}</p> + <form class="bs-docs-example form-inline"> + <input type="text" placeholder="Text input"> + </form> <pre class="prettyprint linenums"> -<fieldset - class="control-group error"> - … -</fieldset> +<input type="text" placeholder="Text input"> </pre> - <form class="form-horizontal"> - <fieldset> - <div class="control-group"> - <label class="control-label" for="focusedInput">{{_i}}Focused input{{/i}}</label> - <div class="controls"> - <input class="input-xlarge focused" id="focusedInput" type="text" value="{{_i}}This is focused…{{/i}}"> - </div> - </div> - <div class="control-group"> - <label class="control-label">Uneditable input</label> - <div class="controls"> - <span class="input-xlarge uneditable-input">Some value here</span> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="disabledInput">{{_i}}Disabled input{{/i}}</label> - <div class="controls"> - <input class="input-xlarge disabled" id="disabledInput" type="text" placeholder="{{_i}}Disabled input here…{{/i}}" disabled> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="optionsCheckbox2">{{_i}}Disabled checkbox{{/i}}</label> - <div class="controls"> - <label class="checkbox"> - <input type="checkbox" id="optionsCheckbox2" value="option1" disabled> - {{_i}}This is a disabled checkbox{{/i}} - </label> - </div> - </div> - <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 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> - <div class="control-group success"> - <label class="control-label" for="selectError">{{_i}}Select with success{{/i}}</label> - <div class="controls"> - <select id="selectError"> - <option>1</option> - <option>2</option> - <option>3</option> - <option>4</option> - <option>5</option> - </select> - <span class="help-inline">{{_i}}Woohoo!{{/i}}</span> - </div> - </div> - <div class="form-actions"> - <button type="submit" class="btn btn-primary">{{_i}}Save changes{{/i}}</button> - <button class="btn">{{_i}}Cancel{{/i}}</button> - </div> - </fieldset> + <h3>{{_i}}Textarea{{/i}}</h3> + <p>{{_i}}Form control which supports multiple lines of text. Change <code>row</code> attribute as necessary.{{/i}}</p> + <form class="bs-docs-example form-inline"> + <textarea rows="3"></textarea> + </form> +<pre class="prettyprint linenums"> +<textarea id="textarea" rows="3"></textarea> +</pre> + + <h3>{{_i}}Checkboxes and radios{{/i}}</h3> + <p>{{_i}}Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.{{/i}}</p> + <h4>{{_i}}Default (stacked){{/i}}</h4> + <form class="bs-docs-example"> + <label class="checkbox"> + <input type="checkbox" value=""> + {{_i}}Option one is this and that—be sure to include why it's great{{/i}} + </label> + <br> + <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> + </form> +<pre class="prettyprint linenums"> +<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> +</pre> + + <h4>{{_i}}Inline checkboxes{{/i}}</h4> + <p>{{_i}}Add the <code>.inline</code> class to a series of checkboxes or radios for controls appear on the same line.{{/i}}</p> + <form class="bs-docs-example"> + <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> </form> +<pre class="prettyprint linenums"> +<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> +</pre> + + <h3>{{_i}}Selects{{/i}}</h3> + <p>{{_i}}Use the default option or specify a <code>multiple="multiple"</code> to show multiple options at once.{{/i}}</p> + <form class="bs-docs-example"> + <select> + <option>something</option> + <option>2</option> + <option>3</option> + <option>4</option> + <option>5</option> + </select> + <br> + <select> + <option>1</option> + <option>2</option> + <option>3</option> + <option>4</option> + <option>5</option> + </select> + </form> +<pre class="prettyprint linenums"> +<select> + <option>something</option> + <option>2</option> + <option>3</option> + <option>4</option> + <option>5</option> +</select> + +<select> + <option>1</option> + <option>2</option> + <option>3</option> + <option>4</option> + <option>5</option> +</select> +</pre> + + + <hr class="bs-docs-separator"></hr> - <br> <h2>{{_i}}Extending form controls{{/i}}</h2> - <h3>{{_i}}Prepend & append inputs{{/i}}</h3> - <p>{{_i}}Input groups—with appended or prepended text—provide an easy way to give more context for your inputs. Great examples include the @ sign for Twitter usernames or $ for finances.{{/i}}</p> - <hr> - <h3>{{_i}}Checkboxes and radios{{/i}}</h3> - <p>{{_i}}Up to v1.4, Bootstrap required extra markup around checkboxes and radios to stack them. Now, it's a simple matter of repeating the <code><label class="checkbox"></code> that wraps the <code><input type="checkbox"></code>.{{/i}}</p> - <p>{{_i}}Inline checkboxes and radios are also supported. Just add <code>.inline</code> to any <code>.checkbox</code> or <code>.radio</code> and you're done.{{/i}}</p> - <hr> - <h4>{{_i}}Inline forms and append/prepend{{/i}}</h4> - <p>{{_i}}To use prepend or append inputs in an inline form, be sure to place the <code>.add-on</code> and <code>input</code> on the same line, without spaces.{{/i}}</p> - <hr> - <h4>{{_i}}Form help text{{/i}}</h4> - <p>{{_i}}To add help text for your form inputs, include inline help text with <code><span class="help-inline"></code> or a help text block with <code><p class="help-block"></code> after the input element.{{/i}}</p> - - <form class="form-horizontal"> - <fieldset> - <div class="control-group"> - <label class="control-label">{{_i}}Form grid sizes{{/i}}</label> - <div class="controls docs-input-sizes"> - <input class="span1" type="text" placeholder=".span1"> - <input class="span2" type="text" placeholder=".span2"> - <input class="span3" type="text" placeholder=".span3"> - <select class="span1"> - <option>1</option> - <option>2</option> - <option>3</option> - <option>4</option> - <option>5</option> - </select> - <select class="span2"> - <option>1</option> - <option>2</option> - <option>3</option> - <option>4</option> - <option>5</option> - </select> - <select class="span3"> - <option>1</option> - <option>2</option> - <option>3</option> - <option>4</option> - <option>5</option> - </select> - <p class="help-block">{{_i}}Use the same <code>.span*</code> classes from the grid system for input sizes.{{/i}}</p> - </div> - </div> - <div class="control-group"> - <label class="control-label">{{_i}}Alternate sizes{{/i}}</label> - <div class="controls docs-input-sizes"> - <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"> - <p class="help-block">{{_i}}You may also use static classes that don't map to the grid, adapt to the responsive CSS styles, or account for varying types of controls (e.g., <code>input</code> vs. <code>select</code>).{{/i}}</p> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="prependedInput">{{_i}}Prepended text{{/i}}</label> - <div class="controls"> - <div class="input-prepend"> - <span class="add-on">@</span><input class="span2" id="prependedInput" size="16" type="text" placeholder="{{_i}}Username{{/i}}"> - </div> - <p class="help-block">{{_i}}Here's some help text{{/i}}</p> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="appendedInput">{{_i}}Appended text{{/i}}</label> - <div class="controls"> - <div class="input-append"> - <input class="span2" id="appendedInput" size="16" type="text"><span class="add-on">.00</span> - </div> - <span class="help-inline">{{_i}}Here's more help text{{/i}}</span> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="appendedPrependedInput">{{_i}}Append and prepend{{/i}}</label> - <div class="controls"> - <div class="input-prepend input-append"> - <span class="add-on">$</span><input class="span2" id="appendedPrependedInput" size="16" type="text"><span class="add-on">.00</span> - </div> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="appendedInputButton">{{_i}}Append with button{{/i}}</label> - <div class="controls"> - <div class="input-append"> - <input class="span2" id="appendedInputButton" size="16" type="text"><button class="btn" type="button">Go!</button> - </div> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="appendedInputButtons">{{_i}}Two-button append{{/i}}</label> - <div class="controls"> - <div class="input-append"> - <input class="span2" id="appendedInputButtons" size="16" type="text"><button class="btn" type="button">Search</button><button class="btn" type="button">Options</button> - </div> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="inlineCheckboxes">{{_i}}Inline checkboxes{{/i}}</label> - <div class="controls"> - <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> - </div> - </div> - <div class="control-group"> - <label class="control-label" for="optionsCheckboxList">{{_i}}Checkboxes{{/i}}</label> - <div class="controls"> - <label class="checkbox"> - <input type="checkbox" name="optionsCheckboxList1" value="option1"> - {{_i}}Option one is this and that—be sure to include why it's great{{/i}} - </label> - <label class="checkbox"> - <input type="checkbox" name="optionsCheckboxList2" value="option2"> - {{_i}}Option two can also be checked and included in form results{{/i}} - </label> - <label class="checkbox"> - <input type="checkbox" name="optionsCheckboxList3" value="option3"> - {{_i}}Option three can—yes, you guessed it—also be checked and included in form results{{/i}} - </label> - <p class="help-block">{{_i}}<strong>Note:</strong> Labels surround all the options for much larger click areas and a more usable form.{{/i}}</p> - </div> + <p>{{_i}}Adding on top of existing browser controls, Bootstrap includes other useful form components.{{/i}}</p> + + <h3>{{_i}}Prepended and appended inputs{{/i}}</h3> + <p>{{_i}}Add text or buttons before or after any text-based input.{{/i}}</p> + + <h4>{{_i}}Default options{{/i}}</h4> + <p>{{_i}}Wrap a <code>.add-on</code> and an <code>input</code> with one of two classes to prepend or append text to an input.{{/i}}</p> + <form class="bs-docs-example"> + <div class="input-prepend"> + <span class="add-on">@</span><input class="span2" id="prependedInput" size="16" type="text" placeholder="{{_i}}Username{{/i}}"> + </div> + <br> + <div class="input-append"> + <input class="span2" id="appendedInput" size="16" type="text"><span class="add-on">.00</span> + </div> + </form> +<pre class="prettyprint linenums"> +<div class="input-prepend"> + <span class="add-on">@</span><input class="span2" id="prependedInput" size="16" type="text" placeholder="{{_i}}Username{{/i}}"> +</div> +<div class="input-append"> + <input class="span2" id="appendedInput" size="16" type="text"><span class="add-on">.00</span> +</div> +</pre> + + <h4>{{_i}}Combined{{/i}}</h4> + <p>{{_i}}Use both classes and two instances of <code>.add-on</code> to prepend and append an input.{{/i}}</p> + <form class="bs-docs-example form-inline"> + <div class="input-prepend input-append"> + <span class="add-on">$</span><input class="span2" id="appendedPrependedInput" size="16" type="text"><span class="add-on">.00</span> + </div> + </form> +<pre class="prettyprint linenums"> +<div class="input-prepend input-append"> + <span class="add-on">$</span><input class="span2" id="appendedPrependedInput" size="16" type="text"><span class="add-on">.00</span> +</div> +</pre> + + <h4>{{_i}}Buttons instead of text{{/i}}</h4> + <p>{{_i}}Instead of a <code><span></code> with text, use a <code>.btn</code> to attach a button (or two) to an input.{{/i}}</p> + <form class="bs-docs-example"> + <div class="input-append"> + <input class="span2" id="appendedInputButton" size="16" type="text"><button class="btn" type="button">Go!</button> + </div> + <br> + <div class="input-append"> + <input class="span2" id="appendedInputButtons" size="16" type="text"><button class="btn" type="button">Search</button><button class="btn" type="button">Options</button> + </div> + </form> +<pre class="prettyprint linenums"> +<div class="input-append"> + <input class="span2" id="appendedInputButton" size="16" type="text"><button class="btn" type="button">Go!</button> +</div> + +<div class="input-append"> + <input class="span2" id="appendedInputButtons" size="16" type="text"><button class="btn" type="button">Search</button><button class="btn" type="button">Options</button> +</div> +</pre> + + <h3>{{_i}}Control sizing{{/i}}</h3> + <p>{{_i}}Use relative sizing classes like <code>.input-large</code> or match your inputs to the grid column sizes using <code>.span*</code> classes.{{/i}}</p> + + <h4>{{_i}}Relative sizing{{/i}}</h4> + <form class="bs-docs-example"> + <div class="controls docs-input-sizes"> + <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"> + </div> + </form> +<pre class="prettyprint linenums"> +<input class="input-mini" type="text"> +<input class="input-small" type="text"> +<input class="input-medium" type="text"> +<input class="input-large" type="text"> +<input class="input-xlarge" type="text"> +<input class="input-xxlarge" type="text"> +</pre> + + <h4>{{_i}}Grid sizing{{/i}}</h4> + <p>{{_i}}Use <code>.span1</code> to <code>.span12</code> for inputs that match the same sizes of the grid columns.{{/i}}</p> + <form class="bs-docs-example"> + <div class="controls docs-input-sizes"> + <input class="span1" type="text" placeholder=".span1"> + <input class="span2" type="text" placeholder=".span2"> + <input class="span3" type="text" placeholder=".span3"> + <select class="span1"> + <option>1</option> + <option>2</option> + <option>3</option> + <option>4</option> + <option>5</option> + </select> + <select class="span2"> + <option>1</option> + <option>2</option> + <option>3</option> + <option>4</option> + <option>5</option> + </select> + <select class="span3"> + <option>1</option> + <option>2</option> + <option>3</option> + <option>4</option> + <option>5</option> + </select> + </div> + </form> +<pre class="prettyprint linenums"> +<input class="span1" type="text"> +<input class="span2" type="text"> +<input class="span3" type="text"> +</pre> + + <h3>{{_i}}Uneditable inputs{{/i}}</h3> + <p>{{_i}}Present data in a form that's not editable without using actual form markup.{{/i}}</p> + <form class="bs-docs-example"> + <span class="input-xlarge uneditable-input">Some value here</span> + </form> +<pre class="prettyprint linenums"> + <span class="input-xlarge uneditable-input">Some value here</span> +</pre> + + <h3>{{_i}}Form actions{{/i}}</h3> + <p>{{_i}}End a form with a group of actions (buttons). When placed within a <code>.form-horizontal</code>, the buttons will automatically indent to line up with the form controls.{{/i}}</p> + <form class="bs-docs-example"> + <div class="form-actions"> + <button type="submit" class="btn btn-primary">{{_i}}Save changes{{/i}}</button> + <button class="btn">{{_i}}Cancel{{/i}}</button> + </div> + </form> +<pre class="prettyprint linenums"> +<div class="form-actions"> + <button type="submit" class="btn btn-primary">{{_i}}Save changes{{/i}}</button> + <button class="btn">{{_i}}Cancel{{/i}}</button> +</div> +</pre> + + <h3>{{_i}}Help text{{/i}}</h3> + <p>{{_i}}Inline and block level support for help text that appears around form controls.{{/i}}</p> + <h4>{{_i}}Inline help{{/i}}</h4> + <form class="bs-docs-example form-inline"> + <input type="text"> <span class="help-inline">Inline help text</span> + </form> +<pre class="prettyprint linenums"> +<span class="help-inline">Inline help text</span> +</pre> + + <h4>{{_i}}Block help{{/i}}</h4> + <form class="bs-docs-example form-inline"> + <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> +<pre class="prettyprint linenums"> +<span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span> +</pre> + + + <hr class="bs-docs-separator"></hr> + + + <h2>{{_i}}Form control states{{/i}}</h2> + <p>{{_i}}Provide feedback to users or visitors with basic feedback states on form controls and labels.{{/i}}</p> + + <h3>{{_i}}Input focus{{/i}}</h3> + <p>{{_i}}We remove the default <code>outline</code> styles on some form controls and apply a <code>box-shadow</code> in its place for <code>:focus</code>.{{/i}}</p> + <form class="bs-docs-example form-inline"> + <input class="input-xlarge focused" id="focusedInput" type="text" value="{{_i}}This is focused...{{/i}}"> + </form> +<pre class="prettyprint linenums"> +<input class="input-xlarge" id="focusedInput" type="text" value="{{_i}}This is focused...{{/i}}"> +</pre> + + <h3>{{_i}}Disabled inputs{{/i}}</h3> + <p>{{_i}}Add the <code>disabled</code> attribute on an input to prevent user input and trigger a slightly different look.{{/i}}</p> + <form class="bs-docs-example form-inline"> + <input class="input-xlarge" id="disabledInput" type="text" placeholder="{{_i}}Disabled input here…{{/i}}" disabled> + </form> +<pre class="prettyprint linenums"> +<input class="input-xlarge" id="disabledInput" type="text" placeholder="{{_i}}Disabled input here...{{/i}}" disabled> +</pre> + + <h3>{{_i}}Validation states{{/i}}</h3> + <p>{{_i}}Bootstrap includes validation styles for error, warning, and success messages. To use, add the appropriate class to the surrounding <code>.control-group</code>.{{/i}}</p> + + <form class="bs-docs-example form-horizontal"> + <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 class="control-group"> - <label class="control-label">{{_i}}Radio buttons{{/i}}</label> - <div class="controls"> - <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> - </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 class="form-actions"> - <button type="submit" class="btn btn-primary">{{_i}}Save changes{{/i}}</button> - <button class="btn">{{_i}}Cancel{{/i}}</button> + </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> - </fieldset> + </div> </form> +<pre class="prettyprint linenums"> +<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 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> +</pre> + </section> @@ -1160,6 +1133,9 @@ <div class="page-header"> <h1>{{_i}}Buttons{{/i}}</h1> </div> + + <h2>Default buttons</h2> + <p>{{_i}}Button styles can be applied to anything with the <code>.btn</code> class applied. However, typically you'll want to apply these to only <code><a></code> and <code><button></code> elements for the best rendering.{{/i}}</p> <table class="table table-bordered table-striped"> <thead> <tr> @@ -1207,13 +1183,14 @@ </tbody> </table> - <h3>{{_i}}Buttons for actions{{/i}}</h3> - <p>{{_i}}As a convention, buttons should only be used for actions while hyperlinks are to be used for objects. For instance, "Download" should be a button while "recent activity" should be a link.{{/i}}</p> - <p>{{_i}}Button styles can be applied to anything with the <code>.btn</code> class applied. However, typically you'll want to apply these to only <code><a></code> and <code><button></code> elements.{{/i}}</p> - <h3>{{_i}}Cross browser compatibility{{/i}}</h3> + <h4>{{_i}}Cross browser compatibility{{/i}}</h4> <p>{{_i}}IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled <code>button</code> elements, rendering text gray with a nasty text-shadow that we cannot fix.{{/i}}</p> - <h3>{{_i}}Multiple sizes{{/i}}</h3> + + <hr class="bs-docs-separator"> + + + <h2>{{_i}}Button sizes{{/i}}</h2> <p>{{_i}}Fancy larger or smaller buttons? Add <code>.btn-large</code>, <code>.btn-small</code>, or <code>.btn-mini</code> for two additional sizes.{{/i}}</p> <p> <button class="btn btn-large btn-primary">{{_i}}Primary action{{/i}}</button> @@ -1227,29 +1204,51 @@ <button class="btn btn-mini btn-primary">{{_i}}Primary action{{/i}}</button> <button class="btn btn-mini">{{_i}}Action{{/i}}</button> </p> - <br> - <h3>{{_i}}Disabled state{{/i}}</h3> - <p>{{_i}}For disabled buttons, add the <code>.disabled</code> class to links and the <code>disabled</code> attribute for <code><button></code> elements.{{/i}}</p> - <p> + + + <hr class="bs-docs-separator"> + + + <h2>{{_i}}Disabled state{{/i}}</h2> + <p>{{_i}}Make buttons look unclickable by fading them back 50%.{{/i}}</p> + + <h3>Anchor element</h3> + <p>{{_i}}Add the <code>.disabled</code> class to <code><a></code> buttons.{{/i}}</p> + <p class="bs-docs-example"> <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> </p> - <p style="margin-bottom: 18px;"> - <button class="btn btn-large btn-primary disabled" disabled="disabled">{{_i}}Primary button{{/i}}</button> - <button class="btn btn-large" disabled>{{_i}}Button{{/i}}</button> - </p> +<pre class="prettyprint linenums"> +<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> +</pre> <p> <span class="label label-info">{{_i}}Heads up!{{/i}}</span> {{_i}}We use <code>.disabled</code> as a utility class here, similar to the common <code>.active</code> class, so no prefix is required.{{/i}} </p> - <h3>{{_i}}One class, multiple tags{{/i}}</h3> + <h3>Button element</h3> + <p>{{_i}}Add the <code>disabled</code> attribute to <code><button></code> buttons.{{/i}}</p> + <p class="bs-docs-example"> + <button class="btn btn-large btn-primary disabled" disabled="disabled">{{_i}}Primary button{{/i}}</button> + <button class="btn btn-large" disabled>{{_i}}Button{{/i}}</button> + </p> +<pre class="prettyprint linenums"> +<button class="btn btn-large btn-primary disabled" disabled="disabled">{{_i}}Primary button{{/i}}</button> +<button class="btn btn-large" disabled>{{_i}}Button{{/i}}</button> +</pre> + + + <hr class="bs-docs-separator"> + + + <h2>{{_i}}One class, multiple tags{{/i}}</h2> <p>{{_i}}Use the <code>.btn</code> class on an <code><a></code>, <code><button></code>, or <code><input></code> element.{{/i}}</p> -<form> -<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}}"> +<form class="bs-docs-example"> + <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}}"> </form> <pre class="prettyprint linenums"> <a class="btn" href="">{{_i}}Link{{/i}}</a> @@ -1273,6 +1272,9 @@ <div class="page-header"> <h1>{{_i}}Icons <small>Graciously provided by <a href="http://glyphicons.com" target="_blank">Glyphicons</a></small>{{/i}}</h1> </div> + + <h2>{{_i}}Icon glyphs{{/i}}</h2> + <p>{{_i}}140 icons in sprite form, available in dark gray (default) and white, provided by <a href="http://glyphicons.com" target="_blank">Glyphicons</a>.{{/i}}</p> <div class="row"> <div class="span2"> <ul class="the-icons"> @@ -1304,6 +1306,10 @@ <li><i class="icon-download"></i> icon-download</li> <li><i class="icon-upload"></i> icon-upload</li> <li><i class="icon-inbox"></i> icon-inbox</li> + </ul> + </div> + <div class="span2"> + <ul class="the-icons"> <li><i class="icon-play-circle"></i> icon-play-circle</li> <li><i class="icon-repeat"></i> icon-repeat</li> <li><i class="icon-refresh"></i> icon-refresh</li> @@ -1311,10 +1317,6 @@ <li><i class="icon-lock"></i> icon-lock</li> <li><i class="icon-flag"></i> icon-flag</li> <li><i class="icon-headphones"></i> icon-headphones</li> - </ul> - </div> - <div class="span2"> - <ul class="the-icons"> <li><i class="icon-volume-off"></i> icon-volume-off</li> <li><i class="icon-volume-down"></i> icon-volume-down</li> <li><i class="icon-volume-up"></i> icon-volume-up</li> @@ -1336,6 +1338,10 @@ <li><i class="icon-align-right"></i> icon-align-right</li> <li><i class="icon-align-justify"></i> icon-align-justify</li> <li><i class="icon-list"></i> icon-list</li> + </ul> + </div> + <div class="span2"> + <ul class="the-icons"> <li><i class="icon-indent-left"></i> icon-indent-left</li> <li><i class="icon-indent-right"></i> icon-indent-right</li> <li><i class="icon-facetime-video"></i> icon-facetime-video</li> @@ -1350,10 +1356,6 @@ <li><i class="icon-move"></i> icon-move</li> <li><i class="icon-step-backward"></i> icon-step-backward</li> <li><i class="icon-fast-backward"></i> icon-fast-backward</li> - </ul> - </div> - <div class="span2"> - <ul class="the-icons"> <li><i class="icon-backward"></i> icon-backward</li> <li><i class="icon-play"></i> icon-play</li> <li><i class="icon-pause"></i> icon-pause</li> @@ -1368,6 +1370,10 @@ <li><i class="icon-minus-sign"></i> icon-minus-sign</li> <li><i class="icon-remove-sign"></i> icon-remove-sign</li> <li><i class="icon-ok-sign"></i> icon-ok-sign</li> + </ul> + </div> + <div class="span2"> + <ul class="the-icons"> <li><i class="icon-question-sign"></i> icon-question-sign</li> <li><i class="icon-info-sign"></i> icon-info-sign</li> <li><i class="icon-screenshot"></i> icon-screenshot</li> @@ -1389,10 +1395,6 @@ <li><i class="icon-leaf"></i> icon-leaf</li> <li><i class="icon-fire"></i> icon-fire</li> <li><i class="icon-eye-open"></i> icon-eye-open</li> - </ul> - </div> - <div class="span2"> - <ul class="the-icons"> <li><i class="icon-eye-close"></i> icon-eye-close</li> <li><i class="icon-warning-sign"></i> icon-warning-sign</li> <li><i class="icon-plane"></i> icon-plane</li> @@ -1400,6 +1402,10 @@ <li><i class="icon-random"></i> icon-random</li> <li><i class="icon-comment"></i> icon-comment</li> <li><i class="icon-magnet"></i> icon-magnet</li> + </ul> + </div> + <div class="span2"> + <ul class="the-icons"> <li><i class="icon-chevron-up"></i> icon-chevron-up</li> <li><i class="icon-chevron-down"></i> icon-chevron-down</li> <li><i class="icon-retweet"></i> icon-retweet</li> @@ -1432,16 +1438,12 @@ </div> </div> - <br> + <hr class="bs-docs-separator"> - <h3>{{_i}}Built as a sprite{{/i}}</h3> - <p>{{_i}}Instead of making every icon an extra request, we've compiled them into a sprite—a bunch of images in one file that uses CSS to position the images with <code>background-position</code>. This is the same method we use on Twitter.com and it has worked well for us.{{/i}}</p> - <p>{{_i}}All icons classes are prefixed with <code>.icon-</code> for proper namespacing and scoping, much like our other components. This will help avoid conflicts with other tools.{{/i}}</p> - <p>{{_i}}<a href="http://glyphicons.com" target="_blank">Glyphicons</a> has granted us use of the Halflings set in our open-source toolkit so long as we provide a link and credit here in the docs. Please consider doing the same in your projects.{{/i}}</p> - <h3>{{_i}}How to use{{/i}}</h3> - <p>{{_i}}Bootstrap uses an <code><i></code> tag for all icons, but they have no case class—only a shared prefix. To use, place the following code just about anywhere:{{/i}}</p> + <h2>{{_i}}How to use{{/i}}</h2> + <p>{{_i}}All icons require an <code><i></code> tag with a unique class, prefixed with <code>icon-</code>. To use, place the following code just about anywhere:{{/i}}</p> <pre class="prettyprint linenums"> <i class="icon-search"></i> </pre> @@ -1449,66 +1451,55 @@ <pre class="prettyprint linenums"> <i class="icon-search icon-white"></i> </pre> - <p>{{_i}}There are 140 classes to choose from for your icons. Just add an <code><i></code> tag with the right classes and you're set. You can find the full list in <strong>sprites.less</strong> or right here in this document.{{/i}}</p> <p> <span class="label label-info">{{_i}}Heads up!{{/i}}</span> {{_i}}When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <code><i></code> tag for proper spacing.{{/i}} </p> - <h3>{{_i}}Use cases{{/i}}</h3> - <p>{{_i}}Icons are great, but where would one use them? Here are a few ideas:{{/i}}</p> - <ul> - <li>{{_i}}As visuals for your sidebar navigation{{/i}}</li> - <li>{{_i}}For a purely icon-driven navigation{{/i}}</li> - <li>{{_i}}For buttons to help convey the meaning of an action{{/i}}</li> - <li>{{_i}}With links to share context on a user's destination{{/i}}</li> - </ul> - <p>{{_i}}Essentially, anywhere you can put an <code><i></code> tag, you can put an icon.{{/i}}</p> + + <hr class="bs-docs-separator"> - <h3>{{_i}}Examples{{/i}}</h3> + <h2>{{_i}}Icon examples{{/i}}</h2> <p>{{_i}}Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.{{/i}}</p> - <div class="btn-toolbar" style="margin-bottom: 9px"> - <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 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> + <h4>{{_i}}Buttons{{/i}}</h4> + <div class="bs-docs-example"> + <div class="btn-toolbar" style="margin-bottom: 9px"> + <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 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> </div> - </div> - <p> - <a class="btn" href="#"><i class="icon-refresh"></i> {{_i}}Refresh{{/i}}</a> - <a class="btn btn-success" href="#"><i class="icon-shopping-cart icon-white"></i> {{_i}}Checkout{{/i}}</a> - <a class="btn btn-danger" href="#"><i class="icon-trash icon-white"></i> {{_i}}Delete{{/i}}</a> - </p> - <p> - <a class="btn btn-large" href="#"><i class="icon-comment"></i> {{_i}}Comment{{/i}}</a> - <a class="btn btn-small" href="#"><i class="icon-cog"></i> {{_i}}Settings{{/i}}</a> - <a class="btn btn-small btn-info" href="#"><i class="icon-info-sign icon-white"></i> {{_i}}More Info{{/i}}</a> - </p> + </div>{{! /bs-docs-example }} - <div class="well" style="padding: 8px 0;"> - <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> - </div> <!-- /well --> + <h4>{{_i}}Navigation{{/i}}</h4> + <div class="bs-docs-example"> + <div class="well" style="padding: 8px 0; margin-bottom: 0;"> + <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> + </div>{{! /well }} + </div>{{! /bs-docs-example }} - <form> + <h4>{{_i}}Form fields{{/i}}</h4> + <form class="bs-docs-example form-horizontal"> <div class="control-group"> <label class="control-label" for="inputIcon">{{_i}}Email address{{/i}}</label> <div class="controls"> diff --git a/docs/templates/pages/components.mustache b/docs/templates/pages/components.mustache index d05eacf534..ea8621b45e 100644 --- a/docs/templates/pages/components.mustache +++ b/docs/templates/pages/components.mustache @@ -3,9 +3,37 @@ <header class="jumbotron subhead" id="overview"> <h1>{{_i}}Components{{/i}}</h1> <p class="lead">{{_i}}Dozens of reusable components are built into Bootstrap to provide navigation, alerts, popovers, and much more.{{/i}}</p> + <div class="subnav"> + <ul class="nav nav-pills"> + <li class="dropdown"> + <a class="dropdown-toggle" data-toggle="dropdown" href="#">{{_i}}Buttons{{/i}} <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="#buttonGroups">{{_i}}Button groups{{/i}}</a></li> + <li><a href="#buttonDropdowns">{{_i}}Button dropdowns{{/i}}</a></li> + </ul> + </li> + <li class="dropdown"> + <a class="dropdown-toggle" data-toggle="dropdown" href="#">{{_i}}Navigation{{/i}} <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="#navs">{{_i}}Nav, tabs, pills{{/i}}</a></li> + <li><a href="#navbar">{{_i}}Navbar{{/i}}</a></li> + <li><a href="#breadcrumbs">{{_i}}Breadcrumbs{{/i}}</a></li> + <li><a href="#pagination">{{_i}}Pagination{{/i}}</a></li> + </ul> + </li> + <li><a href="#labels">{{_i}}Labels{{/i}}</a></li> + <li><a href="#badges">{{_i}}Badges{{/i}}</a></li> + <li><a href="#typography">{{_i}}Typography{{/i}}</a></li> + <li><a href="#thumbnails">{{_i}}Thumbnails{{/i}}</a></li> + <li><a href="#alerts">{{_i}}Alerts{{/i}}</a></li> + <li><a href="#progress">{{_i}}Progress bars{{/i}}</a></li> + <li><a href="#misc">{{_i}}Miscellaneous{{/i}}</a></li> + </ul> + </div> </header> + <!-- Button Groups ================================================== --> <section id="buttonGroups"> @@ -13,10 +41,9 @@ <h1>{{_i}}Button groups{{/i}} <small>{{_i}}Join buttons for more toolbar-like functionality{{/i}}</small></h1> </div> - <h3>{{_i}}Button groups{{/i}}</h3> - <p>{{_i}}Use button groups to join multiple buttons together as one composite component. Build them with a series of <code><a></code> or <code><button></code> elements.{{/i}}</p> - <h3>{{_i}}Best practices{{/i}}</h3> - <p>{{_i}}We recommend the following guidelines for using button groups and toolbars:{{/i}}</p> + + <h2>{{_i}}Description and best practices{{/i}}</h2> + <p>{{_i}}Use button groups to join multiple buttons together as one composite component. Build them with a series of <code><a></code> or <code><button></code> elements. We recommend the following guidelines for using button groups and toolbars:{{/i}}</p> <ul> <li>{{_i}}Always use the same element in a single button group, <code><a></code> or <code><button></code>.{{/i}}</li> <li>{{_i}}Don't mix buttons of different colors in the same button group.{{/i}}</li> @@ -24,10 +51,17 @@ </ul> <p>{{_i}}<span class="label label-info">Related</span> Button groups with dropdowns (see below) should be called out separately and always include a dropdown caret to indicate intended behavior.{{/i}}</p> - <h3>{{_i}}Default example{{/i}}</h3> - <p>{{_i}}Here's how the HTML looks for a standard button group built with anchor tag buttons:{{/i}}</p> - <div class=""> - <div class="btn-group" style="margin: 9px 0;"> + + <hr class="bs-docs-separator"> + + + <h2>{{_i}}Examples and variations{{/i}}</h2> + <p>{{_i}}Two basic options, along with two more specific variations.{{/i}}</p> + + <h3>{{_i}}Basic button group{{/i}}</h3> + <p>{{_i}}Wrap a series of buttons with <code>.btn</code> in <code>.btn-group</code>.{{/i}}</p> + <div class="bs-docs-example"> + <div class="btn-group" style="margin: 9px 0 5px;"> <button class="btn">{{_i}}Left{{/i}}</button> <button class="btn">{{_i}}Middle{{/i}}</button> <button class="btn">{{_i}}Right{{/i}}</button> @@ -40,22 +74,25 @@ <button class="btn">3</button> </div> </pre> + <h3>{{_i}}Toolbar example{{/i}}</h3> <p>{{_i}}Combine sets of <code><div class="btn-group"></code> into a <code><div class="btn-toolbar"></code> for more complex components.{{/i}}</p> - <div class="btn-toolbar"> - <div class="btn-group"> - <button class="btn">1</button> - <button class="btn">2</button> - <button class="btn">3</button> - <button class="btn">4</button> - </div> - <div class="btn-group"> - <button class="btn">5</button> - <button class="btn">6</button> - <button class="btn">7</button> - </div> - <div class="btn-group"> - <button class="btn">8</button> + <div class="bs-docs-example"> + <div class="btn-toolbar" style="margin: 0;"> + <div class="btn-group"> + <button class="btn">1</button> + <button class="btn">2</button> + <button class="btn">3</button> + <button class="btn">4</button> + </div> + <div class="btn-group"> + <button class="btn">5</button> + <button class="btn">6</button> + <button class="btn">7</button> + </div> + <div class="btn-group"> + <button class="btn">8</button> + </div> </div> </div> <pre class="prettyprint linenums"> @@ -65,9 +102,10 @@ </div> </div> </pre> + <h3>{{_i}}Checkbox and radio flavors{{/i}}</h3> <p>{{_i}}Button groups can also function as radios, where only one button may be active, or checkboxes, where any number of buttons may be active. View <a href="./javascript.html#buttons">the Javascript docs</a> for that.{{/i}}</p> - <p><a class="btn js-btn" href="./javascript.html#buttons">{{_i}}Get the javascript »{{/i}}</a></p> + <h3>{{_i}}Dropdowns in button groups{{/i}}</h3> <p><span class="label label-info">{{_i}}Heads up!{{/i}}</span> {{_i}}Buttons with dropdowns must be individually wrapped in their own <code>.btn-group</code> within a <code>.btn-toolbar</code> for proper rendering.{{/i}}</p> </section> @@ -81,87 +119,83 @@ <h1>{{_i}}Button dropdown menus{{/i}} <small>{{_i}}Built on button groups to provide contextual menus{{/i}}</small></h1> </div> - <h2>{{_i}}Button dropdowns{{/i}}</h2> - <h3>{{_i}}Overview and examples{{/i}}</h3> + <h2>{{_i}}Overview and examples{{/i}}</h2> <p>{{_i}}Use any button to trigger a dropdown menu by placing it within a <code>.btn-group</code> and providing the proper menu markup.{{/i}}</p> - <div class="btn-toolbar" style="margin-top: 18px;"> - <div class="btn-group"> - <button class="btn dropdown-toggle" data-toggle="dropdown">{{_i}}Action{{/i}} <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">{{_i}}Action{{/i}} <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-danger dropdown-toggle" data-toggle="dropdown">{{_i}}Danger{{/i}} <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - </div> - <div class="btn-toolbar"> - <div class="btn-group"> - <button class="btn btn-warning dropdown-toggle" data-toggle="dropdown">{{_i}}Warning{{/i}} <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-success dropdown-toggle" data-toggle="dropdown">{{_i}}Success{{/i}} <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-info dropdown-toggle" data-toggle="dropdown">{{_i}}Info{{/i}} <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-inverse dropdown-toggle" data-toggle="dropdown">{{_i}}Inverse{{/i}} <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - </div><!-- /btn-toolbar --> - - <h3>{{_i}}Example markup{{/i}}</h3> - <p>{{_i}}Similar to a button group, our markup uses regular button markup, but with a handful of additions to refine the style and support Bootstrap's dropdown jQuery plugin.{{/i}}</p> + <div class="bs-docs-example"> + <div class="btn-toolbar" style="margin: 0;"> + <div class="btn-group"> + <button class="btn dropdown-toggle" data-toggle="dropdown">{{_i}}Action{{/i}} <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">{{_i}}Action{{/i}} <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-danger dropdown-toggle" data-toggle="dropdown">{{_i}}Danger{{/i}} <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-warning dropdown-toggle" data-toggle="dropdown">{{_i}}Warning{{/i}} <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-success dropdown-toggle" data-toggle="dropdown">{{_i}}Success{{/i}} <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-info dropdown-toggle" data-toggle="dropdown">{{_i}}Info{{/i}} <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-inverse dropdown-toggle" data-toggle="dropdown">{{_i}}Inverse{{/i}} <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + </div><!-- /btn-toolbar --> + </div>{{! /example }} <pre class="prettyprint linenums"> <div class="btn-group"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> @@ -176,188 +210,191 @@ <h3>{{_i}}Works with all button sizes{{/i}}</h3> <p>{{_i}}Button dropdowns work at any size. your button sizes to <code>.btn-large</code>, <code>.btn-small</code>, or <code>.btn-mini</code>.{{/i}}</p> - <div class="btn-toolbar" style="margin-top: 18px;"> - <div class="btn-group"> - <button class="btn btn-large dropdown-toggle" data-toggle="dropdown">{{_i}}Large button{{/i}} <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-small dropdown-toggle" data-toggle="dropdown">{{_i}}Small button{{/i}} <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-mini dropdown-toggle" data-toggle="dropdown">{{_i}}Mini button{{/i}} <span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - </div><!-- /btn-toolbar --> + <div class="bs-docs-example"> + <div class="btn-toolbar" style="margin: 0;"> + <div class="btn-group"> + <button class="btn btn-large dropdown-toggle" data-toggle="dropdown">{{_i}}Large button{{/i}} <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-small dropdown-toggle" data-toggle="dropdown">{{_i}}Small button{{/i}} <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-mini dropdown-toggle" data-toggle="dropdown">{{_i}}Mini button{{/i}} <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + </div><!-- /btn-toolbar --> + </div>{{! /example }} <h3>{{_i}}Requires javascript{{/i}}</h3> <p>{{_i}}Button dropdowns require the <a href="./javascript.html#dropdowns">Bootstrap dropdown plugin</a> to function.{{/i}}</p> <p>{{_i}}In some cases—like mobile—dropdown menus will extend outside the viewport. You need to resolve the alignment manually or with custom javascript.{{/i}}</p> - <br> - <h2>{{_i}}Split button dropdowns{{/i}}</h2> + <hr class="bs-docs-separator"> - <h3>{{_i}}Overview and examples{{/i}}</h3> + + <h2>{{_i}}Split button dropdowns{{/i}}</h2> <p>{{_i}}Building on the button group styles and markup, we can easily create a split button. Split buttons feature a standard action on the left and a dropdown toggle on the right with contextual links.{{/i}}</p> - <div class="btn-toolbar" style="margin-top: 18px;"> - <div class="btn-group"> - <button class="btn">{{_i}}Action{{/i}}</button> - <button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-primary">{{_i}}Action{{/i}}</button> - <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-danger">{{_i}}Danger{{/i}}</button> - <button class="btn btn-danger dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - </div> - <div class="btn-toolbar"> - <div class="btn-group"> - <button class="btn btn-warning">{{_i}}Warning{{/i}}</button> - <button class="btn btn-warning dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-success">{{_i}}Success{{/i}}</button> - <button class="btn btn-success dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group"> - <button class="btn btn-info">{{_i}}Info{{/i}}</button> - <button class="btn btn-info dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - </div> - <div class="btn-toolbar"> - <div class="btn-group"> - <button class="btn btn-inverse">{{_i}}Inverse{{/i}}</button> - <button class="btn btn-inverse dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - </div><!-- /btn-toolbar --> - <h3>{{_i}}Sizes{{/i}}</h3> - <p>{{_i}}Utilize the extra button classes <code>.btn-mini</code>, <code>.btn-small</code>, or <code>.btn-large</code> for sizing.{{/i}}</p> - <div class="btn-toolbar"> - <div class="btn-group"> - <button class="btn btn-large">{{_i}}Large action{{/i}}</button> - <button class="btn btn-large dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - </div><!-- /btn-toolbar --> - <div class="btn-toolbar"> - <div class="btn-group"> - <button class="btn btn-small">{{_i}}Small action{{/i}}</button> - <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - </div><!-- /btn-toolbar --> - <div class="btn-toolbar"> - <div class="btn-group"> - <button class="btn btn-mini">{{_i}}Mini action{{/i}}</button> - <button class="btn btn-mini dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - </div><!-- /btn-toolbar --> + <div class="bs-docs-example"> + <div class="btn-toolbar" style="margin: 0;"> + <div class="btn-group"> + <button class="btn">{{_i}}Action{{/i}}</button> + <button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-primary">{{_i}}Action{{/i}}</button> + <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-danger">{{_i}}Danger{{/i}}</button> + <button class="btn btn-danger dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-warning">{{_i}}Warning{{/i}}</button> + <button class="btn btn-warning dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-success">{{_i}}Success{{/i}}</button> + <button class="btn btn-success dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-info">{{_i}}Info{{/i}}</button> + <button class="btn btn-info dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button class="btn btn-inverse">{{_i}}Inverse{{/i}}</button> + <button class="btn btn-inverse dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + </div><!-- /btn-toolbar --> + </div>{{! /example }} <pre class="prettyprint linenums"> <div class="btn-group"> - ... - <ul class="dropdown-menu pull-right"> + <button class="btn">{{_i}}Action{{/i}}</button> + <button class="btn dropdown-toggle" data-toggle="dropdown"> + <span class="caret"></span> + </button> + <ul class="dropdown-menu"> <!-- {{_i}}dropdown menu links{{/i}} --> </ul> </div> </pre> - <h3>{{_i}}Example markup{{/i}}</h3> - <p>{{_i}}We expand on the normal button dropdowns to provide a second button action that operates as a separate dropdown trigger.{{/i}}</p> + <h3>{{_i}}Sizes{{/i}}</h3> + <p>{{_i}}Utilize the extra button classes <code>.btn-mini</code>, <code>.btn-small</code>, or <code>.btn-large</code> for sizing.{{/i}}</p> + <div class="bs-docs-example"> + <div class="btn-toolbar"> + <div class="btn-group"> + <button class="btn btn-large">{{_i}}Large action{{/i}}</button> + <button class="btn btn-large dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + </div><!-- /btn-toolbar --> + <div class="btn-toolbar"> + <div class="btn-group"> + <button class="btn btn-small">{{_i}}Small action{{/i}}</button> + <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + </div><!-- /btn-toolbar --> + <div class="btn-toolbar"> + <div class="btn-group"> + <button class="btn btn-mini">{{_i}}Mini action{{/i}}</button> + <button class="btn btn-mini dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + </div><!-- /btn-toolbar --> + </div>{{! /example }} <pre class="prettyprint linenums"> <div class="btn-group"> - <button class="btn">{{_i}}Action{{/i}}</button> - <button class="btn dropdown-toggle" data-toggle="dropdown"> + <button class="btn btn-mini">{{_i}}Action{{/i}}</button> + <button class="btn btn-mini dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span> </button> <ul class="dropdown-menu"> @@ -365,32 +402,35 @@ </ul> </div> </pre> + <h3>{{_i}}Dropup menus{{/i}}</h3> <p>{{_i}}Dropdown menus can also be toggled from the bottom up by adding a single class to the immediate parent of <code>.dropdown-menu</code>. It will flip the direction of the <code>.caret</code> and reposition the menu itself to move from the bottom up instead of top down.{{/i}}</p> - <div class="btn-toolbar" style="margin-top: 9px;"> - <div class="btn-group dropup"> - <button class="btn">{{_i}}Dropup{{/i}}</button> - <button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - <div class="btn-group dropup"> - <button class="btn primary">{{_i}}Right dropup{{/i}}</button> - <button class="btn primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> - <ul class="dropdown-menu pull-right"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </div><!-- /btn-group --> - </div> + <div class="bs-docs-example"> + <div class="btn-toolbar" style="margin: 0;"> + <div class="btn-group dropup"> + <button class="btn">{{_i}}Dropup{{/i}}</button> + <button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group dropup"> + <button class="btn primary">{{_i}}Right dropup{{/i}}</button> + <button class="btn primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu pull-right"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </div><!-- /btn-group --> + </div> + </div>{{! /example }} <pre class="prettyprint linenums"> <div class="btn-group dropup"> <button class="btn">{{_i}}Dropup{{/i}}</button> @@ -415,21 +455,17 @@ </div> <h2>{{_i}}Lightweight defaults{{/i}} <small>{{_i}}Same markup, different classes{{/i}}</small></h2> - - <h3>{{_i}}Powerful base class{{/i}}</h3> <p>{{_i}}All nav components here—tabs, pills, and lists—<strong>share the same base markup and styles</strong> through the <code>.nav</code> class.{{/i}}</p> - <h3>{{_i}}When to use{{/i}}</h3> - <p>{{_i}}Tabs and pills are great for sections of content or navigating between pages of related content.{{/i}}</p> - <h3>{{_i}}Component alignment{{/i}}</h3> - <p>{{_i}}To align nav links, use the <code>.pull-left</code> or <code>.pull-right</code> utility classes. Both classes will add a CSS float in the specified direction.{{/i}}</p> <h3>{{_i}}Basic tabs{{/i}}</h3> <p>{{_i}}Take a regular <code><ul></code> of links and add <code>.nav-tabs</code>:{{/i}}</p> - <ul class="nav nav-tabs"> - <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> - <li><a href="#">{{_i}}Profile{{/i}}</a></li> - <li><a href="#">{{_i}}Messages{{/i}}</a></li> - </ul> + <div class="bs-docs-example"> + <ul class="nav nav-tabs"> + <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> + <li><a href="#">{{_i}}Profile{{/i}}</a></li> + <li><a href="#">{{_i}}Messages{{/i}}</a></li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="nav nav-tabs"> <li class="active"> @@ -442,11 +478,13 @@ <h3>{{_i}}Basic pills{{/i}}</h3> <p>{{_i}}Take that same HTML, but use <code>.nav-pills</code> instead:{{/i}}</p> - <ul class="nav nav-pills"> - <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> - <li><a href="#">{{_i}}Profile{{/i}}</a></li> - <li><a href="#">{{_i}}Messages{{/i}}</a></li> - </ul> + <div class="bs-docs-example"> + <ul class="nav nav-pills"> + <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> + <li><a href="#">{{_i}}Profile{{/i}}</a></li> + <li><a href="#">{{_i}}Messages{{/i}}</a></li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="nav nav-pills"> <li class="active"> @@ -457,18 +495,24 @@ </ul> </pre> + <h3>{{_i}}Component alignment{{/i}}</h3> + <p>{{_i}}To align nav links, use the <code>.pull-left</code> or <code>.pull-right</code> utility classes. Both classes will add a CSS float in the specified direction.{{/i}}</p> - <h2>{{_i}}Stackable{{/i}} <small>{{_i}}Make tabs or pills vertical{{/i}}</small></h2> - <h3>{{_i}}How to stack 'em{{/i}}</h3> + <hr class="bs-docs-separator"> + + + <h2>{{_i}}Stackable{{/i}}</h2> <p>{{_i}}As tabs and pills are horizontal by default, just add a second class, <code>.nav-stacked</code>, to make them appear vertically stacked.{{/i}}</p> <h3>{{_i}}Stacked tabs{{/i}}</h3> - <ul class="nav nav-tabs nav-stacked"> - <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> - <li><a href="#">{{_i}}Profile{{/i}}</a></li> - <li><a href="#">{{_i}}Messages{{/i}}</a></li> - </ul> + <div class="bs-docs-example"> + <ul class="nav nav-tabs nav-stacked"> + <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> + <li><a href="#">{{_i}}Profile{{/i}}</a></li> + <li><a href="#">{{_i}}Messages{{/i}}</a></li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="nav nav-tabs nav-stacked"> ... @@ -476,38 +520,43 @@ </pre> <h3>{{_i}}Stacked pills{{/i}}</h3> - <ul class="nav nav-pills nav-stacked"> - <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> - <li><a href="#">{{_i}}Profile{{/i}}</a></li> - <li><a href="#">{{_i}}Messages{{/i}}</a></li> - </ul> + <div class="bs-docs-example"> + <ul class="nav nav-pills nav-stacked"> + <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> + <li><a href="#">{{_i}}Profile{{/i}}</a></li> + <li><a href="#">{{_i}}Messages{{/i}}</a></li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="nav nav-pills nav-stacked"> ... </ul> </pre> - <h2>{{_i}}Dropdowns{{/i}} <small>{{_i}}For advanced nav components{{/i}}</small></h2> - <h3>{{_i}}Rich menus made easy{{/i}}</h3> - <p>{{_i}}Dropdown menus in Bootstrap tabs and pills are super easy and require only a little extra HTML and a lightweight jQuery plugin.{{/i}}</p> - <p>{{_i}}Head over to the Javascript page to read the docs on <a href="./javascript.html#tabs">initializing dropdowns</a> in Bootstrap.{{/i}}</p> + <hr class="bs-docs-separator"> + + + <h2>{{_i}}Dropdowns{{/i}}</h2> + <p>{{_i}}Add dropdown menus with a little extra HTML and the <a href="./javascript.html#dropdowns">dropdowns javascript plugin</a>.{{/i}}</p> <h3>{{_i}}Tabs with dropdowns{{/i}}</h3> - <ul class="nav nav-tabs"> - <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> - <li><a href="#">{{_i}}Help{{/i}}</a></li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">{{_i}}Dropdown{{/i}} <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </li> - </ul> + <div class="bs-docs-example"> + <ul class="nav nav-tabs"> + <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> + <li><a href="#">{{_i}}Help{{/i}}</a></li> + <li class="dropdown"> + <a class="dropdown-toggle" data-toggle="dropdown" href="#">{{_i}}Dropdown{{/i}} <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="nav nav-tabs"> <li class="dropdown"> @@ -525,20 +574,22 @@ </pre> <h3>{{_i}}Pills with dropdowns{{/i}}</h3> - <ul class="nav nav-pills"> - <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> - <li><a href="#">{{_i}}Help{{/i}}</a></li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">{{_i}}Dropdown{{/i}} <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </li> - </ul> + <div class="bs-docs-example"> + <ul class="nav nav-pills"> + <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> + <li><a href="#">{{_i}}Help{{/i}}</a></li> + <li class="dropdown"> + <a class="dropdown-toggle" data-toggle="dropdown" href="#">{{_i}}Dropdown{{/i}} <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </li> + </ul> + </div>{{! /example }} <pre class="prettyprint linenums"> <ul class="nav nav-pills"> <li class="dropdown"> @@ -555,39 +606,30 @@ </ul> </pre> - <h2>{{_i}}Nav lists{{/i}} <small>{{_i}}Build simple stacked navs, great for sidebars{{/i}}</small></h2> - <h3>{{_i}}Application-style navigation{{/i}}</h3> - <p>{{_i}}Nav lists provide a simple and easy way to build groups of nav links with optional headers. They're best used in sidebars like the Finder in OS X.{{/i}}</p> - <p>{{_i}}Structurally, they're built on the same core nav styles as tabs and pills, so usage and customization are straightforward.{{/i}}</p> - <hr> - <h4>{{_i}}With icons{{/i}}</h4> - <p>{{_i}}Nav lists are also easy to equip with icons. Add the proper <code><i></code> tag with class and you're set.{{/i}}</p> - <h4>{{_i}}Horizontal dividers{{/i}}</h4> - <p>{{_i}}Add a horizontal divider by creating an empty list item with the class <code>.divider</code>, like so:{{/i}}</p> -<pre class="prettyprint linenums"> -<ul class="nav nav-list"> - ... - <li class="divider"></li> - ... -</ul> -</pre> + <hr class="bs-docs-separator"> + + + <h2>{{_i}}Nav lists{{/i}}</h2> + <p>{{_i}}A simple and easy way to build groups of nav links with optional headers. They're best used in sidebars like the Finder in OS X.{{/i}}</p> <h3>{{_i}}Example nav list{{/i}}</h3> <p>{{_i}}Take a list of links and add <code>class="nav nav-list"</code>:{{/i}}</p> - <div class="well" style="padding: 8px 0;"> - <ul class="nav nav-list"> - <li class="nav-header">{{_i}}List header{{/i}}</li> - <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> - <li><a href="#">{{_i}}Library{{/i}}</a></li> - <li><a href="#">{{_i}}Applications{{/i}}</a></li> - <li class="nav-header">{{_i}}Another list header{{/i}}</li> - <li><a href="#">{{_i}}Profile{{/i}}</a></li> - <li><a href="#">{{_i}}Settings{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Help{{/i}}</a></li> - </ul> - </div> <!-- /well --> + <div class="bs-docs-example"> + <div class="well" style="max-width: 340px; padding: 8px 0;"> + <ul class="nav nav-list"> + <li class="nav-header">{{_i}}List header{{/i}}</li> + <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> + <li><a href="#">{{_i}}Library{{/i}}</a></li> + <li><a href="#">{{_i}}Applications{{/i}}</a></li> + <li class="nav-header">{{_i}}Another list header{{/i}}</li> + <li><a href="#">{{_i}}Profile{{/i}}</a></li> + <li><a href="#">{{_i}}Settings{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Help{{/i}}</a></li> + </ul> + </div> <!-- /well --> + </div>{{! /example }} <pre class="prettyprint linenums"> <ul class="nav nav-list"> <li class="nav-header"> @@ -605,19 +647,21 @@ <h3>{{_i}}Example with icons{{/i}}</h3> <p>{{_i}}Same example, but with <code><i></code> tags for icons.{{/i}}</p> - <div class="well" style="padding: 8px 0;"> - <ul class="nav nav-list"> - <li class="nav-header">{{_i}}List header{{/i}}</li> - <li class="active"><a href="#"><i class="icon-white icon-home"></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 class="nav-header">{{_i}}Another list header{{/i}}</li> - <li><a href="#"><i class="icon-user"></i> {{_i}}Profile{{/i}}</a></li> - <li><a href="#"><i class="icon-cog"></i> {{_i}}Settings{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#"><i class="icon-flag"></i> {{_i}}Help{{/i}}</a></li> - </ul> - </div> <!-- /well --> + <div class="bs-docs-example"> + <div class="well" style="max-width: 340px; padding: 8px 0;"> + <ul class="nav nav-list"> + <li class="nav-header">{{_i}}List header{{/i}}</li> + <li class="active"><a href="#"><i class="icon-white icon-home"></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 class="nav-header">{{_i}}Another list header{{/i}}</li> + <li><a href="#"><i class="icon-user"></i> {{_i}}Profile{{/i}}</a></li> + <li><a href="#"><i class="icon-cog"></i> {{_i}}Settings{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#"><i class="icon-flag"></i> {{_i}}Help{{/i}}</a></li> + </ul> + </div> <!-- /well --> + </div>{{! /example }} <pre class="prettyprint linenums"> <ul class="nav nav-list"> ... @@ -631,44 +675,45 @@ </ul> </pre> + <h3>{{_i}}Horizontal dividers{{/i}}</h3> + <p>{{_i}}Add a horizontal divider by creating an empty list item with the class <code>.divider</code>, like so:{{/i}}</p> +<pre class="prettyprint linenums"> +<ul class="nav nav-list"> + ... + <li class="divider"></li> + ... +</ul> +</pre> + - <h2>{{_i}}Tabbable nav{{/i}} <small>{{_i}}Bring tabs to life via javascript{{/i}}</small></h2> + <hr class="bs-docs-separator"> - <h3>{{_i}}What's included{{/i}}</h3> + + <h2>{{_i}}Tabbable nav{{/i}}</h2> <p>{{_i}}Bring your tabs to life with a simple plugin to toggle between content via tabs. Bootstrap integrates tabbable tabs in four styles: top (default), right, bottom, and left.{{/i}}</p> - <p>{{_i}}Changing between them is easy and only requires changing very little markup.{{/i}}</p> - <hr> - <h4>{{_i}}Fade in tabs{{/i}}</h4> - <p>{{_i}}To make tabs fade in, add <code>.fade</code> to each <code>.tab-pane</code>.{{/i}}</p> - <hr> - <h4>{{_i}}Requires jQuery plugin{{/i}}</h4> - <p>{{_i}}All tabbable tabs are powered by our lightweight jQuery plugin. Read more about how to bring tabbable tabs to life <a href="./javascript.html#tabs">on the javascript docs page</a>.{{/i}}</p> - <p><a class="btn" href="./javascript.html#tabs">{{_i}}Get the javascript →{{/i}}</a></p> <h3>{{_i}}Tabbable example{{/i}}</h3> <p>{{_i}}To make tabs tabbable, create a <code>.tab-pane</code> with unique ID for every tab and wrap them in <code>.tab-content</code>.{{/i}}</p> - <div class="tabbable" style="margin-bottom: 18px;"> - <ul class="nav nav-tabs"> - <li class="active"><a href="#tab1" data-toggle="tab">{{_i}}Section 1{{/i}}</a></li> - <li><a href="#tab2" data-toggle="tab">{{_i}}Section 2{{/i}}</a></li> - <li><a href="#tab3" data-toggle="tab">{{_i}}Section 3{{/i}}</a></li> - </ul> - <div class="tab-content" style="padding-bottom: 9px; border-bottom: 1px solid #ddd;"> - <div class="tab-pane active" id="tab1"> - <p>{{_i}}I'm in Section 1.{{/i}}</p> - </div> - <div class="tab-pane" id="tab2"> - <p>{{_i}}Howdy, I'm in Section 2.{{/i}}</p> - </div> - <div class="tab-pane" id="tab3"> - <p>{{_i}}What up girl, this is Section 3.{{/i}}</p> + <div class="bs-docs-example"> + <div class="tabbable" style="margin-bottom: 18px;"> + <ul class="nav nav-tabs"> + <li class="active"><a href="#tab1" data-toggle="tab">{{_i}}Section 1{{/i}}</a></li> + <li><a href="#tab2" data-toggle="tab">{{_i}}Section 2{{/i}}</a></li> + <li><a href="#tab3" data-toggle="tab">{{_i}}Section 3{{/i}}</a></li> + </ul> + <div class="tab-content" style="padding-bottom: 9px; border-bottom: 1px solid #ddd;"> + <div class="tab-pane active" id="tab1"> + <p>{{_i}}I'm in Section 1.{{/i}}</p> + </div> + <div class="tab-pane" id="tab2"> + <p>{{_i}}Howdy, I'm in Section 2.{{/i}}</p> + </div> + <div class="tab-pane" id="tab3"> + <p>{{_i}}What up girl, this is Section 3.{{/i}}</p> + </div> </div> - </div> - </div> <!-- /tabbable --> - <p>{{_i}}For right or left aligned tabs, wrap the <code>.nav-tabs</code> and <code>.tab-content</code> in <code>.tabbable</code>.{{/i}}</p> - - <h3>{{_i}}Straightforward markup{{/i}}</h3> - <p>{{_i}}Using tabbable tabs requires a wrapping div, a set of tabs, and a set of tabbable panes of content.{{/i}}</p> + </div> <!-- /tabbable --> + </div>{{! /example }} <pre class="prettyprint linenums"> <div class="tabbable"> <!-- Only required for left/right tabs --> <ul class="nav nav-tabs"> @@ -686,30 +731,37 @@ </div> </pre> + <h4>{{_i}}Fade in tabs{{/i}}</h4> + <p>{{_i}}To make tabs fade in, add <code>.fade</code> to each <code>.tab-pane</code>.{{/i}}</p> + + <h4>{{_i}}Requires jQuery plugin{{/i}}</h4> + <p>{{_i}}All tabbable tabs are powered by our lightweight jQuery plugin. Read more about how to bring tabbable tabs to life <a href="./javascript.html#tabs">on the javascript docs page</a>.{{/i}}</p> <h3>{{_i}}Tabbable in any direction{{/i}}</h3> <h4>{{_i}}Tabs on the bottom{{/i}}</h4> <p>{{_i}}Flip the order of the HTML and add a class to put tabs on the bottom.{{/i}}</p> - <div class="tabbable tabs-below"> - <div class="tab-content"> - <div class="tab-pane active" id="A"> - <p>{{_i}}I'm in Section A.{{/i}}</p> - </div> - <div class="tab-pane" id="B"> - <p>{{_i}}Howdy, I'm in Section B.{{/i}}</p> - </div> - <div class="tab-pane" id="C"> - <p>{{_i}}What up girl, this is Section C.{{/i}}</p> + <div class="bs-docs-example"> + <div class="tabbable tabs-below"> + <div class="tab-content"> + <div class="tab-pane active" id="A"> + <p>{{_i}}I'm in Section A.{{/i}}</p> + </div> + <div class="tab-pane" id="B"> + <p>{{_i}}Howdy, I'm in Section B.{{/i}}</p> + </div> + <div class="tab-pane" id="C"> + <p>{{_i}}What up girl, this is Section C.{{/i}}</p> + </div> </div> - </div> - <ul class="nav nav-tabs"> - <li class="active"><a href="#A" data-toggle="tab">{{_i}}Section 1{{/i}}</a></li> - <li><a href="#B" data-toggle="tab">{{_i}}Section 2{{/i}}</a></li> - <li><a href="#C" data-toggle="tab">{{_i}}Section 3{{/i}}</a></li> - </ul> - </div> <!-- /tabbable --> -<pre class="prettyprint linenums" style="margin-top: 11px;"> + <ul class="nav nav-tabs"> + <li class="active"><a href="#A" data-toggle="tab">{{_i}}Section 1{{/i}}</a></li> + <li><a href="#B" data-toggle="tab">{{_i}}Section 2{{/i}}</a></li> + <li><a href="#C" data-toggle="tab">{{_i}}Section 3{{/i}}</a></li> + </ul> + </div> <!-- /tabbable --> + </div>{{! /example }} +<pre class="prettyprint linenums"> <div class="tabbable tabs-below"> <div class="tab-content"> ... @@ -722,24 +774,26 @@ <h4>{{_i}}Tabs on the left{{/i}}</h4> <p>{{_i}}Swap the class to put tabs on the left.{{/i}}</p> - <div class="tabbable tabs-left"> - <ul class="nav nav-tabs"> - <li class="active"><a href="#lA" data-toggle="tab">{{_i}}Section 1{{/i}}</a></li> - <li><a href="#lB" data-toggle="tab">{{_i}}Section 2{{/i}}</a></li> - <li><a href="#lC" data-toggle="tab">{{_i}}Section 3{{/i}}</a></li> - </ul> - <div class="tab-content"> - <div class="tab-pane active" id="lA"> - <p>{{_i}}I'm in Section A.{{/i}}</p> - </div> - <div class="tab-pane" id="lB"> - <p>{{_i}}Howdy, I'm in Section B.{{/i}}</p> - </div> - <div class="tab-pane" id="lC"> - <p>{{_i}}What up girl, this is Section C.{{/i}}</p> + <div class="bs-docs-example"> + <div class="tabbable tabs-left"> + <ul class="nav nav-tabs"> + <li class="active"><a href="#lA" data-toggle="tab">{{_i}}Section 1{{/i}}</a></li> + <li><a href="#lB" data-toggle="tab">{{_i}}Section 2{{/i}}</a></li> + <li><a href="#lC" data-toggle="tab">{{_i}}Section 3{{/i}}</a></li> + </ul> + <div class="tab-content"> + <div class="tab-pane active" id="lA"> + <p>{{_i}}I'm in Section A.{{/i}}</p> + </div> + <div class="tab-pane" id="lB"> + <p>{{_i}}Howdy, I'm in Section B.{{/i}}</p> + </div> + <div class="tab-pane" id="lC"> + <p>{{_i}}What up girl, this is Section C.{{/i}}</p> + </div> </div> - </div> - </div> <!-- /tabbable --> + </div> <!-- /tabbable --> + </div>{{! /example }} <pre class="prettyprint linenums"> <div class="tabbable tabs-left"> <ul class="nav nav-tabs"> @@ -753,24 +807,26 @@ <h4>{{_i}}Tabs on the right{{/i}}</h4> <p>{{_i}}Swap the class to put tabs on the right.{{/i}}</p> - <div class="tabbable tabs-right"> - <ul class="nav nav-tabs"> - <li class="active"><a href="#rA" data-toggle="tab">{{_i}}Section 1{{/i}}</a></li> - <li><a href="#rB" data-toggle="tab">{{_i}}Section 2{{/i}}</a></li> - <li><a href="#rC" data-toggle="tab">{{_i}}Section 3{{/i}}</a></li> - </ul> - <div class="tab-content"> - <div class="tab-pane active" id="rA"> - <p>{{_i}}I'm in Section A.{{/i}}</p> - </div> - <div class="tab-pane" id="rB"> - <p>{{_i}}Howdy, I'm in Section B.{{/i}}</p> - </div> - <div class="tab-pane" id="rC"> - <p>{{_i}}What up girl, this is Section C.{{/i}}</p> + <div class="bs-docs-example"> + <div class="tabbable tabs-right"> + <ul class="nav nav-tabs"> + <li class="active"><a href="#rA" data-toggle="tab">{{_i}}Section 1{{/i}}</a></li> + <li><a href="#rB" data-toggle="tab">{{_i}}Section 2{{/i}}</a></li> + <li><a href="#rC" data-toggle="tab">{{_i}}Section 3{{/i}}</a></li> + </ul> + <div class="tab-content"> + <div class="tab-pane active" id="rA"> + <p>{{_i}}I'm in Section A.{{/i}}</p> + </div> + <div class="tab-pane" id="rB"> + <p>{{_i}}Howdy, I'm in Section B.{{/i}}</p> + </div> + <div class="tab-pane" id="rC"> + <p>{{_i}}What up girl, this is Section C.{{/i}}</p> + </div> </div> - </div> - </div> <!-- /tabbable --> + </div> <!-- /tabbable --> + </div>{{! /example }} <pre class="prettyprint linenums"> <div class="tabbable tabs-right"> <ul class="nav nav-tabs"> @@ -792,105 +848,213 @@ <div class="page-header"> <h1>{{_i}}Navbar{{/i}}</h1> </div> - <h2>{{_i}}Static navbar example{{/i}}</h2> - <p>{{_i}}An example of a static (not fixed to the top) navbar with project name, navigation, and search form.{{/i}}</p> - <div class="navbar"> - <div class="navbar-inner"> - <div class="container"> - <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </a> - <a class="brand" href="#">{{_i}}Title{{/i}}</a> - <div class="nav-collapse"> - <ul class="nav"> - <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> - <li><a href="#">{{_i}}Link{{/i}}</a></li> - <li><a href="#">{{_i}}Link{{/i}}</a></li> - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{_i}}Dropdown{{/i}} <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li class="nav-header">Nav header</li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - <li><a href="#">{{_i}}One more separated link{{/i}}</a></li> - </ul> - </li> - </ul> - <form class="navbar-search pull-left" action=""> - <input type="text" class="search-query span2" placeholder="Search"> - </form> - <ul class="nav pull-right"> - <li><a href="#">{{_i}}Link{{/i}}</a></li> - <li class="divider-vertical"></li> - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{_i}}Dropdown{{/i}} <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li><a href="#">{{_i}}Action{{/i}}</a></li> - <li><a href="#">{{_i}}Another action{{/i}}</a></li> - <li><a href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a href="#">{{_i}}Separated link{{/i}}</a></li> - </ul> - </li> - </ul> - </div><!-- /.nav-collapse --> - </div> - </div><!-- /navbar-inner --> - </div><!-- /navbar --> - <h3>{{_i}}Navbar scaffolding{{/i}}</h3> - <p>{{_i}}The navbar requires only a few divs to structure it well for static or fixed display.{{/i}}</p> + <h2>{{_i}}Basic navbar{{/i}}</h2> + <p>{{_i}}To start, navbars are static (not fixed to the top) and include support for a project name and basic navigation. Place one anywhere within a <code>.container</code>, which sets the width of your site and content.{{/i}}</p> + <div class="bs-docs-example"> + <div class="navbar"> + <div class="navbar-inner"> + <a class="brand" href="#">{{_i}}Title{{/i}}</a> + <ul class="nav"> + <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> + <li><a href="#">{{_i}}Link{{/i}}</a></li> + <li><a href="#">{{_i}}Link{{/i}}</a></li> + </ul> + </div> + </div> + </div>{{! /example }} <pre class="prettyprint linenums"> <div class="navbar"> <div class="navbar-inner"> - <div class="container"> - ... - </div> + <a class="brand" href="#">{{_i}}Title{{/i}}</a> + <ul class="nav"> + <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> + <li><a href="#">{{_i}}Link{{/i}}</a></li> + <li><a href="#">{{_i}}Link{{/i}}</a></li> + </ul> </div> </div> </pre> - <h3>{{_i}}Fixed navbar{{/i}}</h3> - <p>{{_i}}Fix the navbar to the top or bottom of the viewport with an additional class on the outermost div, <code>.navbar</code>.{{/i}}</p> + + + <hr class="bs-docs-separator"> + + + <h2>{{_i}}Navbar components{{/i}}</h2> + + <h3>{{_i}}Brand{{/i}}</h3> + <p>{{_i}}A simple link to show your brand or project name only requires an anchor tag.{{/i}}</p> <pre class="prettyprint linenums"> -<div class="navbar navbar-fixed-top"> - ... -</div> +<a class="brand" href="#">{{_i}}Project name{{/i}}</a> </pre> + + <h3>{{_i}}Nav links{{/i}}</h3> + <p>{{_i}}Nav items are simple to add via unordered lists.{{/i}}</p> <pre class="prettyprint linenums"> -<div class="navbar navbar-fixed-bottom"> - ... -</div> +<ul class="nav"> + <li class="active"> + <a href="#">{{_i}}Home{{/i}}</a> + </li> + <li><a href="#">{{_i}}Link{{/i}}</a></li> + <li><a href="#">{{_i}}Link{{/i}}</a></li> +</ul> </pre> - - <p>{{_i}}When you affix the navbar, remember to account for the hidden area underneath. Add 40px or more of padding to the <code><body></code>. Be sure to add this after the core Bootstrap CSS and before the optional responsive CSS.{{/i}}</p> - <h3>{{_i}}Brand name{{/i}}</h3> - <p>{{_i}}A simple link to show your brand or project name only requires an anchor tag.{{/i}}</p> + <p>{{_i}}You can easily add dividers to your nav links with an empty list item and a simple class. Just add this between links:{{/i}}</p> <pre class="prettyprint linenums"> -<a class="brand" href="#"> - {{_i}}Project name{{/i}} -</a> +<ul class="nav"> + ... + <li class="divider-vertical"></li> + ... +</ul> </pre> - <h3>{{_i}}Forms in navbar{{/i}}</h3> + + <h3>{{_i}}Forms{{/i}}</h3> <p>{{_i}}To properly style and position a form within the navbar, add the appropriate classes as shown below. For a default form, include <code>.navbar-form</code> and either <code>.pull-left</code> or <code>.pull-right</code> to properly align it.{{/i}}</p> <pre class="prettyprint linenums"> <form class="navbar-form pull-left"> <input type="text" class="span2"> </form> </pre> + + <h3>{{_i}}Search form{{/i}}</h3> <p>{{_i}}For a more customized search form, add <code>.navbar-search</code> to the <code>form</code> and <code>.search-query</code> to the input for specialized styles in the navbar.{{/i}}</p> <pre class="prettyprint linenums"> <form class="navbar-search pull-left"> <input type="text" class="search-query" placeholder="{{_i}}Search{{/i}}"> </form> </pre> - <h3>{{_i}}Optional responsive variation{{/i}}</h3> - <p>{{_i}}Depending on the amount of content in your topbar, you might want to implement the responsive options. To do so, wrap your nav content in a containing div, <code>.nav-collapse.collapse</code>, and add the navbar toggle button, <code>.btn-navbar</code>.{{/i}}</p> + + <h3>{{_i}}Component alignment{{/i}}</h3> + <p>{{_i}}Align nav links, search form, or text, use the <code>.pull-left</code> or <code>.pull-right</code> utility classes. Both classes will add a CSS float in the specified direction.{{/i}}</p> + + <h3>{{_i}}Using dropdowns{{/i}}</h3> + <p>{{_i}}Add dropdowns and dropups to the nav with a bit of markup and the <a href="./javascript.html#dropdowns">dropdowns javascript plugin</a>.{{/i}}</p> +<pre class="prettyprint linenums"> +<ul class="nav"> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown"> + {{_i}}Account{{/i}} + <b class="caret"></b> + </a> + <ul class="dropdown-menu"> + ... + </ul> + </li> +</ul> +</pre> + <p>{{_i}}Visit the <a href="./javascript.html#dropdowns">javascript dropdowns documentation</a> for more markup and information on calling dropdowns.{{/i}}</p> + + <h3>{{_i}}Text{{/i}}</h3> + <p>{{_i}}Wrap strings of text in an element with <code>.navbar-text</code>, usually on a <code><p></code> tag for proper leading and color.{{/i}}</p> + + + <hr class="bs-docs-separator"> + + + <h2>{{_i}}Fixed navigation{{/i}}</h2> + <p>{{_i}}Fix the navbar to the top or bottom of the viewport with an additional class on the outermost div, <code>.navbar</code>.{{/i}}</p> + + <h3>Fixed to top</h3> + <p>{{_i}}Add <code>.navbar-fixed-top</code> and remember to account for the hidden area underneath it by adding at least 40px <code>padding</code> to the <code><body></code>. Be sure to add this after the core Bootstrap CSS and before the optional responsive CSS.{{/i}}</p> + <div class="bs-docs-example bs-navbar-top-example"> + <div class="navbar navbar-fixed-top" style="position: absolute;"> + <div class="navbar-inner"> + <div class="container" style="width: auto; padding: 0 20px;"> + <a class="brand" href="#">{{_i}}Title{{/i}}</a> + <ul class="nav"> + <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> + <li><a href="#">{{_i}}Link{{/i}}</a></li> + <li><a href="#">{{_i}}Link{{/i}}</a></li> + </ul> + </div> + </div> + </div> + </div>{{! /example }} +<pre class="prettyprint linenums"> +<div class="navbar navbar-fixed-top"> + ... +</div> +</pre> + + <h3>Fixed to bottom</h3> + <p>{{_i}}Add <code>.navbar-fixed-bottom</code> instead.{{/i}}</p> + <div class="bs-docs-example bs-navbar-bottom-example"> + <div class="navbar navbar-fixed-bottom" style="position: absolute;"> + <div class="navbar-inner"> + <div class="container" style="width: auto; padding: 0 20px;"> + <a class="brand" href="#">{{_i}}Title{{/i}}</a> + <ul class="nav"> + <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> + <li><a href="#">{{_i}}Link{{/i}}</a></li> + <li><a href="#">{{_i}}Link{{/i}}</a></li> + </ul> + </div> + </div> + </div> + </div>{{! /example }} +<pre class="prettyprint linenums"> +<div class="navbar navbar-fixed-bottom"> + ... +</div> +</pre> + + + <hr class="bs-docs-separator"> + + + <h2>{{_i}}Responsive navbar{{/i}}</h2> + <p>{{_i}}To implement a collapsing responsive navbar, wrap your navbar content in a containing div, <code>.nav-collapse.collapse</code>, and add the navbar toggle button, <code>.btn-navbar</code>.{{/i}}</p> + <div class="bs-docs-example"> + <div class="navbar"> + <div class="navbar-inner"> + <div class="container"> + <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </a> + <a class="brand" href="#">{{_i}}Title{{/i}}</a> + <div class="nav-collapse"> + <ul class="nav"> + <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> + <li><a href="#">{{_i}}Link{{/i}}</a></li> + <li><a href="#">{{_i}}Link{{/i}}</a></li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{_i}}Dropdown{{/i}} <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li class="nav-header">Nav header</li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + <li><a href="#">{{_i}}One more separated link{{/i}}</a></li> + </ul> + </li> + </ul> + <form class="navbar-search pull-left" action=""> + <input type="text" class="search-query span2" placeholder="Search"> + </form> + <ul class="nav pull-right"> + <li><a href="#">{{_i}}Link{{/i}}</a></li> + <li class="divider-vertical"></li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{_i}}Dropdown{{/i}} <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="#">{{_i}}Action{{/i}}</a></li> + <li><a href="#">{{_i}}Another action{{/i}}</a></li> + <li><a href="#">{{_i}}Something else here{{/i}}</a></li> + <li class="divider"></li> + <li><a href="#">{{_i}}Separated link{{/i}}</a></li> + </ul> + </li> + </ul> + </div><!-- /.nav-collapse --> + </div> + </div><!-- /navbar-inner --> + </div><!-- /navbar --> + </div>{{! /example }} <pre class="prettyprint linenums"> <div class="navbar"> <div class="navbar-inner"> @@ -919,49 +1083,6 @@ <strong>{{_i}}Heads up!{{/i}}</strong> The responsive navbar requires the <a href="./javascript.html#collapse">collapse plugin</a> and <a href="./scaffolding.html#responsive">responsive Bootstrap CSS file</a>. </div> - <h3>{{_i}}Nav links{{/i}}</h3> - <p>{{_i}}Nav items are simple to add via unordered lists.{{/i}}</p> -<pre class="prettyprint linenums"> -<ul class="nav"> - <li class="active"> - <a href="#">{{_i}}Home{{/i}}</a> - </li> - <li><a href="#">{{_i}}Link{{/i}}</a></li> - <li><a href="#">{{_i}}Link{{/i}}</a></li> -</ul> -</pre> - <p>{{_i}}You can easily add dividers to your nav links with an empty list item and a simple class. Just add this between links:{{/i}}</p> -<pre class="prettyprint linenums"> -<ul class="nav"> - ... - <li class="divider-vertical"></li> - ... -</ul> -</pre> - <h3>{{_i}}Component alignment{{/i}}</h3> - <p>{{_i}}To align a nav, search form, or text, use the <code>.pull-left</code> or <code>.pull-right</code> utility classes. Both classes will add a CSS float in the specified direction.{{/i}}</p> - <h3>{{_i}}Adding dropdown menus{{/i}}</h3> - <p>{{_i}}Adding dropdowns and dropups to the nav is super simple, but does require the use of <a href="./javascript.html#dropdowns">our javascript plugin</a>.{{/i}}</p> -<pre class="prettyprint linenums"> -<ul class="nav"> - <li class="dropdown"> - <a href="#" - class="dropdown-toggle" - data-toggle="dropdown"> - {{_i}}Account{{/i}} - <b class="caret"></b> - </a> - <ul class="dropdown-menu"> - ... - </ul> - </li> -</ul> -</pre> - <p><a class="btn" href="./javascript.html#dropdowns">{{_i}}Get the javascript →{{/i}}</a></p> - <hr> - <h3>{{_i}}Text in the navbar{{/i}}</h3> - <p>{{_i}}Wrap strings of text in a <code><.navbar-text></code>, usually on a <code><p></code> tag for proper leading and color.{{/i}}</p> - </section> @@ -973,34 +1094,26 @@ <h1>{{_i}}Breadcrumbs{{/i}} <small></small></h1> </div> - <h3>{{_i}}Why use them{{/i}}</h3> - <p>{{_i}}Breadcrumb navigation is used as a way to show users where they are within an app or a site, but not for primary navigation. Keep their use sparse and succinct to be most effective.{{/i}}</p> - - <h3>{{_i}}Examples{{/i}}</h3> + <h2>{{_i}}Examples{{/i}}</h2> <p>{{_i}}A single example shown as it might be displayed across multiple pages.{{/i}}</p> - <ul class="breadcrumb"> - <li class="active">{{_i}}Home{{/i}}</li> - </ul> - <ul class="breadcrumb"> - <li><a href="#">{{_i}}Home{{/i}}</a> <span class="divider">/</span></li> - <li class="active">{{_i}}Library{{/i}}</li> - </ul> - <ul class="breadcrumb"> - <li><a href="#">{{_i}}Home{{/i}}</a> <span class="divider">/</span></li> - <li><a href="#">{{_i}}Library{{/i}}</a> <span class="divider">/</span></li> - <li class="active">{{_i}}Data{{/i}}</li> - </ul> - - <h3>{{_i}}Markup{{/i}}</h3> - <p>{{_i}}HTML is your standard unordered list with links.{{/i}}</p> + <div class="bs-docs-example"> + <ul class="breadcrumb"> + <li class="active">{{_i}}Home{{/i}}</li> + </ul> + <ul class="breadcrumb"> + <li><a href="#">{{_i}}Home{{/i}}</a> <span class="divider">/</span></li> + <li class="active">{{_i}}Library{{/i}}</li> + </ul> + <ul class="breadcrumb" style="margin-bottom: 5px;"> + <li><a href="#">{{_i}}Home{{/i}}</a> <span class="divider">/</span></li> + <li><a href="#">{{_i}}Library{{/i}}</a> <span class="divider">/</span></li> + <li class="active">{{_i}}Data{{/i}}</li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="breadcrumb"> - <li> - <a href="#">{{_i}}Home{{/i}}</a> <span class="divider">/</span> - </li> - <li> - <a href="#">{{_i}}Library{{/i}}</a> <span class="divider">/</span> - </li> + <li><a href="#">{{_i}}Home{{/i}}</a> <span class="divider">/</span></li> + <li><a href="#">{{_i}}Library{{/i}}</a> <span class="divider">/</span></li> <li class="active">{{_i}}Data{{/i}}</li> </ul> </pre> @@ -1016,85 +1129,119 @@ <h1>{{_i}}Pagination{{/i}} <small>{{_i}}Two options for paging through content{{/i}}</small></h1> </div> - <h2>{{_i}}Multicon-page pagination{{/i}}</h2> - - <h3>{{_i}}When to use{{/i}}</h3> - <p>{{_i}}Ultra simplistic and minimally styled pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.{{/i}}</p> - <h3>{{_i}}Stateful page links{{/i}}</h3> - <p>{{_i}}Links are customizable and work in a number of circumstances with the right class. <code>.disabled</code> for unclickable links and <code>.active</code> for current page.{{/i}}</p> - <h3>{{_i}}Flexible alignment{{/i}}</h3> - <p>{{_i}}Add either of two optional classes to change the alignment of pagination links: <code>.pagination-centered</code> and <code>.pagination-right</code>.{{/i}}</p> - - <h3>{{_i}}Examples{{/i}}</h3> - <p>{{_i}}The default pagination component is flexible and works in a number of variations.{{/i}}</p> - <div class="pagination"> - <ul> - <li class="disabled"><a href="#">«</a></li> - <li class="active"><a href="#">1</a></li> - <li><a href="#">2</a></li> - <li><a href="#">3</a></li> - <li><a href="#">4</a></li> - <li><a href="#">»</a></li> - </ul> - </div> - <div class="pagination"> - <ul> - <li><a href="#">«</a></li> - <li><a href="#">10</a></li> - <li class="active"><a href="#">11</a></li> - <li><a href="#">12</a></li> - <li><a href="#">»</a></li> - </ul> - </div> - <div class="pagination"> - <ul> - <li><a href="#">«</a></li> - <li class="active"><a href="#">10</a></li> - <li class="disabled"><a href="#">...</a></li> - <li><a href="#">20</a></li> - <li><a href="#">»</a></li> - </ul> - </div> - <div class="pagination pagination-centered"> - <ul> - <li class="active"><a href="#">1</a></li> - <li><a href="#">2</a></li> - <li><a href="#">3</a></li> - <li><a href="#">4</a></li> - <li><a href="#">5</a></li> - </ul> + <h2>{{_i}}Standard pagination{{/i}}</h2> + <p>{{_i}}Simple pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.{{/i}}</p> + <div class="bs-docs-example"> + <div class="pagination"> + <ul> + <li><a href="#">«</a></li> + <li><a href="#">1</a></li> + <li><a href="#">2</a></li> + <li><a href="#">3</a></li> + <li><a href="#">4</a></li> + <li><a href="#">5</a></li> + <li><a href="#">»</a></li> + </ul> + </div> </div> - - <h3>{{_i}}Markup{{/i}}</h3> - <p>{{_i}}Wrapped in a <code><div></code>, pagination is just a <code><ul></code>.{{/i}}</p> <pre class="prettyprint linenums"> <div class="pagination"> <ul> <li><a href="#">Prev</a></li> - <li class="active"> - <a href="#">1</a> - </li> + <li><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> - <li><a href="#">Next</a></li> + <li><a href="#">Next</a></li> + </ul> +</div> +</pre> + + + <hr class="bs-docs-separator"> + + + <h2>{{_i}}Options{{/i}}</h2> + + <h3>{{_i}}Disabled and active states{{/i}}</h3> + <p>{{_i}}Links are customizable for different circumstances. Use <code>.disabled</code> for unclickable links and <code>.active</code> to indicate the current page.{{/i}}</p> + <div class="bs-docs-example"> + <div class="pagination pagination-centered"> + <ul> + <li class="disabled"><a href="#">«</a></li> + <li class="active"><a href="#">1</a></li> + <li><a href="#">2</a></li> + <li><a href="#">3</a></li> + <li><a href="#">4</a></li> + <li><a href="#">5</a></li> + <li><a href="#">»</a></li> + </ul> + </div> + </div> +<pre class="prettyprint linenums"> +<div class="pagination "> + <ul> + <li class="disabled"><a href="#">Prev</a></li> + <li class="active"><a href="#">1</a></li> + ... </ul> </div> </pre> - <h2>{{_i}}Pager{{/i}} <small>{{_i}}For quick previous and next links{{/i}}</small></h2> + <h3>{{_i}}Alignment{{/i}}</h3> + <p>{{_i}}Add one of two optional classes to change the alignment of pagination links: <code>.pagination-centered</code> and <code>.pagination-right</code>.{{/i}}</p> + <div class="bs-docs-example"> + <div class="pagination pagination-centered"> + <ul> + <li><a href="#">«</a></li> + <li><a href="#">1</a></li> + <li><a href="#">2</a></li> + <li><a href="#">3</a></li> + <li><a href="#">4</a></li> + <li><a href="#">5</a></li> + <li><a href="#">»</a></li> + </ul> + </div> + </div> +<pre class="prettyprint linenums"> +<div class="pagination pagination-centered"> + ... +</div> +</pre> + <div class="bs-docs-example"> + <div class="pagination pagination-right"> + <ul> + <li><a href="#">«</a></li> + <li><a href="#">1</a></li> + <li><a href="#">2</a></li> + <li><a href="#">3</a></li> + <li><a href="#">4</a></li> + <li><a href="#">5</a></li> + <li><a href="#">»</a></li> + </ul> + </div> + </div> +<pre class="prettyprint linenums"> +<div class="pagination pagination-right"> + ... +</div> +</pre> + + + <hr class="bs-docs-separator"> + - <h3>{{_i}}About pager{{/i}}</h3> - <p>{{_i}}The pager component is a set of links for simple pagination implementations with light markup and even lighter styles. It's great for simple sites like blogs or magazines.{{/i}}</p> - <h4>{{_i}}Optional disabled state{{/i}}</h4> - <p>{{_i}}Pager links also use the general <code>.disabled</code> class from the pagination.{{/i}}</p> + <h2>{{_i}}Pager{{/i}}</h2> + <p>{{_i}}Quick previous and next links for simple pagination implementations with light markup and styles. It's great for simple sites like blogs or magazines.{{/i}}</p> <h3>{{_i}}Default example{{/i}}</h3> <p>{{_i}}By default, the pager centers links.{{/i}}</p> - <ul class="pager"> - <li><a href="#">{{_i}}Previous{{/i}}</a></li> - <li><a href="#">{{_i}}Next{{/i}}</a></li> - </ul> + <div class="bs-docs-example"> + <ul class="pager"> + <li><a href="#">{{_i}}Previous{{/i}}</a></li> + <li><a href="#">{{_i}}Next{{/i}}</a></li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="pager"> <li> @@ -1108,10 +1255,12 @@ <h3>{{_i}}Aligned links{{/i}}</h3> <p>{{_i}}Alternatively, you can align each link to the sides:{{/i}}</p> - <ul class="pager"> - <li class="previous"><a href="#">{{_i}}← Older{{/i}}</a></li> - <li class="next"><a href="#">{{_i}}Newer →{{/i}}</a></li> - </ul> + <div class="bs-docs-example"> + <ul class="pager"> + <li class="previous"><a href="#">{{_i}}← Older{{/i}}</a></li> + <li class="next"><a href="#">{{_i}}Newer →{{/i}}</a></li> + </ul> + </div> <pre class="prettyprint linenums"> <ul class="pager"> <li class="previous"> @@ -1123,6 +1272,23 @@ </ul> </pre> + <h3>{{_i}}Optional disabled state{{/i}}</h3> + <p>{{_i}}Pager links also use the general <code>.disabled</code> utility class from the pagination.{{/i}}</p> + <div class="bs-docs-example"> + <ul class="pager"> + <li class="previous disabled"><a href="#">{{_i}}← Older{{/i}}</a></li> + <li class="next"><a href="#">{{_i}}Newer →{{/i}}</a></li> + </ul> + </div> +<pre class="prettyprint linenums"> +<ul class="pager"> + <li class="previous disabled"> + <a href="#">{{_i}}&larr; Older{{/i}}</a> + </li> + ... +</ul> +</pre> + </section> @@ -1294,11 +1460,16 @@ <div class="page-header"> <h1>{{_i}}Typographic components{{/i}} <small>{{_i}}Page header and hero unit for segmenting content{{/i}}</small></h1> </div> - <h2>{{_i}}Hero unit{{/i}}</h2> - <p>{{_i}}Bootstrap provides a lightweight, flexible component called a hero unit to showcase content on your site. It works well on marketing and content-heavy sites.{{/i}}</p> - <h3>{{_i}}Markup{{/i}}</h3> - <p>{{_i}}Wrap your content in a <code>div</code> like so:{{/i}}</p> + <h2>{{_i}}Hero unit{{/i}}</h2> + <p>{{_i}}A lightweight, flexible component called a hero unit to showcase content on your site. It works well on marketing and content-heavy sites.{{/i}}</p> + <div class="bs-docs-example"> + <div class="hero-unit"> + <h1>{{_i}}Hello, world!{{/i}}</h1> + <p>{{_i}}This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.{{/i}}</p> + <p><a class="btn btn-primary btn-large">{{_i}}Learn more{{/i}}</a></p> + </div> + </div> <pre class="prettyprint linenums"> <div class="hero-unit"> <h1>{{_i}}Heading{{/i}}</h1> @@ -1311,16 +1482,7 @@ </div> </pre> - <div class="bs-docs-example"> - <div class="hero-unit"> - <h1>{{_i}}Hello, world!{{/i}}</h1> - <p>{{_i}}This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.{{/i}}</p> - <p><a class="btn btn-primary btn-large">{{_i}}Learn more{{/i}}</a></p> - </div> - </div> - <h2>{{_i}}Page header{{/i}}</h2> - <p>{{_i}}A simple shell for an <code>h1</code> to appropriately space out and segment sections of content on a page. It can utilize the <code>h1</code>'s default <code>small</code>, element as well most other components (with additional styles).{{/i}}</p> <div class="bs-docs-example"> <div class="page-header"> @@ -1475,50 +1637,68 @@ <h1>{{_i}}Alerts{{/i}} <small>{{_i}}Styles for success, warning, and error messages{{/i}}</small></h1> </div> - <h2>{{_i}}Lightweight defaults{{/i}}</h2> - - <h3>{{_i}}Rewritten base class{{/i}}</h3> - <p>{{_i}}With Bootstrap 2, we've simplified the base class: <code>.alert</code> instead of <code>.alert-message</code>. We've also reduced the minimum required markup—no <code><p></code> is required by default, just the outer <code><div></code>.{{/i}}</p> - <h3>{{_i}}Single alert message{{/i}}</h3> - <p>{{_i}}For a more durable component with less code, we've removed the differentiating look for block alerts, messages that come with more padding and typically more text. The class also has changed to <code>.alert-block</code>.{{/i}}</p> - <hr> - <h3>{{_i}}Goes great with javascript{{/i}}</h3> - <p>{{_i}}Bootstrap comes with a great jQuery plugin that supports alert messages, making dismissing them quick and easy.{{/i}}</p> - <p><a class="btn js-btn" href="./javascript.html#alerts">{{_i}}Get the plugin »</a>{{/i}}</p> - - <h3>{{_i}}Example alerts{{/i}}</h3> - <p>{{_i}}Wrap your message and an optional close icon in a div with simple class.{{/i}}</p> - <div class="alert"> - <button type="button" class="close" data-dismiss="alert">×</button> - <strong>{{_i}}Warning!{{/i}}</strong> {{_i}}Best check yo self, you're not looking too good.{{/i}} + <h2>{{_i}}Default alert{{/i}}</h2> + <p>{{_i}}Wrap any text and an optional dismiss button in <code>.alert</code> for a basic warning alert message.{{/i}}</p> + <div class="bs-docs-example"> + <div class="alert"> + <button type="button" class="close" data-dismiss="alert">×</button> + <strong>{{_i}}Warning!{{/i}}</strong> {{_i}}Best check yo self, you're not looking too good.{{/i}} + </div> </div> <pre class="prettyprint linenums"> <div class="alert"> - <button class="close" data-dismiss="alert">×</button> + <button type="button" class="close" data-dismiss="alert">×</button> <strong>{{_i}}Warning!{{/i}}</strong> {{_i}}Best check yo self, you're not looking too good.{{/i}} </div> </pre> - <p><span class="label label-info">{{_i}}Heads up!{{/i}}</span> {{_i}}iOS devices require an <code>href="#"</code> for the dismissal of alerts. Be sure to include it and the data attribute for anchor close icons. Alternatively, you may use a <code><button></code> element with the data attribute, which we have opted to do for our docs. When using <code><button></code>, you must include <code>type="button"</code> or your forms may not submit.{{/i}}</p> - <p>{{_i}}Easily extend the standard alert message with two optional classes: <code>.alert-block</code> for more padding and text controls and <code>.alert-heading</code> for a matching heading.{{/i}}</p> - <div class="alert alert-block"> - <button type="button" class="close" data-dismiss="alert">×</button> - <h4 class="alert-heading">{{_i}}Warning!{{/i}}</h4> - <p>{{_i}}Best check yo self, you're not looking too good.{{/i}} Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p> + + <h3>{{_i}}Dismiss buttons{{/i}}</h3> + <p>{{_i}}Mobile Safari and Mobile Opera browsers, in addition to the <code>data-dismiss="alert"</code> attribute, require an <code>href="#"</code> for the dismissal of alerts when using an <code><a></code> tag.{{/i}}</p> +<pre class="prettyprint linenums"> +<a href="#" class="close" data-dismiss="alert">×</button> +</pre> + <p>{{_i}}Alternatively, you may use a <code><button></code> element with the data attribute, which we have opted to do for our docs. When using <code><button></code>, you must include <code>type="button"</code> or your forms may not submit.{{/i}}</p> +<pre class="prettyprint linenums"> +<button type="button" class="close" data-dismiss="alert">×</button> +</pre> + + <h3>{{_i}}Dismiss alerts via javascript{{/i}}</h3> + <p>{{_i}}Use the <a href="./javascript.html#alerts">alerts jQuery plugin</a> for quick and easy dismissal of alerts.{{/i}}</p> + + + <hr class="bs-docs-separator"> + + + <h2>{{_i}}Options{{/i}}</h2> + <p>{{_i}}For longer messages, increase the padding on the top and bottom of the alert wrapper by adding <code>.alert-block</code>.{{/i}}</p> + <div class="bs-docs-example"> + <div class="alert alert-block"> + <button type="button" class="close" data-dismiss="alert">×</button> + <h4>{{_i}}Warning!{{/i}}</h4> + <p>{{_i}}Best check yo self, you're not looking too good.{{/i}} Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p> + </div> </div> <pre class="prettyprint linenums"> <div class="alert alert-block"> - <a class="close" data-dismiss="alert" href="#">×</a> - <h4 class="alert-heading">{{_i}}Warning!{{/i}}</h4> + <a class="close" data-dismiss="alert" href="#">&times;</a> + <h4>{{_i}}Warning!{{/i}}</h4> {{_i}}Best check yo self, you're not...{{/i}} </div> </pre> - <h2>{{_i}}Contextual alternatives{{/i}} <small>{{_i}}Add optional classes to change an alert's connotation{{/i}}</small></h2> + + <hr class="bs-docs-separator"> + + + <h2>{{_i}}Contextual alternatives{{/i}}</h2> + <p>{{_i}}Add optional classes to change an alert's connotation.{{/i}}</p> <h3>{{_i}}Error or danger{{/i}}</h3> - <div class="alert alert-error"> - <button type="button" class="close" data-dismiss="alert">×</button> - <strong>{{_i}}Oh snap!{{/i}}</strong> {{_i}}Change a few things up and try submitting again.{{/i}} + <div class="bs-docs-example"> + <div class="alert alert-error"> + <button type="button" class="close" data-dismiss="alert">×</button> + <strong>{{_i}}Oh snap!{{/i}}</strong> {{_i}}Change a few things up and try submitting again.{{/i}} + </div> </div> <pre class="prettyprint linenums"> <div class="alert alert-error"> @@ -1527,9 +1707,11 @@ </pre> <h3>{{_i}}Success{{/i}}</h3> - <div class="alert alert-success"> - <button type="button" class="close" data-dismiss="alert">×</button> - <strong>{{_i}}Well done!{{/i}}</strong> {{_i}}You successfully read this important alert message.{{/i}} + <div class="bs-docs-example"> + <div class="alert alert-success"> + <button type="button" class="close" data-dismiss="alert">×</button> + <strong>{{_i}}Well done!{{/i}}</strong> {{_i}}You successfully read this important alert message.{{/i}} + </div> </div> <pre class="prettyprint linenums"> <div class="alert alert-success"> @@ -1538,9 +1720,11 @@ </pre> <h3>{{_i}}Information{{/i}}</h3> - <div class="alert alert-info"> - <button type="button" class="close" data-dismiss="alert">×</button> - <strong>{{_i}}Heads up!{{/i}}</strong> {{_i}}This alert needs your attention, but it's not super important.{{/i}} + <div class="bs-docs-example"> + <div class="alert alert-info"> + <button type="button" class="close" data-dismiss="alert">×</button> + <strong>{{_i}}Heads up!{{/i}}</strong> {{_i}}This alert needs your attention, but it's not super important.{{/i}} + </div> </div> <pre class="prettyprint linenums"> <div class="alert alert-info"> @@ -1563,78 +1747,116 @@ <h3>{{_i}}Basic{{/i}}</h3> <p>{{_i}}Default progress bar with a vertical gradient.{{/i}}</p> - <div class="progress"> - <div class="bar" style="width: 60%;"></div> + <div class="bs-docs-example"> + <div class="progress"> + <div class="bar" style="width: 60%;"></div> + </div> </div> <pre class="prettyprint linenums"> <div class="progress"> - <div class="bar" - style="width: 60%;"></div> + <div class="bar" style="width: 60%;"></div> </div> </pre> <h3>{{_i}}Striped{{/i}}</h3> - <p>{{_i}}Uses a gradient to create a striped effect (no IE).{{/i}}</p> - <div class="progress progress-striped"> - <div class="bar" style="width: 20%;"></div> + <p>{{_i}}Uses a gradient to create a striped effect. Not available in IE7-8.{{/i}}</p> + <div class="bs-docs-example"> + <div class="progress progress-striped"> + <div class="bar" style="width: 20%;"></div> + </div> </div> <pre class="prettyprint linenums"> <div class="progress progress-striped"> - <div class="bar" - style="width: 20%;"></div> + <div class="bar" style="width: 20%;"></div> </div> </pre> <h3>{{_i}}Animated{{/i}}</h3> - <p>{{_i}}Takes the striped example and animates it (no IE).{{/i}}</p> - <div class="progress progress-striped active"> - <div class="bar" style="width: 45%"></div> + <p>{{_i}}Add <code>.active</code> to <code>.progress-striped</code> to animate the stripes right to left. Not available in all versions of IE.{{/i}}</p> + <div class="bs-docs-example"> + <div class="progress progress-striped active"> + <div class="bar" style="width: 45%"></div> + </div> </div> <pre class="prettyprint linenums"> -<div class="progress progress-striped - active"> - <div class="bar" - style="width: 40%;"></div> +<div class="progress progress-striped active"> + <div class="bar" style="width: 40%;"></div> </div> </pre> - <h2>{{_i}}Options and browser support{{/i}}</h2> + + <hr class="bs-docs-separator"> + + + <h2>{{_i}}Options{{/i}}</h2> <h3>{{_i}}Additional colors{{/i}}</h3> <p>{{_i}}Progress bars use some of the same button and alert classes for consistent styles.{{/i}}</p> - <div class="progress progress-info" style="margin-bottom: 9px;"> - <div class="bar" style="width: 20%"></div> - </div> - <div class="progress progress-success" style="margin-bottom: 9px;"> - <div class="bar" style="width: 40%"></div> - </div> - <div class="progress progress-warning" style="margin-bottom: 9px;"> - <div class="bar" style="width: 60%"></div> - </div> - <div class="progress progress-danger" style="margin-bottom: 9px;"> - <div class="bar" style="width: 80%"></div> + <div class="bs-docs-example"> + <div class="progress progress-info" style="margin-bottom: 9px;"> + <div class="bar" style="width: 20%"></div> + </div> + <div class="progress progress-success" style="margin-bottom: 9px;"> + <div class="bar" style="width: 40%"></div> + </div> + <div class="progress progress-warning" style="margin-bottom: 9px;"> + <div class="bar" style="width: 60%"></div> + </div> + <div class="progress progress-danger"> + <div class="bar" style="width: 80%"></div> + </div> </div> +<pre class="prettyprint linenums"> +<div class="progress progress-info"> + <div class="bar" style="width: 20%"></div> +</div> +<div class="progress progress-success"> + <div class="bar" style="width: 40%"></div> +</div> +<div class="progress progress-warning"> + <div class="bar" style="width: 60%"></div> +</div> +<div class="progress progress-danger"> + <div class="bar" style="width: 80%"></div> +</div> +</pre> <h3>{{_i}}Striped bars{{/i}}</h3> <p>{{_i}}Similar to the solid colors, we have varied striped progress bars.{{/i}}</p> - <div class="progress progress-info progress-striped" style="margin-bottom: 9px;"> - <div class="bar" style="width: 20%"></div> - </div> - <div class="progress progress-success progress-striped" style="margin-bottom: 9px;"> - <div class="bar" style="width: 40%"></div> - </div> - <div class="progress progress-warning progress-striped" style="margin-bottom: 9px;"> - <div class="bar" style="width: 60%"></div> - </div> - <div class="progress progress-danger progress-striped" style="margin-bottom: 9px;"> - <div class="bar" style="width: 80%"></div> + <div class="bs-docs-example"> + <div class="progress progress-info progress-striped" style="margin-bottom: 9px;"> + <div class="bar" style="width: 20%"></div> + </div> + <div class="progress progress-success progress-striped" style="margin-bottom: 9px;"> + <div class="bar" style="width: 40%"></div> + </div> + <div class="progress progress-warning progress-striped" style="margin-bottom: 9px;"> + <div class="bar" style="width: 60%"></div> + </div> + <div class="progress progress-danger progress-striped"> + <div class="bar" style="width: 80%"></div> + </div> </div> +<pre class="prettyprint linenums"> +<div class="progress progress-info progress-striped"> + <div class="bar" style="width: 20%"></div> +</div> +<div class="progress progress-success progress-striped"> + <div class="bar" style="width: 40%"></div> +</div> +<div class="progress progress-warning progress-striped"> + <div class="bar" style="width: 60%"></div> +</div> +<div class="progress progress-danger progress-striped"> + <div class="bar" style="width: 80%"></div> +</div> +</pre> - <h3>{{_i}}Behavior{{/i}}</h3> - <p>{{_i}}Progress bars use CSS3 transitions, so if you dynamically adjust the width via javascript, it will smoothly resize.{{/i}}</p> - <p>{{_i}}If you use the <code>.active</code> class, your <code>.progress-striped</code> progress bars will animate the stripes left to right.{{/i}}</p> - <h3>{{_i}}Browser support{{/i}}</h3> + <hr class="bs-docs-separator"> + + + <h2>{{_i}}Browser support{{/i}}</h2> <p>{{_i}}Progress bars use CSS3 gradients, transitions, and animations to achieve all their effects. These features are not supported in IE7-9 or older versions of Firefox.{{/i}}</p> <p>{{_i}}Opera and IE do not support animations at this time.{{/i}}</p> @@ -1653,21 +1875,33 @@ <h2>{{_i}}Wells{{/i}}</h2> <p>{{_i}}Use the well as a simple effect on an element to give it an inset effect.{{/i}}</p> - <div class="well"> - {{_i}}Look, I'm in a well!{{/i}} + <div class="bs-docs-example"> + <div class="well"> + {{_i}}Look, I'm in a well!{{/i}} + </div> </div> <pre class="prettyprint linenums"> <div class="well"> ... </div> </pre> - <h4>{{_i}}Optional classes{{/i}}</h4> + <h3>{{_i}}Optional classes{{/i}}</h3> <p>{{_i}}Control padding and rounded corners with two optional modifier classes.{{/i}}</p> + <div class="bs-docs-example"> + <div class="well well-large"> + {{_i}}Look, I'm in a well!{{/i}} + </div> + </div> <pre class="prettyprint linenums"> <div class="well well-large"> ... </div> </pre> + <div class="bs-docs-example"> + <div class="well well-small"> + {{_i}}Look, I'm in a well!{{/i}} + </div> + </div> <pre class="prettyprint linenums"> <div class="well well-small"> ... @@ -1675,7 +1909,9 @@ </pre> <h2>{{_i}}Close icon{{/i}}</h2> <p>{{_i}}Use the generic close icon for dismissing content like modals and alerts.{{/i}}</p> - <p><button class="close" style="float: none;">×</button></p> + <div class="bs-docs-example"> + <p><button class="close" style="float: none;">×</button></p> + </div> <pre class="prettyprint linenums"><button class="close">&times;</button></pre> <p>{{_i}}iOS devices require an href="#" for click events if you rather use an anchor.{{/i}}</p> <pre class="prettyprint linenums"><a class="close" href="#">&times;</a></pre> diff --git a/docs/templates/pages/download.mustache b/docs/templates/pages/download.mustache index 03fbe3775c..a01c14ab7a 100644 --- a/docs/templates/pages/download.mustache +++ b/docs/templates/pages/download.mustache @@ -3,22 +3,18 @@ <header class="jumbotron subhead" id="overview"> <h1>{{_i}}Customize and download{{/i}}</h1> <p class="lead">{{_i}}<a href="https://github.com/twitter/bootstrap/zipball/master">Download the full repository</a> or customize your entire Bootstrap build by selecting only the components, javascript plugins, and assets you need.{{/i}}</p> + <div class="subnav"> + <ul class="nav nav-pills"> + <li><a href="#components">{{_i}}1. Choose components{{/i}}</a></li> + <li><a href="#plugins">{{_i}}2. Select jQuery plugins{{/i}}</a></li> + <li><a href="#variables">{{_i}}3. Customize variables{{/i}}</a></li> + <li><a href="#download">{{_i}}4. Download{{/i}}</a></li> + </ul> + </div> </header> -<section id="contents"> - <div class="bs-docs-contents"> - <h3>{{_i}}Contents{{/i}}</h3> - <ol> - <li><a href="#components">{{_i}}Choose components{{/i}}</a></li> - <li><a href="#plugins">{{_i}}Select jQuery plugins{{/i}}</a></li> - <li><a href="#variables">{{_i}}Customize variables{{/i}}</a></li> - <li><a href="#download">{{_i}}Download{{/i}}</a></li> - </ol> - </div> -</section> - <form> <section class="download" id="components"> <div class="page-header"> diff --git a/docs/templates/pages/index.mustache b/docs/templates/pages/index.mustache index bee3fc19c2..fe7a02717e 100644 --- a/docs/templates/pages/index.mustache +++ b/docs/templates/pages/index.mustache @@ -41,7 +41,7 @@ <h1>{{_i}}Designed for everyone, everywhere.{{/i}}</h1> <p class="marketing-byline">{{_i}}Need reasons to love Bootstrap? Look no further.{{/i}}</p> <div class="row"> - <div class="span4"> + <div class="span5"> <img class="bs-icon" src="assets/img/glyphicons/glyphicons_042_group.png"> <h2>{{_i}}Built for and by nerds{{/i}}</h2> <p>{{_i}}We love building awesome products on the web just like you, so we made Bootstrap. No matter your skill level, use it as a complete kit or use to start something more complex.{{/i}}</p> @@ -58,7 +58,7 @@ <h2>{{_i}}Responsive design{{/i}}</h2> <p>{{_i}}As of Bootstrap 2, our components are scaled according to a range of resolutions and devices to provide a consistent experience, no matter what.{{/i}}</p> </div> - <div class="span4"> + <div class="span5"> <img class="bs-icon" src="assets/img/glyphicons/glyphicons_266_book_open.png"> <h2>{{_i}}Styleguide docs{{/i}}</h2> <p>{{_i}}Unlike other front-end toolkits, Bootstrap was designed first and foremost as a styleguide to document not only our features, but best practices and living, coded examples.{{/i}}</p> @@ -82,26 +82,26 @@ <h1>{{_i}}Built with Bootstrap.{{/i}}</h1> <p class="marketing-byline">{{_i}}For even more sites built with Bootstrap, <a href="http://builtwithbootstrap.tumblr.com/" target="_blank">visit the unofficial Tumblr</a> or <a href="./examples.html">browse the examples</a>.{{/i}}</p> <ul class="thumbnails example-sites"> - <li class="span2"> + <li class="span3"> <a class="thumbnail" href="http://soundready.fm/" target="_blank"> <img src="assets/img/example-sites/soundready.png" alt="SoundReady.fm"> </a> </li> - <li class="span2"> + <li class="span3"> <a class="thumbnail" href="http://kippt.com/" target="_blank"> <img src="assets/img/example-sites/kippt.png" alt="Kippt"> </a> </li> - <li class="span2"> + <li class="span3"> <a class="thumbnail" href="http://www.fleetio.com/" target="_blank"> <img src="assets/img/example-sites/fleetio.png" alt="Fleetio"> </a> </li> - <li class="span2"> +<!-- <li class="span2"> <a class="thumbnail" href="http://www.jshint.com/" target="_blank"> <img src="assets/img/example-sites/jshint.png" alt="JS Hint"> </a> </li> - </ul> + --> </ul> </div><!-- /.marketing --> diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache index 30872b1e1a..d90184c7b8 100644 --- a/docs/templates/pages/javascript.mustache +++ b/docs/templates/pages/javascript.mustache @@ -3,73 +3,55 @@ <header class="jumbotron subhead" id="overview"> <h1>{{_i}}Javascript for Bootstrap{{/i}}</h1> <p class="lead">{{_i}}Bring Bootstrap's components to life—now with 12 custom <a href="http://jquery.com/" target="_blank">jQuery</a> plugins.{{/i}} + <div class="subnav"> + <ul class="nav nav-pills"> + <li><a href="#modals">{{_i}}Modal{{/i}}</a></li> + <li><a href="#dropdowns">{{_i}}Dropdown{{/i}}</a></li> + <li><a href="#scrollspy">{{_i}}Scrollspy{{/i}}</a></li> + <li><a href="#tabs">{{_i}}Tab{{/i}}</a></li> + <li><a href="#tooltips">{{_i}}Tooltip{{/i}}</a></li> + <li><a href="#popovers">{{_i}}Popover{{/i}}</a></li> + <li><a href="#alerts">{{_i}}Alert{{/i}}</a></li> + <li><a href="#buttons">{{_i}}Button{{/i}}</a></li> + <li><a href="#collapse">{{_i}}Collapse{{/i}}</a></li> + <li><a href="#carousel">{{_i}}Carousel{{/i}}</a></li> + <li><a href="#typeahead">{{_i}}Typeahead{{/i}}</a></li> + </ul> + </div> </header> - <!-- Using Javascript w/ Bootstrap - ================================================== --> - <section id="javascript"> - <div class="page-header"> - <h1>{{_i}}jQuery plugins{{/i}} <small>{{_i}}A dozen Bootstrap plugins to get you started{{/i}}</small></h1> - </div> - <div class="row"> - <div class="span4"> - <h3><a href="./javascript.html#modals">{{_i}}Modals{{/i}}</a></h3> - <p>{{_i}}A streamlined, but flexible, take on the traditional javascript modal plugin with only the minimum required functionality and smart defaults.{{/i}}</p> - </div> - <div class="span4"> - <h3><a href="./javascript.html#dropdowns">{{_i}}Dropdowns{{/i}}</a></h3> - <p>{{_i}}Add dropdown menus to nearly anything in Bootstrap with this simple plugin. Bootstrap features full dropdown menu support on in the navbar, tabs, and pills.{{/i}}</p> - </div> - <div class="span4"> - <h3><a href="./javascript.html#scrollspy">{{_i}}Scrollspy{{/i}}</a></h3> - <p>{{_i}}Use scrollspy to automatically update the links in your navbar to show the current active link based on scroll position.{{/i}}</p> - </div> - <div class="span4"> - <h3><a href="./javascript.html#tabs">{{_i}}Togglable tabs{{/i}}</a></h3> - <p>{{_i}}Use this plugin to make tabs and pills more useful by allowing them to toggle through tabbable panes of local content.{{/i}}</p> - </div> - </div> <!-- /row --> - <div class="row"> - <div class="span4"> - <h3><a href="./javascript.html#tooltips">{{_i}}Tooltips{{/i}}</a></h3> - <p>{{_i}}A new take on the jQuery Tipsy plugin, Tooltips don't rely on images—they use CSS3 for animations and data-attributes for local title storage.{{/i}}</p> - </div> - <div class="span4"> - <h3><a href="./javascript.html#popovers">{{_i}}Popovers{{/i}}</a> <small class="muted">*</small></h3> - <p>{{_i}}Add small overlays of content, like those on the iPad, to any element for housing secondary information.{{/i}}</p> - <p class="muted"><strong>*</strong> {{_i}}Requires <a href="#tooltips">Tooltips</a> to be included{{/i}}</p> - </div> - <div class="span4"> - <h3><a href="./javascript.html#alerts">{{_i}}Alert messages{{/i}}</a></h3> - <p>{{_i}}The alert plugin is a tiny class for adding close functionality to alerts.{{/i}}</p> - </div> - <div class="span4"> - <h3><a href="./javascript.html#buttons">{{_i}}Buttons{{/i}}</a></h3> - <p>{{_i}}Do more with buttons. Control button states or create groups of buttons for more components like toolbars.{{/i}}</p> - </div> - </div> <!-- /row --> - <div class="row" style="margin-bottom: 9px;"> - <div class="span4"> - <h3><a href="./javascript.html#collapse">{{_i}}Collapse{{/i}}</a></h3> - <p>{{_i}}Get base styles and flexible support for collapsible components like accordions and navigation.{{/i}}</p> - </div> - <div class="span4"> - <h3><a href="./javascript.html#carousel">{{_i}}Carousel{{/i}}</a></h3> - <p>{{_i}}Create a merry-go-round of any content you wish to provide an interactive slideshow of content.{{/i}}</p> - </div> - <div class="span4"> - <h3><a href="./javascript.html#typeahead">Typeahead</a></h3> - <p>{{_i}}A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.{{/i}}</p> - </div> - <div class="span4"> - <h3>{{_i}}Transitions{{/i}} <small class="muted">*</small></h3> - <p>{{_i}}For simple transition effects, include bootstrap-transition.js once to slide in modals or fade out alerts.{{/i}}</p> - <p class="muted"><strong>*</strong> {{_i}}Required for animation in plugins{{/i}}</p> - </div> - </div> <!-- /row --> - <div class="alert alert-info"><strong>{{_i}}Heads up!{{/i}}</strong> {{_i}} If you have downloaded the latest version of Bootstrap, both <strong>bootstrap.js</strong> and <strong>bootstrap.min.js</strong> contain all of these plugins.{{/i}}</div> + +<!-- Overview +================================================== --> +<section id="overview"> + <div class="page-header"> + <h1>{{_i}}Javascript in Bootstrap{{/i}}</h1> + </div> + <h3>{{_i}}Individual or compiled{{/i}}</h3> + <p>{{_i}}If you have downloaded the latest version of Bootstrap, both <strong>bootstrap.js</strong> and <strong>bootstrap.min.js</strong> contain all of these plugins.{{/i}}</p> + <h3>{{_i}}Data attributea{{/i}}</h3> + <p>{{_i}}...{{/i}}</p> + <h3>{{_i}}Programmatic API{{/i}}</h3> + <p>{{_i}}...{{/i}}</p> + + + {{! Thought: consider porting much of the JS readme here? }} + +</section> + + + +<!-- Transitions +================================================== --> +<section id="modals"> + <div class="page-header"> + <h1>{{_i}}Transitions{{/i}} <small>bootstrap-transition.js</small></h1> + </div> + <h3>{{_i}}About transitions{{/i}}</h3> + <p>{{_i}}For simple transition effects, include bootstrap-transition.js once to slide in modals or fade out alerts.{{/i}}</p> + <p class="muted"><strong>*</strong> {{_i}}Required for animation in plugins{{/i}}</p> </section> @@ -83,7 +65,6 @@ <h3>{{_i}}About modals{{/i}}</h3> <p>{{_i}}A streamlined, but flexible, take on the traditional javascript modal plugin with only the minimum required functionality and smart defaults.{{/i}}</p> - <a href="assets/js/bootstrap-modal.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a> <h2>{{_i}}Static example{{/i}}</h2> <p>{{_i}}Below is a statically rendered modal.{{/i}}</p> @@ -273,7 +254,6 @@ $('#myModal').on('hidden', function () { <h3>{{_i}}About dropdowns{{/i}}</h3> <p>{{_i}}Add dropdown menus to nearly anything in Bootstrap with this simple plugin. Bootstrap features full dropdown menu support on in the navbar, tabs, and pills.{{/i}}</p> - <a href="assets/js/bootstrap-dropdown.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a> <h2>{{_i}}Examples{{/i}}</h2> <p>{{_i}}Click on the dropdown nav links in the navbar and pills below to test dropdowns.{{/i}}</p> @@ -416,7 +396,6 @@ $('#myModal').on('hidden', function () { </div> <p>{{_i}}The ScrollSpy plugin is for automatically updating nav targets based on scroll position.{{/i}}</p> - <a href="assets/js/bootstrap-scrollspy.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a> <h2>{{_i}}Example navbar with scrollspy{{/i}}</h2> <p>{{_i}}Scroll the area below and watch the navigation update. The dropdown sub items will be highlighted as well. Try it!{{/i}}</p> @@ -532,7 +511,6 @@ $('[data-spy="scroll"]').each(function () { </div> <p>{{_i}}This plugin adds quick, dynamic tab and pill functionality for transitioning through local content.{{/i}}</p> - <a href="assets/js/bootstrap-tab.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a> <h2>{{_i}}Example tabs{{/i}}</h2> <p>{{_i}}Click the tabs below to toggle between hidden panes, even via dropdown menus.{{/i}}</p> @@ -648,7 +626,6 @@ $('a[data-toggle="tab"]').on('shown', function (e) { <h3>{{_i}}About Tooltips{{/i}}</h3> <p>{{_i}}Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use css3 for animations, and data-attributes for local title storage.{{/i}}</p> - <a href="assets/js/bootstrap-tooltip.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a> <h2>{{_i}}Example use of Tooltips{{/i}}</h2> <p>{{_i}}Hover over the links below to see tooltips:{{/i}}</p> @@ -755,7 +732,6 @@ $('a[data-toggle="tab"]').on('shown', function (e) { <h3>{{_i}}About popovers{{/i}}</h3> <p>{{_i}}Add small overlays of content, like those on the iPad, to any element for housing secondary information.{{/i}}</p> <p class="muted"><strong>*</strong> {{_i}}Requires <a href="#tooltips">Tooltip</a> to be included{{/i}}</p> - <a href="assets/js/bootstrap-popover.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a> <h2>{{_i}}Example hover popover{{/i}}</h2> <p>{{_i}}Hover over the button to trigger the popover.{{/i}}</p> @@ -864,7 +840,6 @@ $('a[data-toggle="tab"]').on('shown', function (e) { <h3>{{_i}}About alerts{{/i}}</h3> <p>{{_i}}The alert plugin is a tiny class for adding close functionality to alerts.{{/i}}</p> - <a href="assets/js/bootstrap-alert.js" target="_blank" class="btn">{{_i}}Download{{/i}}</a> <h2>{{_i}}Example alerts{{/i}}</h2> <p>{{_i}}The alerts plugin works on regular alert messages, and block messages.{{/i}}</p> @@ -935,7 +910,6 @@ $('#my-alert').bind('closed', function () { <h3>{{_i}}About{{/i}}</h3> <p>{{_i}}Do more with buttons. Control button states or create groups of buttons for more components like toolbars.{{/i}}</p> - <a href="assets/js/bootstrap-button.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a> <h2>{{_i}}Example uses{{/i}}</h2> <p>{{_i}}Use the buttons plugin for states and toggles.{{/i}}</p> @@ -1030,7 +1004,6 @@ $('#my-alert').bind('closed', function () { <h3>{{_i}}About{{/i}}</h3> <p>{{_i}}Get base styles and flexible support for collapsible components like accordions and navigation.{{/i}}</p> - <a href="assets/js/bootstrap-collapse.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a> <p class="muted"><strong>*</strong> {{_i}}Requires the Transitions plugin to be included.{{/i}}</p> <h2>{{_i}}Example accordion{{/i}}</h2> @@ -1179,7 +1152,6 @@ $('#myCollapsible').on('hidden', function () { <h3>{{_i}}About{{/i}}</h3> <p>{{_i}}A generic plugin for cycling through elements. A merry-go-round.{{/i}}</p> - <a href="assets/js/bootstrap-carousel.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a> <h2>{{_i}}Example carousel{{/i}}</h2> <p>{{_i}}Watch the slideshow below.{{/i}}</p> @@ -1313,7 +1285,6 @@ $('.carousel').carousel({ <h3>{{_i}}About{{/i}}</h3> <p>{{_i}}A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.{{/i}}</p> - <a href="assets/js/bootstrap-typeahead.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a> <h2>{{_i}}Example{{/i}}</h2> <p>{{_i}}Start typing in the field below to show the typeahead results.{{/i}}</p> diff --git a/docs/templates/pages/less.mustache b/docs/templates/pages/less.mustache index fe33cd2472..6606f4ca83 100644 --- a/docs/templates/pages/less.mustache +++ b/docs/templates/pages/less.mustache @@ -3,21 +3,15 @@ <header class="jumbotron subhead" id="overview"> <h1>{{_i}}Using LESS with Bootstrap{{/i}}</h1> <p class="lead">{{_i}}Customize and extend Bootstrap with <a href="http://lesscss.org" target="_blank">LESS</a>, a CSS preprocessor, to take advantage of the variables, mixins, and more used to build Bootstrap's CSS.{{/i}}</p> -</header> - - - -<section id="contents"> - <div class="bs-docs-contents"> - <h3>{{_i}}Contents{{/i}}</h3> - <ol> + <div class="subnav"> + <ul class="nav nav-pills"> <li><a href="#builtWith">{{_i}}Built with Less{{/i}}</a></li> <li><a href="#variables">{{_i}}Variables{{/i}}</a></li> <li><a href="#mixins">{{_i}}Mixins{{/i}}</a></li> <li><a href="#compiling">{{_i}}Compiling Bootstrap{{/i}}</a></li> - </ol> + </ul> </div> -</section> +</header> diff --git a/docs/templates/pages/scaffolding.mustache b/docs/templates/pages/scaffolding.mustache index ee447da3d3..850654aa3c 100644 --- a/docs/templates/pages/scaffolding.mustache +++ b/docs/templates/pages/scaffolding.mustache @@ -3,6 +3,16 @@ <header class="jumbotron subhead" id="overview"> <h1>{{_i}}Scaffolding{{/i}}</h1> <p class="lead">{{_i}}Bootstrap is built on a responsive 12-column grid. We've also included fixed- and fluid-width layouts based on that system.{{/i}}</p> + <div class="subnav"> + <ul class="nav nav-pills"> + <li><a href="#global">{{_i}}Global styles{{/i}}</a></li> + <li><a href="#gridSystem">{{_i}}Grid system{{/i}}</a></li> + <li><a href="#fluidGridSystem">{{_i}}Fluid grid system{{/i}}</a></li> + <li><a href="#gridCustomization">{{_i}}Customizing{{/i}}</a></li> + <li><a href="#layouts">{{_i}}Layouts{{/i}}</a></li> + <li><a href="#responsive">{{_i}}Responsive design{{/i}}</a></li> + </ul> + </div> </header> @@ -62,24 +72,22 @@ <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> - <div class="span1">1</div> - <div class="span1">1</div> </div> <div class="row show-grid"> - <div class="span4">4</div> + <div class="span2">2</div> <div class="span4">4</div> <div class="span4">4</div> </div> <div class="row show-grid"> <div class="span4">4</div> - <div class="span8">8</div> + <div class="span6">6</div> </div> <div class="row show-grid"> - <div class="span6">6</div> - <div class="span6">6</div> + <div class="span5">5</div> + <div class="span5">5</div> </div> <div class="row show-grid"> - <div class="span12">12</div> + <div class="span10">10</div> </div> </div> @@ -98,14 +106,14 @@ <div class="bs-docs-grid"> <div class="row show-grid"> <div class="span4">4</div> - <div class="span4 offset4">4 offset 4</div> + <div class="span4 offset2">4 offset 2</div> </div><!-- /row --> <div class="row show-grid"> - <div class="span3 offset3">3 offset 3</div> - <div class="span3 offset3">3 offset 3</div> + <div class="span3 offset2">3 offset 2</div> + <div class="span3 offset2">3 offset 2</div> </div><!-- /row --> <div class="row show-grid"> - <div class="span8 offset4">8 offset 4</div> + <div class="span6 offset4">6 offset 4</div> </div><!-- /row --> </div> <pre class="prettyprint linenums"> @@ -120,13 +128,13 @@ <h3>{{_i}}Example{{/i}}</h3> <p>{{_i}}Here two nested <code>.span4</code> columns are placed within a <code>.span8</code>.{{/i}}</p> <div class="row show-grid"> - <div class="span8"> + <div class="span10"> {{_i}}Level 1 of column{{/i}} <div class="row show-grid"> - <div class="span4"> + <div class="span5"> {{_i}}Level 2{{/i}} </div> - <div class="span4"> + <div class="span5"> {{_i}}Level 2{{/i}} </div> </div> @@ -134,11 +142,11 @@ </div> <pre class="prettyprint linenums"> <div class="row"> - <div class="span8"> + <div class="span10"> {{_i}}Level 1 column{{/i}} <div class="row"> - <div class="span4">{{_i}}Level 2{{/i}}</div> - <div class="span4">{{_i}}Level 2{{/i}}</div> + <div class="span5">{{_i}}Level 2{{/i}}</div> + <div class="span5">{{_i}}Level 2{{/i}}</div> </div> </div> </div> diff --git a/docs/upgrading.html b/docs/upgrading.html index 9611ffc41d..1e5165db4d 100644 --- a/docs/upgrading.html +++ b/docs/upgrading.html @@ -27,84 +27,50 @@ </head> - <body> - - <div class="bs-docs-nav"> - <h3 class="bs-docs-logo"><a href="./index.html">Bootstrap</a></h3> - <ul class="bs-nav"> - <li class=""> - <a href="./scaffolding.html">Scaffolding</a> - <ul> - <li><a href="./scaffolding.html#global">Global styles</a></li> - <li><a href="./scaffolding.html#gridSystem">Grid system</a></li> - <li><a href="./scaffolding.html#fluidGridSystem">Fluid grid system</a></li> - <li><a href="./scaffolding.html#gridCustomization">Customizing</a></li> - <li><a href="./scaffolding.html#layouts">Layouts</a></li> - <li><a href="./scaffolding.html#responsive">Responsive design</a></li> - </ul> - </li> - <li class=""> - <a href="./base-css.html">Base CSS</a> - <ul> - <li><a href="./base-css.html#typography">Typography</a></li> - <li><a href="./base-css.html#code">Code</a></li> - <li><a href="./base-css.html#tables">Tables</a></li> - <li><a href="./base-css.html#forms">Forms</a></li> - <li><a href="./base-css.html#buttons">Buttons</a></li> - <li><a href="./base-css.html#icons">Icons by Glyphicons</a></li> - </ul> - </li> - <li class=""> - <a href="./components.html">Components</a> - <ul> - <li><a href="./components.html#buttonGroups">Button groups</a></li> - <li><a href="./components.html#buttonDropdowns">Button dropdowns</a></li> - <li><a href="./components.html#navs">Nav, tabs, pills</a></li> - <li><a href="./components.html#navbar">Navbar</a></li> - <li><a href="./components.html#breadcrumbs">Breadcrumbs</a></li> - <li><a href="./components.html#pagination">Pagination</a></li> - <li><a href="./components.html#labels">Labels</a></li> - <li><a href="./components.html#badges">Badges</a></li> - <li><a href="./components.html#typography">Typography</a></li> - <li><a href="./components.html#thumbnails">Thumbnails</a></li> - <li><a href="./components.html#alerts">Alerts</a></li> - <li><a href="./components.html#progress">Progress bars</a></li> - <li><a href="./components.html#misc">Miscellaneous</a></li> - </ul> - </li> - <li class=""> - <a href="./javascript.html">Javascript</a> - <ul> - <li><a href="./javascript.html#javascript">All plugins</a></li> - <li><a href="./javascript.html#modals">Modal</a></li> - <li><a href="./javascript.html#dropdowns">Dropdown</a></li> - <li><a href="./javascript.html#scrollspy">Scrollspy</a></li> - <li><a href="./javascript.html#tabs">Tab</a></li> - <li><a href="./javascript.html#tooltips">Tooltip</a></li> - <li><a href="./javascript.html#popovers">Popover</a></li> - <li><a href="./javascript.html#alerts">Alert</a></li> - <li><a href="./javascript.html#buttons">Button</a></li> - <li><a href="./javascript.html#collapse">Collapse</a></li> - <li><a href="./javascript.html#carousel">Carousel</a></li> - <li><a href="./javascript.html#typeahead">Typeahead</a></li> - </ul> - </li> - <li class=""> - <a href="./less.html">LESS</a> - <ul> - <li><a href="./less.html#builtWith">Built with Less</a></li> - <li><a href="./less.html#variables">Variables</a></li> - <li><a href="./less.html#mixins">Mixins</a></li> - <li><a href="./less.html#compiling">Compiling Bootstrap</a></li> - </ul> - </li> - <li class=""> - <a href="./download.html">Customize</a> - </li> - <li class=""> - <a href="./examples.html">Examples</a> - </li> - </ul> + <body data-spy="scroll" data-target=".subnav" data-offset="50"> + + <!-- Navbar + ================================================== --> + <div class="navbar navbar-fixed-top"> + <div class="navbar-inner"> + <div class="bs-docs-container"> + <button type="button"class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="brand" href="./index.html">Bootstrap</a> + <div class="nav-collapse collapse"> + <ul class="nav"> + <li class=""> + <a href="./index.html">Home</a> + </li> + <li class=""> + <a href="./scaffolding.html">Scaffolding</a> + </li> + <li class=""> + <a href="./base-css.html">Base CSS</a> + </li> + <li class=""> + <a href="./components.html">Components</a> + </li> + <li class=""> + <a href="./javascript.html">Javascript</a> + </li> + <li class=""> + <a href="./less.html">LESS</a> + </li> + <li class="divider-vertical"></li> + <li class=""> + <a href="./download.html">Customize</a> + </li> + <li class=""> + <a href="./examples.html">Examples</a> + </li> + </ul> + </div> + </div> + </div> </div> <div class="bs-docs-container"> @@ -314,7 +280,7 @@ <p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> </footer> - </div><!-- /container --> + </div> diff --git a/less/alerts.less b/less/alerts.less index 46a0d77bfd..1f73314c11 100644 --- a/less/alerts.less +++ b/less/alerts.less @@ -11,9 +11,6 @@ .border-radius(4px); color: @warningText; } -.alert-heading { - color: inherit; -} // Adjust close link position .alert .close { @@ -28,7 +25,7 @@ .alert-success { background-color: @successBackground; - border-color: @successBorder; + border-color: @successBorder; color: @successText; } .alert-danger, |