mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-19 16:54:24 +01:00
Formatting and docs changes
This commit is contained in:
parent
36aa3afb4f
commit
4b1ff7fa49
@ -290,6 +290,7 @@ body {
|
||||
|
||||
/* Page headers */
|
||||
.bs-header {
|
||||
margin-bottom: 40px;
|
||||
padding: 30px 15px 40px; /* side padding builds on .container 15px, so 30px */
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
@ -534,8 +535,6 @@ body {
|
||||
.bs-sidenav {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
/* All levels of nav */
|
||||
@ -630,8 +629,8 @@ body {
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
/* Janky fix for preventing navbar from overlapping */
|
||||
h1[id] {
|
||||
margin-top: 0;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
|
2
docs/assets/css/pack.min.css
vendored
2
docs/assets/css/pack.min.css
vendored
File diff suppressed because one or more lines are too long
3822
docs/components.html
3822
docs/components.html
@ -6,90 +6,87 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
---
|
||||
|
||||
|
||||
<!-- Glyphicons
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="glyphicons">Glyphicons</h1>
|
||||
</div>
|
||||
<!-- Glyphicons
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="glyphicons" class="page-header">Glyphicons</h1>
|
||||
|
||||
<h2 id="glyphicons-glyphs">Available glyphs</h2>
|
||||
<p>Includes 200 glyphs in font format from the Glyphicon Halflings set. <a href="http://glyphicons.com/">Glyphicons</a> Halflings are normally not available for free, but their creator has made them available for Bootstrap free of cost. As a thank you, we only ask that you include a link back to <a href="http://glyphicons.com/">Glyphicons</a> whenever possible.</p>
|
||||
<div class="bs-glyphicons">
|
||||
<ul class="bs-glyphicons-list">
|
||||
{% for iconClassName in site.data.glyphicons %}
|
||||
<li>
|
||||
<span class="glyphicon {{ iconClassName }}"></span>
|
||||
<span class="glyphicon-class">glyphicon {{ iconClassName }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<h2 id="glyphicons-glyphs">Available glyphs</h2>
|
||||
<p>Includes 200 glyphs in font format from the Glyphicon Halflings set. <a href="http://glyphicons.com/">Glyphicons</a> Halflings are normally not available for free, but their creator has made them available for Bootstrap free of cost. As a thank you, we only ask that you include a link back to <a href="http://glyphicons.com/">Glyphicons</a> whenever possible.</p>
|
||||
<div class="bs-glyphicons">
|
||||
<ul class="bs-glyphicons-list">
|
||||
{% for iconClassName in site.data.glyphicons %}
|
||||
<li>
|
||||
<span class="glyphicon {{ iconClassName }}"></span>
|
||||
<span class="glyphicon-class">glyphicon {{ iconClassName }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<h2 id="glyphicons-how-to-use">How to use</h2>
|
||||
<p>For performance reasons, all icons require a base class and individual icon class. To use, place the following code just about anywhere. Be sure to leave a space between the icon and text for proper padding.</p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Don't mix with other components</h4>
|
||||
<p>Icon classes cannot be combined with other elements. They are designed to be standalone elements.</p>
|
||||
</div>
|
||||
<h2 id="glyphicons-how-to-use">How to use</h2>
|
||||
<p>For performance reasons, all icons require a base class and individual icon class. To use, place the following code just about anywhere. Be sure to leave a space between the icon and text for proper padding.</p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Don't mix with other components</h4>
|
||||
<p>Icon classes cannot be combined with other elements. They are designed to be standalone elements.</p>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="glyphicons-examples">Examples</h2>
|
||||
<p>Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.</p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-align-left"></span></button>
|
||||
<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-align-center"></span></button>
|
||||
<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-align-right"></span></button>
|
||||
<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-align-justify"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<button type="button" class="btn btn-default btn-lg"><span class="glyphicon glyphicon-star"></span> Star</button>
|
||||
<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-star"></span> Star</button>
|
||||
<button type="button" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-star"></span> Star</button>
|
||||
<button type="button" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-star"></span> Star</button>
|
||||
<h2 id="glyphicons-examples">Examples</h2>
|
||||
<p>Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.</p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-align-left"></span></button>
|
||||
<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-align-center"></span></button>
|
||||
<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-align-right"></span></button>
|
||||
<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-align-justify"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<button type="button" class="btn btn-default btn-lg"><span class="glyphicon glyphicon-star"></span> Star</button>
|
||||
<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-star"></span> Star</button>
|
||||
<button type="button" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-star"></span> Star</button>
|
||||
<button type="button" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-star"></span> Star</button>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<button type="button" class="btn btn-default btn-lg">
|
||||
<span class="glyphicon glyphicon-star"></span> Star
|
||||
</button>
|
||||
{% endhighlight %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Dropdowns
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="dropdowns">Dropdowns</h1>
|
||||
|
||||
<!-- Dropdowns
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="dropdowns" class="page-header">Dropdowns</h1>
|
||||
|
||||
<p class="lead">Toggleable, contextual menu for displaying lists of links. Made interactive with the <a href="../javascript/#dropdowns">dropdown JavaScript plugin</a>.</p>
|
||||
|
||||
<h3 id="dropdowns-example">Example</h3>
|
||||
<p>Wrap the dropdown's trigger and the dropdown menu within <code>.dropdown</code>, or another element that declares <code>position: relative;</code>. Then add the menu's HTML.</p>
|
||||
<div class="bs-example">
|
||||
<div class="dropdown clearfix">
|
||||
<button class="btn dropdown-toggle sr-only" type="button" id="dropdownMenu1" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
|
||||
<li role="presentation" class="divider"></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<p class="lead">Toggleable, contextual menu for displaying lists of links. Made interactive with the <a href="../javascript/#dropdowns">dropdown JavaScript plugin</a>.</p>
|
||||
|
||||
<h3 id="dropdowns-example">Example</h3>
|
||||
<p>Wrap the dropdown's trigger and the dropdown menu within <code>.dropdown</code>, or another element that declares <code>position: relative;</code>. Then add the menu's HTML.</p>
|
||||
<div class="bs-example">
|
||||
<div class="dropdown clearfix">
|
||||
<button class="btn dropdown-toggle sr-only" type="button" id="dropdownMenu1" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
|
||||
<li role="presentation" class="divider"></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /example -->
|
||||
</div><!-- /example -->
|
||||
{% highlight html %}
|
||||
<div class="dropdown">
|
||||
<button class="btn dropdown-toggle sr-only" type="button" id="dropdownMenu1" data-toggle="dropdown">
|
||||
@ -106,41 +103,41 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="dropdowns-alignment">Alignment</h3>
|
||||
<p>By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add <code>.dropdown-menu-right</code> to a <code>.dropdown-menu</code> to right align the dropdown menu.</p>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>May require additional positioning</h4>
|
||||
<p>Dropdowns are automatically positioned via CSS within the normal flow of the document. This means dropdowns may be cropped by parents with certain <code>overflow</code> properties or appear out of bounds of the viewport. Address these issues on your own as they arise.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Deprecated <code>.pull-right</code> alignment</h4>
|
||||
<p>As of v3.1, we've deprecated <code>.pull-right</code> on dropdown menus. To right-align a menu, use <code>.dropdown-menu-right</code>. Right-aligned nav components in the navbar use a mixin version of this class to automatically align the menu. To override it, use <code>.dropdown-menu-left</code>.</p>
|
||||
</div>
|
||||
<h3 id="dropdowns-alignment">Alignment</h3>
|
||||
<p>By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add <code>.dropdown-menu-right</code> to a <code>.dropdown-menu</code> to right align the dropdown menu.</p>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>May require additional positioning</h4>
|
||||
<p>Dropdowns are automatically positioned via CSS within the normal flow of the document. This means dropdowns may be cropped by parents with certain <code>overflow</code> properties or appear out of bounds of the viewport. Address these issues on your own as they arise.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Deprecated <code>.pull-right</code> alignment</h4>
|
||||
<p>As of v3.1, we've deprecated <code>.pull-right</code> on dropdown menus. To right-align a menu, use <code>.dropdown-menu-right</code>. Right-aligned nav components in the navbar use a mixin version of this class to automatically align the menu. To override it, use <code>.dropdown-menu-left</code>.</p>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="dLabel">
|
||||
...
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="dropdowns-headers">Headers</h3>
|
||||
<p>Add a header to label sections of actions in any dropdown menu.</p>
|
||||
<div class="bs-example">
|
||||
<div class="dropdown clearfix">
|
||||
<button class="btn dropdown-toggle sr-only" type="button" id="dropdownMenu2" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2">
|
||||
<li role="presentation" class="dropdown-header">Dropdown header</li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
|
||||
<li role="presentation" class="divider"></li>
|
||||
<li role="presentation" class="dropdown-header">Dropdown header</li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /example -->
|
||||
<h3 id="dropdowns-headers">Headers</h3>
|
||||
<p>Add a header to label sections of actions in any dropdown menu.</p>
|
||||
<div class="bs-example">
|
||||
<div class="dropdown clearfix">
|
||||
<button class="btn dropdown-toggle sr-only" type="button" id="dropdownMenu2" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2">
|
||||
<li role="presentation" class="dropdown-header">Dropdown header</li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
|
||||
<li role="presentation" class="divider"></li>
|
||||
<li role="presentation" class="dropdown-header">Dropdown header</li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /example -->
|
||||
{% highlight html %}
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2">
|
||||
<li role="presentation" class="dropdown-header">Dropdown header</li>
|
||||
@ -151,21 +148,21 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="dropdowns-disabled">Disabled menu items</h3>
|
||||
<p>Add <code>.disabled</code> to a <code><li></code> in the dropdown to disable the link.</p>
|
||||
<div class="bs-example">
|
||||
<div class="dropdown clearfix">
|
||||
<button class="btn dropdown-toggle sr-only" type="button" id="dropdownMenu3" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu3">
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Regular link</a></li>
|
||||
<li role="presentation" class="disabled"><a role="menuitem" tabindex="-1" href="#">Disabled link</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /example -->
|
||||
<h3 id="dropdowns-disabled">Disabled menu items</h3>
|
||||
<p>Add <code>.disabled</code> to a <code><li></code> in the dropdown to disable the link.</p>
|
||||
<div class="bs-example">
|
||||
<div class="dropdown clearfix">
|
||||
<button class="btn dropdown-toggle sr-only" type="button" id="dropdownMenu3" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu3">
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Regular link</a></li>
|
||||
<li role="presentation" class="disabled"><a role="menuitem" tabindex="-1" href="#">Disabled link</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /example -->
|
||||
{% highlight html %}
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu3">
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Regular link</a></li>
|
||||
@ -173,32 +170,31 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another link</a></li>
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Button Groups
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="btn-groups" class="page-header">Button groups</h1>
|
||||
|
||||
<p class="lead">Group a series of buttons together on a single line with the button group. Add on optional JavaScript radio and checkbox style behavior with <a href="../javascript/#buttons">our buttons plugin</a>.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Tooltips & popovers in button groups require special setting</h4>
|
||||
<p>When using tooltips or popovers on elements within a <code>.btn-group</code>, you'll have to specify the option <code>container: 'body'</code> to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip or popover is triggered).</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Button Groups
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="btn-groups">Button groups</h1>
|
||||
</div>
|
||||
<p class="lead">Group a series of buttons together on a single line with the button group. Add on optional JavaScript radio and checkbox style behavior with <a href="../javascript/#buttons">our buttons plugin</a>.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Tooltips & popovers in button groups require special setting</h4>
|
||||
<p>When using tooltips or popovers on elements within a <code>.btn-group</code>, you'll have to specify the option <code>container: 'body'</code> to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip or popover is triggered).</p>
|
||||
</div>
|
||||
|
||||
<h3 id="btn-groups-single">Basic example</h3>
|
||||
<p>Wrap a series of buttons with <code>.btn</code> in <code>.btn-group</code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-group" style="margin: 9px 0 5px;">
|
||||
<button type="button" class="btn btn-default">Left</button>
|
||||
<button type="button" class="btn btn-default">Middle</button>
|
||||
<button type="button" class="btn btn-default">Right</button>
|
||||
</div>
|
||||
<h3 id="btn-groups-single">Basic example</h3>
|
||||
<p>Wrap a series of buttons with <code>.btn</code> in <code>.btn-group</code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-group" style="margin: 9px 0 5px;">
|
||||
<button type="button" class="btn btn-default">Left</button>
|
||||
<button type="button" class="btn btn-default">Middle</button>
|
||||
<button type="button" class="btn btn-default">Right</button>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">Left</button>
|
||||
@ -207,26 +203,26 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="btn-groups-toolbar">Button toolbar</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="bs-example">
|
||||
<div class="btn-toolbar" role="toolbar" style="margin: 0;">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">1</button>
|
||||
<button type="button" class="btn btn-default">2</button>
|
||||
<button type="button" class="btn btn-default">3</button>
|
||||
<button type="button" class="btn btn-default">4</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">5</button>
|
||||
<button type="button" class="btn btn-default">6</button>
|
||||
<button type="button" class="btn btn-default">7</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">8</button>
|
||||
</div>
|
||||
<h3 id="btn-groups-toolbar">Button toolbar</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="bs-example">
|
||||
<div class="btn-toolbar" role="toolbar" style="margin: 0;">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">1</button>
|
||||
<button type="button" class="btn btn-default">2</button>
|
||||
<button type="button" class="btn btn-default">3</button>
|
||||
<button type="button" class="btn btn-default">4</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">5</button>
|
||||
<button type="button" class="btn btn-default">6</button>
|
||||
<button type="button" class="btn btn-default">7</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">8</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group">...</div>
|
||||
@ -235,38 +231,38 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="btn-groups-sizing">Sizing</h3>
|
||||
<p>Instead of applying button sizing classes to every button in a group, just add <code>.btn-group-*</code> to the <code>.btn-group</code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-lg">
|
||||
<button type="button" class="btn btn-default">Left</button>
|
||||
<button type="button" class="btn btn-default">Middle</button>
|
||||
<button type="button" class="btn btn-default">Right</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">Left</button>
|
||||
<button type="button" class="btn btn-default">Middle</button>
|
||||
<button type="button" class="btn btn-default">Right</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button type="button" class="btn btn-default">Left</button>
|
||||
<button type="button" class="btn btn-default">Middle</button>
|
||||
<button type="button" class="btn btn-default">Right</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-xs">
|
||||
<button type="button" class="btn btn-default">Left</button>
|
||||
<button type="button" class="btn btn-default">Middle</button>
|
||||
<button type="button" class="btn btn-default">Right</button>
|
||||
</div>
|
||||
<h3 id="btn-groups-sizing">Sizing</h3>
|
||||
<p>Instead of applying button sizing classes to every button in a group, just add <code>.btn-group-*</code> to the <code>.btn-group</code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-lg">
|
||||
<button type="button" class="btn btn-default">Left</button>
|
||||
<button type="button" class="btn btn-default">Middle</button>
|
||||
<button type="button" class="btn btn-default">Right</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">Left</button>
|
||||
<button type="button" class="btn btn-default">Middle</button>
|
||||
<button type="button" class="btn btn-default">Right</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button type="button" class="btn btn-default">Left</button>
|
||||
<button type="button" class="btn btn-default">Middle</button>
|
||||
<button type="button" class="btn btn-default">Right</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-xs">
|
||||
<button type="button" class="btn btn-default">Left</button>
|
||||
<button type="button" class="btn btn-default">Middle</button>
|
||||
<button type="button" class="btn btn-default">Right</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="btn-group btn-group-lg">...</div>
|
||||
<div class="btn-group">...</div>
|
||||
@ -274,25 +270,25 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
<div class="btn-group btn-group-xs">...</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="btn-groups-nested">Nesting</h3>
|
||||
<p>Place a <code>.btn-group</code> within another <code>.btn-group</code> when you want dropdown menus mixed with a series of buttons.</p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">1</button>
|
||||
<button type="button" class="btn btn-default">2</button>
|
||||
<h3 id="btn-groups-nested">Nesting</h3>
|
||||
<p>Place a <code>.btn-group</code> within another <code>.btn-group</code> when you want dropdown menus mixed with a series of buttons.</p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">1</button>
|
||||
<button type="button" class="btn btn-default">2</button>
|
||||
|
||||
<div class="btn-group">
|
||||
<button id="btnGroupDrop1" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="btnGroupDrop1">
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button id="btnGroupDrop1" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="btnGroupDrop1">
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">1</button>
|
||||
@ -311,186 +307,184 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="btn-groups-vertical">Vertical variation</h3>
|
||||
<p>Make a set of buttons appear vertically stacked rather than horizontally. <strong class="text-danger">Split button dropdowns are not supported here.</strong></p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-group-vertical">
|
||||
<button type="button" class="btn btn-default">Button</button>
|
||||
<button type="button" class="btn btn-default">Button</button>
|
||||
<div class="btn-group">
|
||||
<button id="btnGroupVerticalDrop1" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="btnGroupVerticalDrop1">
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<button type="button" class="btn btn-default">Button</button>
|
||||
<button type="button" class="btn btn-default">Button</button>
|
||||
<div class="btn-group">
|
||||
<button id="btnGroupVerticalDrop2" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="btnGroupVerticalDrop2">
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button id="btnGroupVerticalDrop3" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="btnGroupVerticalDrop3">
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button id="btnGroupVerticalDrop4" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="btnGroupVerticalDrop4">
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3 id="btn-groups-vertical">Vertical variation</h3>
|
||||
<p>Make a set of buttons appear vertically stacked rather than horizontally. <strong class="text-danger">Split button dropdowns are not supported here.</strong></p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-group-vertical">
|
||||
<button type="button" class="btn btn-default">Button</button>
|
||||
<button type="button" class="btn btn-default">Button</button>
|
||||
<div class="btn-group">
|
||||
<button id="btnGroupVerticalDrop1" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="btnGroupVerticalDrop1">
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<button type="button" class="btn btn-default">Button</button>
|
||||
<button type="button" class="btn btn-default">Button</button>
|
||||
<div class="btn-group">
|
||||
<button id="btnGroupVerticalDrop2" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="btnGroupVerticalDrop2">
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button id="btnGroupVerticalDrop3" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="btnGroupVerticalDrop3">
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button id="btnGroupVerticalDrop4" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="btnGroupVerticalDrop4">
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="btn-group-vertical">
|
||||
...
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="btn-groups-justified">Justified link variation</h3>
|
||||
<p>Make a group of buttons stretch at the same size to span the entire width of its parent. Also works with button dropdowns within the button group.</p>
|
||||
<h3 id="btn-groups-justified">Justified link variation</h3>
|
||||
<p>Make a group of buttons stretch at the same size to span the entire width of its parent. Also works with button dropdowns within the button group.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Handling borders</h4>
|
||||
<p>Due to the specific HTML and CSS used to justify buttons (namely <code>display: table-cell</code>), the borders between them are doubled. In regular button groups, <code>margin-left: -1px</code> is used to stack the borders instead of removing them. However, <code>margin</code> doesn't work with <code>display: table-cell</code>. As a result, depending on your customizations to Bootstrap, you may wish to remove or re-color the borders.</p>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Handling borders</h4>
|
||||
<p>Due to the specific HTML and CSS used to justify buttons (namely <code>display: table-cell</code>), the borders between them are doubled. In regular button groups, <code>margin-left: -1px</code> is used to stack the borders instead of removing them. However, <code>margin</code> doesn't work with <code>display: table-cell</code>. As a result, depending on your customizations to Bootstrap, you may wish to remove or re-color the borders.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Element-specific usage</h4>
|
||||
<p>This only works with <code><a></code> elements as the <code><button></code> doesn't pick up the styles we use to justify content (some <code>display: table-cell;</code>-fu).</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="btn-group btn-group-justified">
|
||||
<a class="btn btn-default" role="button">Left</a>
|
||||
<a class="btn btn-default" role="button">Middle</a>
|
||||
<a class="btn btn-default" role="button">Right</a>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Element-specific usage</h4>
|
||||
<p>This only works with <code><a></code> elements as the <code><button></code> doesn't pick up the styles we use to justify content (some <code>display: table-cell;</code>-fu).</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="btn-group btn-group-justified">
|
||||
<a class="btn btn-default" role="button">Left</a>
|
||||
<a class="btn btn-default" role="button">Middle</a>
|
||||
<a class="btn btn-default" role="button">Right</a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="btn-group btn-group-justified">
|
||||
<a class="btn btn-default" role="button">Left</a>
|
||||
<a class="btn btn-default" role="button">Middle</a>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Dropdown <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="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>
|
||||
<br>
|
||||
<div class="btn-group btn-group-justified">
|
||||
<a class="btn btn-default" role="button">Left</a>
|
||||
<a class="btn btn-default" role="button">Middle</a>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Dropdown <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="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>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="btn-group btn-group-justified">
|
||||
...
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Split button dropdowns
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="btn-dropdowns" class="page-header">Button dropdowns</h1>
|
||||
|
||||
<p class="lead">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="bs-callout bs-callout-danger">
|
||||
<h4>Plugin dependency</h4>
|
||||
<p>Button dropdowns require the <a href="../javascript/#dropdowns">dropdown plugin</a> to be included in your version of Bootstrap.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Split button dropdowns
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="btn-dropdowns">Button dropdowns</h1>
|
||||
</div>
|
||||
<p class="lead">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="bs-callout bs-callout-danger">
|
||||
<h4>Plugin dependency</h4>
|
||||
<p>Button dropdowns require the <a href="../javascript/#dropdowns">dropdown plugin</a> to be included in your version of Bootstrap.</p>
|
||||
</div>
|
||||
|
||||
<h3 id="btn-dropdowns-single">Single button dropdowns</h3>
|
||||
<p>Turn a button into a dropdown toggle with some basic markup changes.</p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Default <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Primary <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown">Success <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">Info <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown">Warning <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown">Danger <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="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>
|
||||
<h3 id="btn-dropdowns-single">Single button dropdowns</h3>
|
||||
<p>Turn a button into a dropdown toggle with some basic markup changes.</p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Default <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Primary <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown">Success <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">Info <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown">Warning <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown">Danger <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="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>
|
||||
{% highlight html %}
|
||||
<!-- Single button -->
|
||||
<div class="btn-group">
|
||||
@ -507,94 +501,94 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="btn-dropdowns-split">Split button dropdowns</h3>
|
||||
<p>Similarly, create split button dropdowns with the same markup changes, only with a separate button.</p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">Default</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-primary">Primary</button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-success">Success</button>
|
||||
<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-info">Info</button>
|
||||
<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-warning">Warning</button>
|
||||
<button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-danger">Danger</button>
|
||||
<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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>
|
||||
<h3 id="btn-dropdowns-split">Split button dropdowns</h3>
|
||||
<p>Similarly, create split button dropdowns with the same markup changes, only with a separate button.</p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">Default</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-primary">Primary</button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-success">Success</button>
|
||||
<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-info">Info</button>
|
||||
<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-warning">Warning</button>
|
||||
<button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-danger">Danger</button>
|
||||
<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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>
|
||||
{% highlight html %}
|
||||
<!-- Split button -->
|
||||
<div class="btn-group">
|
||||
@ -613,52 +607,52 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="btn-dropdowns-sizing">Sizing</h3>
|
||||
<p>Button dropdowns work with buttons of all sizes.</p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-default btn-lg dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
Large button <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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" role="toolbar">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-default btn-sm dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
Small button <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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" role="toolbar">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-default btn-xs dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
Extra small button <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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><!-- /example -->
|
||||
<h3 id="btn-dropdowns-sizing">Sizing</h3>
|
||||
<p>Button dropdowns work with buttons of all sizes.</p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-default btn-lg dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
Large button <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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" role="toolbar">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-default btn-sm dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
Small button <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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" role="toolbar">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-default btn-xs dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
Extra small button <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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><!-- /example -->
|
||||
{% highlight html %}
|
||||
<!-- Large button group -->
|
||||
<div class="btn-group">
|
||||
@ -691,40 +685,40 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="btn-dropdowns-dropup">Dropup variation</h3>
|
||||
<p>Trigger dropdown menus above elements by adding <code>.dropup</code> to the parent.</p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group dropup">
|
||||
<button type="button" class="btn btn-default">Dropup</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-primary">Right dropup</button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" role="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><!-- /example -->
|
||||
<h3 id="btn-dropdowns-dropup">Dropup variation</h3>
|
||||
<p>Trigger dropdown menus above elements by adding <code>.dropup</code> to the parent.</p>
|
||||
<div class="bs-example">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group dropup">
|
||||
<button type="button" class="btn btn-default">Dropup</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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 type="button" class="btn btn-primary">Right dropup</button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" role="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><!-- /example -->
|
||||
{% highlight html %}
|
||||
<div class="btn-group dropup">
|
||||
<button type="button" class="btn btn-default">Dropup</button>
|
||||
@ -737,55 +731,52 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
</ul>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Input groups
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="input-groups" class="page-header">Input groups</h1>
|
||||
|
||||
<p class="lead">Extend form controls by adding text or buttons before, after, or on both sides of any text-based input. Use <code>.input-group</code> with an <code>.input-group-addon</code> to prepend or append elements to a single <code>.form-control</code>.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>Avoid using <code><select></code> elements here as they cannot be fully styled in WebKit browsers.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Tooltips & popovers in input groups require special setting</h4>
|
||||
<p>When using tooltips or popovers on elements within an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip or popover is triggered).</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Don't mix with other components</h4>
|
||||
<p>Do not mix form group or grid column classes directly with input groups.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Input groups
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="input-groups">Input groups</h1>
|
||||
<h2 id="input-groups-basic">Basic example</h2>
|
||||
<p>Place one add-on or button on either side of an input. You may also place one on both sides of an input.</p>
|
||||
<p><strong class="text-danger">We do not support multiple add-ons on a single side.</strong></p>
|
||||
<p><strong class="text-danger">We do not support multiple form-controls in a single input group.</strong></p>
|
||||
<form class="bs-example bs-example-form" role="form">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">@</span>
|
||||
<input type="text" class="form-control" placeholder="Username">
|
||||
</div>
|
||||
<p class="lead">Extend form controls by adding text or buttons before, after, or on both sides of any text-based input. Use <code>.input-group</code> with an <code>.input-group-addon</code> to prepend or append elements to a single <code>.form-control</code>.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>Avoid using <code><select></code> elements here as they cannot be fully styled in WebKit browsers.</p>
|
||||
<br>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control">
|
||||
<span class="input-group-addon">.00</span>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Tooltips & popovers in input groups require special setting</h4>
|
||||
<p>When using tooltips or popovers on elements within an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip or popover is triggered).</p>
|
||||
<br>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">$</span>
|
||||
<input type="text" class="form-control">
|
||||
<span class="input-group-addon">.00</span>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Don't mix with other components</h4>
|
||||
<p>Do not mix form group or grid column classes directly with input groups.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<h2 id="input-groups-basic">Basic example</h2>
|
||||
<p>Place one add-on or button on either side of an input. You may also place one on both sides of an input.</p>
|
||||
<p><strong class="text-danger">We do not support multiple add-ons on a single side.</strong></p>
|
||||
<p><strong class="text-danger">We do not support multiple form-controls in a single input group.</strong></p>
|
||||
<form class="bs-example bs-example-form" role="form">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">@</span>
|
||||
<input type="text" class="form-control" placeholder="Username">
|
||||
</div>
|
||||
<br>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control">
|
||||
<span class="input-group-addon">.00</span>
|
||||
</div>
|
||||
<br>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">$</span>
|
||||
<input type="text" class="form-control">
|
||||
<span class="input-group-addon">.00</span>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
{% highlight html %}
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">@</span>
|
||||
@ -805,24 +796,24 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="input-groups-sizing">Sizing</h2>
|
||||
<p>Add the relative form sizing classes to the <code>.input-group</code> itself and contents within will automatically resize—no need for repeating the form control size classes on each element.</p>
|
||||
<form class="bs-example bs-example-form" role="form">
|
||||
<div class="input-group input-group-lg">
|
||||
<span class="input-group-addon">@</span>
|
||||
<input type="text" class="form-control" placeholder="Username">
|
||||
</div>
|
||||
<br>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">@</span>
|
||||
<input type="text" class="form-control" placeholder="Username">
|
||||
</div>
|
||||
<br>
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-addon">@</span>
|
||||
<input type="text" class="form-control" placeholder="Username">
|
||||
</div>
|
||||
</form>
|
||||
<h2 id="input-groups-sizing">Sizing</h2>
|
||||
<p>Add the relative form sizing classes to the <code>.input-group</code> itself and contents within will automatically resize—no need for repeating the form control size classes on each element.</p>
|
||||
<form class="bs-example bs-example-form" role="form">
|
||||
<div class="input-group input-group-lg">
|
||||
<span class="input-group-addon">@</span>
|
||||
<input type="text" class="form-control" placeholder="Username">
|
||||
</div>
|
||||
<br>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">@</span>
|
||||
<input type="text" class="form-control" placeholder="Username">
|
||||
</div>
|
||||
<br>
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-addon">@</span>
|
||||
<input type="text" class="form-control" placeholder="Username">
|
||||
</div>
|
||||
</form>
|
||||
{% highlight html %}
|
||||
<div class="input-group input-group-lg">
|
||||
<span class="input-group-addon">@</span>
|
||||
@ -841,28 +832,28 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="input-groups-checkboxes-radios">Checkboxes and radio addons</h2>
|
||||
<p>Place any checkbox or radio option within an input group's addon instead of text.</p>
|
||||
<form class="bs-example bs-example-form">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<input type="checkbox">
|
||||
</span>
|
||||
<input type="text" class="form-control">
|
||||
</div><!-- /input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<input type="radio">
|
||||
</span>
|
||||
<input type="text" class="form-control">
|
||||
</div><!-- /input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
</div><!-- /.row -->
|
||||
</form>
|
||||
<h2 id="input-groups-checkboxes-radios">Checkboxes and radio addons</h2>
|
||||
<p>Place any checkbox or radio option within an input group's addon instead of text.</p>
|
||||
<form class="bs-example bs-example-form">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<input type="checkbox">
|
||||
</span>
|
||||
<input type="text" class="form-control">
|
||||
</div><!-- /input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<input type="radio">
|
||||
</span>
|
||||
<input type="text" class="form-control">
|
||||
</div><!-- /input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
</div><!-- /.row -->
|
||||
</form>
|
||||
{% highlight html %}
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
@ -885,28 +876,28 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="input-groups-buttons">Button addons</h2>
|
||||
<p>Buttons in input groups are a bit different and require one extra level of nesting. Instead of <code>.input-group-addon</code>, you'll need to use <code>.input-group-btn</code> to wrap the buttons. This is required due to default browser styles that cannot be overridden.</p>
|
||||
<form class="bs-example bs-example-form">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button">Go!</button>
|
||||
</span>
|
||||
<input type="text" class="form-control">
|
||||
</div><!-- /input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button">Go!</button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
</div><!-- /.row -->
|
||||
</form>
|
||||
<h2 id="input-groups-buttons">Button addons</h2>
|
||||
<p>Buttons in input groups are a bit different and require one extra level of nesting. Instead of <code>.input-group-addon</code>, you'll need to use <code>.input-group-btn</code> to wrap the buttons. This is required due to default browser styles that cannot be overridden.</p>
|
||||
<form class="bs-example bs-example-form">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button">Go!</button>
|
||||
</span>
|
||||
<input type="text" class="form-control">
|
||||
</div><!-- /input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button">Go!</button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
</div><!-- /.row -->
|
||||
</form>
|
||||
{% highlight html %}
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
@ -928,42 +919,42 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
</div><!-- /.row -->
|
||||
{% endhighlight %}
|
||||
|
||||
<h2 id="input-groups-buttons-dropdowns">Buttons with dropdowns</h2>
|
||||
<p></p>
|
||||
<form class="bs-example bs-example-form" role="form">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="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 -->
|
||||
<input type="text" class="form-control">
|
||||
</div><!-- /input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right" role="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><!-- /input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
</div><!-- /.row -->
|
||||
</form>
|
||||
<h2 id="input-groups-buttons-dropdowns">Buttons with dropdowns</h2>
|
||||
<p></p>
|
||||
<form class="bs-example bs-example-form" role="form">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="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 -->
|
||||
<input type="text" class="form-control">
|
||||
</div><!-- /input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right" role="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><!-- /input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
</div><!-- /.row -->
|
||||
</form>
|
||||
{% highlight html %}
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
@ -999,49 +990,49 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
</div><!-- /.row -->
|
||||
{% endhighlight %}
|
||||
|
||||
<h2 id="input-groups-buttons-segmented">Segmented buttons</h2>
|
||||
<form class="bs-example bs-example-form" role="form">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default" tabindex="-1">Action</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" tabindex="-1">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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>
|
||||
<input type="text" class="form-control">
|
||||
</div><!-- /.input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default" tabindex="-1">Action</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" tabindex="-1">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" role="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>
|
||||
</div><!-- /.input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
</div><!-- /.row -->
|
||||
</form>
|
||||
<h2 id="input-groups-buttons-segmented">Segmented buttons</h2>
|
||||
<form class="bs-example bs-example-form" role="form">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default" tabindex="-1">Action</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" tabindex="-1">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="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>
|
||||
<input type="text" class="form-control">
|
||||
</div><!-- /.input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default" tabindex="-1">Action</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" tabindex="-1">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" role="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>
|
||||
</div><!-- /.input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
</div><!-- /.row -->
|
||||
</form>
|
||||
{% highlight html %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
@ -1057,29 +1048,26 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Navs
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="nav">Navs</h1>
|
||||
</div>
|
||||
<!-- Navs
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="nav" class="page-header">Navs</h1>
|
||||
|
||||
<p class="lead">Navs available in Bootstrap have shared markup, starting with the base <code>.nav</code> class, as well as shared states. Swap modifier classes to switch between each style.</p>
|
||||
<p class="lead">Navs available in Bootstrap have shared markup, starting with the base <code>.nav</code> class, as well as shared states. Swap modifier classes to switch between each style.</p>
|
||||
|
||||
<h2 id="nav-tabs">Tabs</h2>
|
||||
<p>Note the <code>.nav-tabs</code> class requires the <code>.nav</code> base class.</p>
|
||||
<div class="bs-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>
|
||||
<h2 id="nav-tabs">Tabs</h2>
|
||||
<p>Note the <code>.nav-tabs</code> class requires the <code>.nav</code> base class.</p>
|
||||
<div class="bs-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>
|
||||
{% highlight html %}
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
@ -1087,20 +1075,20 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
<li><a href="#">Messages</a></li>
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Requires JavaScript tabs plugin</h4>
|
||||
<p>For tabs with tabbable areas, you must use the <a href="../javascript/#tabs">tabs JavaScript plugin</a>.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Requires JavaScript tabs plugin</h4>
|
||||
<p>For tabs with tabbable areas, you must use the <a href="../javascript/#tabs">tabs JavaScript plugin</a>.</p>
|
||||
</div>
|
||||
|
||||
<h2 id="nav-pills">Pills</h2>
|
||||
<p>Take that same HTML, but use <code>.nav-pills</code> instead:</p>
|
||||
<div class="bs-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>
|
||||
<h2 id="nav-pills">Pills</h2>
|
||||
<p>Take that same HTML, but use <code>.nav-pills</code> instead:</p>
|
||||
<div class="bs-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>
|
||||
{% highlight html %}
|
||||
<ul class="nav nav-pills">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
@ -1108,14 +1096,14 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
<li><a href="#">Messages</a></li>
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
<p>Pills are also vertically stackable. Just add <code>.nav-stacked</code>.</p>
|
||||
<div class="bs-example">
|
||||
<ul class="nav nav-pills nav-stacked" style="max-width: 300px;">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Messages</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>Pills are also vertically stackable. Just add <code>.nav-stacked</code>.</p>
|
||||
<div class="bs-example">
|
||||
<ul class="nav nav-pills nav-stacked" style="max-width: 300px;">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Messages</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
...
|
||||
@ -1123,25 +1111,25 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="nav-justified">Justified</h2>
|
||||
<p>Easily make tabs or pills equal widths of their parent at screens wider than 768px with <code>.nav-justified</code>. On smaller screens, the nav links are stacked.</p>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Safari and responsive justified navs</h4>
|
||||
<p>Safari exhibits a bug in which resizing your browser horizontally causes rendering errors in the justified nav that are cleared upon refreshing. This bug is also shown in the <a href="../examples/justified-nav/">justified nav example</a>.</p>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<ul class="nav nav-tabs nav-justified">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Messages</a></li>
|
||||
</ul>
|
||||
<br>
|
||||
<ul class="nav nav-pills nav-justified">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Messages</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<h2 id="nav-justified">Justified</h2>
|
||||
<p>Easily make tabs or pills equal widths of their parent at screens wider than 768px with <code>.nav-justified</code>. On smaller screens, the nav links are stacked.</p>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Safari and responsive justified navs</h4>
|
||||
<p>Safari exhibits a bug in which resizing your browser horizontally causes rendering errors in the justified nav that are cleared upon refreshing. This bug is also shown in the <a href="../examples/justified-nav/">justified nav example</a>.</p>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<ul class="nav nav-tabs nav-justified">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Messages</a></li>
|
||||
</ul>
|
||||
<br>
|
||||
<ul class="nav nav-pills nav-justified">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Messages</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ul class="nav nav-tabs nav-justified">
|
||||
...
|
||||
@ -1152,21 +1140,21 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="nav-disabled-links">Disabled links</h2>
|
||||
<p>For any nav component (tabs, pills, or list), add <code>.disabled</code> for <strong>gray links and no hover effects</strong>.</p>
|
||||
<h2 id="nav-disabled-links">Disabled links</h2>
|
||||
<p>For any nav component (tabs, pills, or list), add <code>.disabled</code> for <strong>gray links and no hover effects</strong>.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Link functionality not impacted</h4>
|
||||
<p>This class will only change the <code><a></code>'s appearance, not its functionality. Use custom JavaScript to disable links here.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Link functionality not impacted</h4>
|
||||
<p>This class will only change the <code><a></code>'s appearance, not its functionality. Use custom JavaScript to disable links here.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-example">
|
||||
<ul class="nav nav-pills">
|
||||
<li><a href="#">Clickable link</a></li>
|
||||
<li><a href="#">Clickable link</a></li>
|
||||
<li class="disabled"><a href="#">Disabled link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<ul class="nav nav-pills">
|
||||
<li><a href="#">Clickable link</a></li>
|
||||
<li><a href="#">Clickable link</a></li>
|
||||
<li class="disabled"><a href="#">Disabled link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ul class="nav nav-pills">
|
||||
...
|
||||
@ -1176,28 +1164,28 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="nav-dropdowns">Using dropdowns</h2>
|
||||
<p>Add dropdown menus with a little extra HTML and the <a href="../javascript/#dropdowns">dropdowns JavaScript plugin</a>.</p>
|
||||
<h2 id="nav-dropdowns">Using dropdowns</h2>
|
||||
<p>Add dropdown menus with a little extra HTML and the <a href="../javascript/#dropdowns">dropdowns JavaScript plugin</a>.</p>
|
||||
|
||||
<h3>Tabs with dropdowns</h3>
|
||||
<div class="bs-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 <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="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>
|
||||
<h3>Tabs with dropdowns</h3>
|
||||
<div class="bs-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 <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="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>
|
||||
{% highlight html %}
|
||||
<ul class="nav nav-tabs">
|
||||
...
|
||||
@ -1213,25 +1201,25 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>Pills with dropdowns</h3>
|
||||
<div class="bs-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 <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="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><!-- /example -->
|
||||
<h3>Pills with dropdowns</h3>
|
||||
<div class="bs-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 <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="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><!-- /example -->
|
||||
{% highlight html %}
|
||||
<ul class="nav nav-pills">
|
||||
...
|
||||
@ -1246,85 +1234,82 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
...
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Navbar
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="navbar" class="page-header">Navbar</h1>
|
||||
|
||||
<h2 id="navbar-default">Default navbar</h2>
|
||||
<p>Navbars are responsive meta components that serve as navigation headers for your application or site. They begin collapsed (and are toggleable) in mobile views and become horizontal as the available viewport width increases.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Customize the collapsing point</h4>
|
||||
<p>Depending on the content in your navbar, you might need to change the point at which your navbar switches between collapsed and horizontal mode. Customize the <code>@grid-float-breakpoint</code> variable or add your own media query.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Requires JavaScript</h4>
|
||||
<p>If JavaScript is disabled and the viewport is narrow enough that the navbar collapses, it will be impossible to expand the navbar and view the content within the <code>.navbar-collapse</code>.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-example">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Navbar
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="navbar">Navbar</h1>
|
||||
</div>
|
||||
|
||||
<h2 id="navbar-default">Default navbar</h2>
|
||||
<p>Navbars are responsive meta components that serve as navigation headers for your application or site. They begin collapsed (and are toggleable) in mobile views and become horizontal as the available viewport width increases.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Customize the collapsing point</h4>
|
||||
<p>Depending on the content in your navbar, you might need to change the point at which your navbar switches between collapsed and horizontal mode. Customize the <code>@grid-float-breakpoint</code> variable or add your own media query.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Requires JavaScript</h4>
|
||||
<p>If JavaScript is disabled and the viewport is narrow enough that the navbar collapses, it will be impossible to expand the navbar and view the content within the <code>.navbar-collapse</code>.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-example">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><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" role="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>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">One more separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-left" role="search">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" placeholder="Search">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default">Submit</button>
|
||||
</form>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<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" role="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><!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>
|
||||
</div>
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><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" role="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>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">One more separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-left" role="search">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" placeholder="Search">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default">Submit</button>
|
||||
</form>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<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" role="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><!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
@ -1381,43 +1366,43 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
</nav>
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Plugin dependency</h4>
|
||||
<p>The responsive navbar requires the <a href="../javascript/#collapse">collapse plugin</a> to be included in your version of Bootstrap.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Plugin dependency</h4>
|
||||
<p>The responsive navbar requires the <a href="../javascript/#collapse">collapse plugin</a> to be included in your version of Bootstrap.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Make navbars accessible</h4>
|
||||
<p>Be sure to add a <code>role="navigation"</code> to every navbar to help with accessibility.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Make navbars accessible</h4>
|
||||
<p>Be sure to add a <code>role="navigation"</code> to every navbar to help with accessibility.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<h2 id="navbar-forms">Forms</h2>
|
||||
<p>Place form content within <code>.navbar-form</code> for proper vertical alignment and collapsed behavior in narrow viewports. Use the alignment options to decide where it resides within the navbar content.</p>
|
||||
<p>As a heads up, <code>.navbar-form</code> shares much of its code with <code>.form-inline</code> via mixin. <strong class="text-danger">Some form controls, like input groups, may require fixed widths to be show up properly within a navbar.</strong></p>
|
||||
<div class="bs-example">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-2">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-2">
|
||||
<form class="navbar-form navbar-left" role="search">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" placeholder="Search">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
<h2 id="navbar-forms">Forms</h2>
|
||||
<p>Place form content within <code>.navbar-form</code> for proper vertical alignment and collapsed behavior in narrow viewports. Use the alignment options to decide where it resides within the navbar content.</p>
|
||||
<p>As a heads up, <code>.navbar-form</code> shares much of its code with <code>.form-inline</code> via mixin. <strong class="text-danger">Some form controls, like input groups, may require fixed widths to be show up properly within a navbar.</strong></p>
|
||||
<div class="bs-example">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-2">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-2">
|
||||
<form class="navbar-form navbar-left" role="search">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" placeholder="Search">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<form class="navbar-form navbar-left" role="search">
|
||||
<div class="form-group">
|
||||
@ -1427,127 +1412,127 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
</form>
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Mobile device caveats</h4>
|
||||
<p>There are some caveats regarding using form controls within fixed elements on mobile devices. <a href="../getting-started/#support-fixed-position-keyboards">See our browser support docs</a> for details.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Mobile device caveats</h4>
|
||||
<p>There are some caveats regarding using form controls within fixed elements on mobile devices. <a href="../getting-started/#support-fixed-position-keyboards">See our browser support docs</a> for details.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Always add labels</h4>
|
||||
<p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline navbar forms, you can hide the labels using the <code>.sr-only</code> class.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Always add labels</h4>
|
||||
<p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline navbar forms, you can hide the labels using the <code>.sr-only</code> class.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<h2 id="navbar-buttons">Buttons</h2>
|
||||
<p>Add the <code>.navbar-btn</code> class to <code><button></code> elements not residing in a <code><form></code> to vertically center them in the navbar.</p>
|
||||
<div class="bs-example">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-3">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-3">
|
||||
<button type="button" class="btn btn-default navbar-btn">Sign in</button>
|
||||
</div>
|
||||
<h2 id="navbar-buttons">Buttons</h2>
|
||||
<p>Add the <code>.navbar-btn</code> class to <code><button></code> elements not residing in a <code><form></code> to vertically center them in the navbar.</p>
|
||||
<div class="bs-example">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-3">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-3">
|
||||
<button type="button" class="btn btn-default navbar-btn">Sign in</button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<button type="button" class="btn btn-default navbar-btn">Sign in</button>
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Context-specific usage</h4>
|
||||
<p>Like the standard <a href="../css/#buttons">button classes</a>, <code>.navbar-btn</code> can be used on <code><a></code> and <code><input></code> elements. However, neither <code>.navbar-btn</code> nor the standard button classes should be used on <code><a></code> elements within <code>.navbar-nav</code>.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Context-specific usage</h4>
|
||||
<p>Like the standard <a href="../css/#buttons">button classes</a>, <code>.navbar-btn</code> can be used on <code><a></code> and <code><input></code> elements. However, neither <code>.navbar-btn</code> nor the standard button classes should be used on <code><a></code> elements within <code>.navbar-nav</code>.</p>
|
||||
</div>
|
||||
|
||||
<h2 id="navbar-text">Text</h2>
|
||||
<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>
|
||||
<div class="bs-example">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-4">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-4">
|
||||
<p class="navbar-text">Signed in as Mark Otto</p>
|
||||
</div>
|
||||
<h2 id="navbar-text">Text</h2>
|
||||
<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>
|
||||
<div class="bs-example">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-4">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-4">
|
||||
<p class="navbar-text">Signed in as Mark Otto</p>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<p class="navbar-text">Signed in as Mark Otto</p>
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="navbar-links">Non-nav links</h2>
|
||||
<p>For folks using standard links that are not within the regular navbar navigation component, use the <code>.navbar-link</code> class to add the proper colors for the default and inverse navbar options.</p>
|
||||
<div class="bs-example">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-5">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-5">
|
||||
<p class="navbar-text navbar-right">Signed in as <a href="#" class="navbar-link">Mark Otto</a></p>
|
||||
</div>
|
||||
<h2 id="navbar-links">Non-nav links</h2>
|
||||
<p>For folks using standard links that are not within the regular navbar navigation component, use the <code>.navbar-link</code> class to add the proper colors for the default and inverse navbar options.</p>
|
||||
<div class="bs-example">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-5">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-5">
|
||||
<p class="navbar-text navbar-right">Signed in as <a href="#" class="navbar-link">Mark Otto</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<p class="navbar-text navbar-right">Signed in as <a href="#" class="navbar-link">Mark Otto</a></p>
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="navbar-component-alignment">Component alignment</h2>
|
||||
<p>Align nav links, forms, buttons, or text, using the <code>.navbar-left</code> or <code>.navbar-right</code> utility classes. Both classes will add a CSS float in the specified direction. For example, to align nav links, put them in a separate <code><ul></code> with the respective utility class applied.</p>
|
||||
<p>These classes are mixin-ed versions of <code>.pull-left</code> and <code>.pull-right</code>, but they're scoped to media queries for easier handling of navbar components across device sizes.</p>
|
||||
<h2 id="navbar-component-alignment">Component alignment</h2>
|
||||
<p>Align nav links, forms, buttons, or text, using the <code>.navbar-left</code> or <code>.navbar-right</code> utility classes. Both classes will add a CSS float in the specified direction. For example, to align nav links, put them in a separate <code><ul></code> with the respective utility class applied.</p>
|
||||
<p>These classes are mixin-ed versions of <code>.pull-left</code> and <code>.pull-right</code>, but they're scoped to media queries for easier handling of navbar components across device sizes.</p>
|
||||
|
||||
|
||||
<h2 id="navbar-fixed-top">Fixed to top</h2>
|
||||
<p>Add <code>.navbar-fixed-top</code> and include a <code>.container</code> or <code>.container-fluid</code> to center and pad navbar content.</p>
|
||||
<div class="bs-example bs-navbar-top-example">
|
||||
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<!-- We use the fluid option here to avoid overriding the fixed width of a normal container within the narrow content columns. -->
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-6">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-6">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
<h2 id="navbar-fixed-top">Fixed to top</h2>
|
||||
<p>Add <code>.navbar-fixed-top</code> and include a <code>.container</code> or <code>.container-fluid</code> to center and pad navbar content.</p>
|
||||
<div class="bs-example bs-navbar-top-example">
|
||||
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<!-- We use the fluid option here to avoid overriding the fixed width of a normal container within the narrow content columns. -->
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-6">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div><!-- /example -->
|
||||
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-6">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div>
|
||||
</nav>
|
||||
</div><!-- /example -->
|
||||
{% highlight html %}
|
||||
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
@ -1556,42 +1541,42 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
|
||||
</nav>
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Body padding required</h4>
|
||||
<p>The fixed navbar will overlay your other content, unless you add <code>padding</code> to the top of the <code><body></code>. Try out your own values or use our snippet below. Tip: By default, the navbar is 50px high.</p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Body padding required</h4>
|
||||
<p>The fixed navbar will overlay your other content, unless you add <code>padding</code> to the top of the <code><body></code>. Try out your own values or use our snippet below. Tip: By default, the navbar is 50px high.</p>
|
||||
{% highlight css %}
|
||||
body { padding-top: 70px; }
|
||||
{% endhighlight %}
|
||||
<p>Make sure to include this <strong>after</strong> the core Bootstrap CSS.</p>
|
||||
</div>
|
||||
<p>Make sure to include this <strong>after</strong> the core Bootstrap CSS.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<h2 id="navbar-fixed-bottom">Fixed to bottom</h2>
|
||||
<p>Add <code>.navbar-fixed-bottom</code> and include a <code>.container</code> or <code>.container-fluid</code> to center and pad navbar content.</p>
|
||||
<div class="bs-example bs-navbar-bottom-example">
|
||||
<nav class="navbar navbar-default navbar-fixed-bottom" role="navigation">
|
||||
<!-- We use the fluid option here to avoid overriding the fixed width of a normal container within the narrow content columns. -->
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-7">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-7">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
<h2 id="navbar-fixed-bottom">Fixed to bottom</h2>
|
||||
<p>Add <code>.navbar-fixed-bottom</code> and include a <code>.container</code> or <code>.container-fluid</code> to center and pad navbar content.</p>
|
||||
<div class="bs-example bs-navbar-bottom-example">
|
||||
<nav class="navbar navbar-default navbar-fixed-bottom" role="navigation">
|
||||
<!-- We use the fluid option here to avoid overriding the fixed width of a normal container within the narrow content columns. -->
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-7">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div><!-- /example -->
|
||||
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-7">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div>
|
||||
</nav>
|
||||
</div><!-- /example -->
|
||||
{% highlight html %}
|
||||
<nav class="navbar navbar-default navbar-fixed-bottom" role="navigation">
|
||||
<div class="container">
|
||||
@ -1600,44 +1585,44 @@ body { padding-top: 70px; }
|
||||
</nav>
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Body padding required</h4>
|
||||
<p>The fixed navbar will overlay your other content, unless you add <code>padding</code> to the bottom of the <code><body></code>. Try out your own values or use our snippet below. Tip: By default, the navbar is 50px high.</p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Body padding required</h4>
|
||||
<p>The fixed navbar will overlay your other content, unless you add <code>padding</code> to the bottom of the <code><body></code>. Try out your own values or use our snippet below. Tip: By default, the navbar is 50px high.</p>
|
||||
{% highlight css %}
|
||||
body { padding-bottom: 70px; }
|
||||
{% endhighlight %}
|
||||
<p>Make sure to include this <strong>after</strong> the core Bootstrap CSS.</p>
|
||||
</div>
|
||||
<p>Make sure to include this <strong>after</strong> the core Bootstrap CSS.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<h2 id="navbar-static-top">Static top</h2>
|
||||
<p>Create a full-width navbar that scrolls away with the page by adding <code>.navbar-static-top</code> and include a <code>.container</code> or <code>.container-fluid</code> to center and pad navbar content.</p>
|
||||
<p>Unlike the <code>.navbar-fixed-*</code> classes, you do not need to change any padding on the <code>body</code>.</p>
|
||||
<div class="bs-example bs-navbar-top-example">
|
||||
<nav class="navbar navbar-default navbar-static-top" role="navigation">
|
||||
<!-- We use the fluid option here to avoid overriding the fixed width of a normal container within the narrow content columns. -->
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-8">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-8">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
<h2 id="navbar-static-top">Static top</h2>
|
||||
<p>Create a full-width navbar that scrolls away with the page by adding <code>.navbar-static-top</code> and include a <code>.container</code> or <code>.container-fluid</code> to center and pad navbar content.</p>
|
||||
<p>Unlike the <code>.navbar-fixed-*</code> classes, you do not need to change any padding on the <code>body</code>.</p>
|
||||
<div class="bs-example bs-navbar-top-example">
|
||||
<nav class="navbar navbar-default navbar-static-top" role="navigation">
|
||||
<!-- We use the fluid option here to avoid overriding the fixed width of a normal container within the narrow content columns. -->
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-8">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div><!-- /example -->
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-8">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div>
|
||||
</nav>
|
||||
</div><!-- /example -->
|
||||
{% highlight html %}
|
||||
<nav class="navbar navbar-default navbar-static-top" role="navigation">
|
||||
<div class="container">
|
||||
@ -1647,65 +1632,63 @@ body { padding-bottom: 70px; }
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="navbar-inverted">Inverted navbar</h2>
|
||||
<p>Modify the look of the navbar by adding <code>.navbar-inverse</code>.</p>
|
||||
<div class="bs-example">
|
||||
<nav class="navbar navbar-inverse" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-9">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
<h2 id="navbar-inverted">Inverted navbar</h2>
|
||||
<p>Modify the look of the navbar by adding <code>.navbar-inverse</code>.</p>
|
||||
<div class="bs-example">
|
||||
<nav class="navbar navbar-inverse" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-9">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-9">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>
|
||||
</div><!-- /example -->
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-9">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>
|
||||
</div><!-- /example -->
|
||||
{% highlight html %}
|
||||
<nav class="navbar navbar-inverse" role="navigation">
|
||||
...
|
||||
</nav>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Breadcrumbs
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="breadcrumbs" class="page-header">Breadcrumbs</h1>
|
||||
|
||||
<p class="lead">Indicate the current page's location within a navigational hierarchy.</p>
|
||||
<p>Separators are automatically added in CSS through <code>:before</code> and <code>content</code>.</p>
|
||||
<div class="bs-example">
|
||||
<ol class="breadcrumb">
|
||||
<li class="active">Home</li>
|
||||
</ol>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#">Home</a></li>
|
||||
<li class="active">Library</li>
|
||||
</ol>
|
||||
<ol class="breadcrumb" style="margin-bottom: 5px;">
|
||||
<li><a href="#">Home</a></li>
|
||||
<li><a href="#">Library</a></li>
|
||||
<li class="active">Data</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Breadcrumbs
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="breadcrumbs">Breadcrumbs <small></small></h1>
|
||||
</div>
|
||||
<p class="lead">Indicate the current page's location within a navigational hierarchy.</p>
|
||||
<p>Separators are automatically added in CSS through <code>:before</code> and <code>content</code>.</p>
|
||||
<div class="bs-example">
|
||||
<ol class="breadcrumb">
|
||||
<li class="active">Home</li>
|
||||
</ol>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#">Home</a></li>
|
||||
<li class="active">Library</li>
|
||||
</ol>
|
||||
<ol class="breadcrumb" style="margin-bottom: 5px;">
|
||||
<li><a href="#">Home</a></li>
|
||||
<li><a href="#">Library</a></li>
|
||||
<li class="active">Data</li>
|
||||
</ol>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#">Home</a></li>
|
||||
@ -1713,31 +1696,30 @@ body { padding-bottom: 70px; }
|
||||
<li class="active">Data</li>
|
||||
</ol>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Pagination
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="pagination" class="page-header">Pagination</h1>
|
||||
|
||||
<p class="lead">Provide pagination links for your site or app with the multi-page pagination component, or the simpler <a href="#pagination-pager">pager alternative</a>.</p>
|
||||
|
||||
<h2 id="pagination-default">Default 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-example">
|
||||
<ul class="pagination">
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
<!-- Pagination
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="pagination">Pagination</h1>
|
||||
</div>
|
||||
<p class="lead">Provide pagination links for your site or app with the multi-page pagination component, or the simpler <a href="#pagination-pager">pager alternative</a>.</p>
|
||||
|
||||
<h2 id="pagination-default">Default 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-example">
|
||||
<ul class="pagination">
|
||||
<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>
|
||||
{% highlight html %}
|
||||
<ul class="pagination">
|
||||
<li><a href="#">«</a></li>
|
||||
@ -1750,19 +1732,19 @@ body { padding-bottom: 70px; }
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
|
||||
<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-example">
|
||||
<ul class="pagination">
|
||||
<li class="disabled"><a href="#">«</a></li>
|
||||
<li class="active"><a href="#">1 <span class="sr-only">(current)</span></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>
|
||||
<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-example">
|
||||
<ul class="pagination">
|
||||
<li class="disabled"><a href="#">«</a></li>
|
||||
<li class="active"><a href="#">1 <span class="sr-only">(current)</span></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>
|
||||
{% highlight html %}
|
||||
<ul class="pagination">
|
||||
<li class="disabled"><a href="#">«</a></li>
|
||||
@ -1770,7 +1752,7 @@ body { padding-bottom: 70px; }
|
||||
...
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
<p>You can optionally swap out active or disabled anchors for <code><span></code> to remove click functionality while retaining intended styles.</p>
|
||||
<p>You can optionally swap out active or disabled anchors for <code><span></code> to remove click functionality while retaining intended styles.</p>
|
||||
{% highlight html %}
|
||||
<ul class="pagination">
|
||||
<li class="disabled"><span>«</span></li>
|
||||
@ -1780,43 +1762,43 @@ body { padding-bottom: 70px; }
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h3>Sizing</h3>
|
||||
<p>Fancy larger or smaller pagination? Add <code>.pagination-lg</code> or <code>.pagination-sm</code> for additional sizes.</p>
|
||||
<div class="bs-example">
|
||||
<div>
|
||||
<ul class="pagination pagination-lg">
|
||||
<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>
|
||||
<ul class="pagination">
|
||||
<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>
|
||||
<ul class="pagination pagination-sm">
|
||||
<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>
|
||||
<h3>Sizing</h3>
|
||||
<p>Fancy larger or smaller pagination? Add <code>.pagination-lg</code> or <code>.pagination-sm</code> for additional sizes.</p>
|
||||
<div class="bs-example">
|
||||
<div>
|
||||
<ul class="pagination pagination-lg">
|
||||
<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>
|
||||
<ul class="pagination">
|
||||
<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>
|
||||
<ul class="pagination pagination-sm">
|
||||
<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>
|
||||
{% highlight html %}
|
||||
<ul class="pagination pagination-lg">...</ul>
|
||||
<ul class="pagination">...</ul>
|
||||
@ -1824,17 +1806,17 @@ body { padding-bottom: 70px; }
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="pagination-pager">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>
|
||||
<h2 id="pagination-pager">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>
|
||||
<div class="bs-example">
|
||||
<ul class="pager">
|
||||
<li><a href="#">Previous</a></li>
|
||||
<li><a href="#">Next</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3>Default example</h3>
|
||||
<p>By default, the pager centers links.</p>
|
||||
<div class="bs-example">
|
||||
<ul class="pager">
|
||||
<li><a href="#">Previous</a></li>
|
||||
<li><a href="#">Next</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ul class="pager">
|
||||
<li><a href="#">Previous</a></li>
|
||||
@ -1842,14 +1824,14 @@ body { padding-bottom: 70px; }
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>Aligned links</h3>
|
||||
<p>Alternatively, you can align each link to the sides:</p>
|
||||
<div class="bs-example">
|
||||
<ul class="pager">
|
||||
<li class="previous"><a href="#">← Older</a></li>
|
||||
<li class="next"><a href="#">Newer →</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3>Aligned links</h3>
|
||||
<p>Alternatively, you can align each link to the sides:</p>
|
||||
<div class="bs-example">
|
||||
<ul class="pager">
|
||||
<li class="previous"><a href="#">← Older</a></li>
|
||||
<li class="next"><a href="#">Newer →</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ul class="pager">
|
||||
<li class="previous"><a href="#">← Older</a></li>
|
||||
@ -1858,55 +1840,52 @@ body { padding-bottom: 70px; }
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h3>Optional disabled state</h3>
|
||||
<p>Pager links also use the general <code>.disabled</code> utility class from the pagination.</p>
|
||||
<div class="bs-example">
|
||||
<ul class="pager">
|
||||
<li class="previous disabled"><a href="#">← Older</a></li>
|
||||
<li class="next"><a href="#">Newer →</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3>Optional disabled state</h3>
|
||||
<p>Pager links also use the general <code>.disabled</code> utility class from the pagination.</p>
|
||||
<div class="bs-example">
|
||||
<ul class="pager">
|
||||
<li class="previous disabled"><a href="#">← Older</a></li>
|
||||
<li class="next"><a href="#">Newer →</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ul class="pager">
|
||||
<li class="previous disabled"><a href="#">← Older</a></li>
|
||||
<li class="next"><a href="#">Newer →</a></li>
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Labels
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="labels" class="page-header">Labels</h1>
|
||||
|
||||
<h3>Example</h3>
|
||||
<div class="bs-example">
|
||||
<h1>Example heading <span class="label label-default">New</span></h1>
|
||||
<h2>Example heading <span class="label label-default">New</span></h2>
|
||||
<h3>Example heading <span class="label label-default">New</span></h3>
|
||||
<h4>Example heading <span class="label label-default">New</span></h4>
|
||||
<h5>Example heading <span class="label label-default">New</span></h5>
|
||||
<h6>Example heading <span class="label label-default">New</span></h6>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Labels
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="labels">Labels</h1>
|
||||
</div>
|
||||
<p class="lead"></p>
|
||||
|
||||
<h3>Example</h3>
|
||||
<div class="bs-example">
|
||||
<h1>Example heading <span class="label label-default">New</span></h1>
|
||||
<h2>Example heading <span class="label label-default">New</span></h2>
|
||||
<h3>Example heading <span class="label label-default">New</span></h3>
|
||||
<h4>Example heading <span class="label label-default">New</span></h4>
|
||||
<h5>Example heading <span class="label label-default">New</span></h5>
|
||||
<h6>Example heading <span class="label label-default">New</span></h6>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<h3>Example heading <span class="label label-default">New</span></h3>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>Available variations</h3>
|
||||
<p>Add any of the below mentioned modifier classes to change the appearance of a label.</p>
|
||||
<div class="bs-example">
|
||||
<span class="label label-default">Default</span>
|
||||
<span class="label label-primary">Primary</span>
|
||||
<span class="label label-success">Success</span>
|
||||
<span class="label label-info">Info</span>
|
||||
<span class="label label-warning">Warning</span>
|
||||
<span class="label label-danger">Danger</span>
|
||||
</div>
|
||||
<h3>Available variations</h3>
|
||||
<p>Add any of the below mentioned modifier classes to change the appearance of a label.</p>
|
||||
<div class="bs-example">
|
||||
<span class="label label-default">Default</span>
|
||||
<span class="label label-primary">Primary</span>
|
||||
<span class="label label-success">Success</span>
|
||||
<span class="label label-info">Info</span>
|
||||
<span class="label label-warning">Warning</span>
|
||||
<span class="label label-danger">Danger</span>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<span class="label label-default">Default</span>
|
||||
<span class="label label-primary">Primary</span>
|
||||
@ -1915,63 +1894,61 @@ body { padding-bottom: 70px; }
|
||||
<span class="label label-warning">Warning</span>
|
||||
<span class="label label-danger">Danger</span>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Badges
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="badges" class="page-header">Badges</h1>
|
||||
|
||||
<p class="lead">Easily highlight new or unread items by adding a <code><span class="badge"></code> to links, Bootstrap navs, and more.</p>
|
||||
|
||||
<div class="bs-example">
|
||||
<a href="#">Inbox <span class="badge">42</span></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Badges
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="badges">Badges</h1>
|
||||
</div>
|
||||
<p class="lead">Easily highlight new or unread items by adding a <code><span class="badge"></code> to links, Bootstrap navs, and more.</p>
|
||||
|
||||
<div class="bs-example">
|
||||
<a href="#">Inbox <span class="badge">42</span></a>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<a href="#">Inbox <span class="badge">42</span></a>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Self collapsing</h4>
|
||||
<p>When there are no new or unread items, badges will simply collapse (via CSS's <code>:empty</code> selector) provided no content exists within.</p>
|
||||
<h4>Self collapsing</h4>
|
||||
<p>When there are no new or unread items, badges will simply collapse (via CSS's <code>:empty</code> selector) provided no content exists within.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>Badges won't self collapse in Internet Explorer 8 because it lacks support for the <code>:empty</code> selector.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>Badges won't self collapse in Internet Explorer 8 because it lacks support for the <code>:empty</code> selector.</p>
|
||||
</div>
|
||||
|
||||
<h4>Adapts to active nav states</h4>
|
||||
<p>Built-in styles are included for placing badges in active states in pill and list navigations.</p>
|
||||
<div class="bs-example">
|
||||
<ul class="nav nav-pills">
|
||||
<li class="active"><a href="#">Home <span class="badge">42</span></a></li>
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Messages <span class="badge">3</span></a></li>
|
||||
</ul>
|
||||
<br>
|
||||
<ul class="nav nav-pills nav-stacked" style="max-width: 260px;">
|
||||
<li class="active">
|
||||
<a href="#">
|
||||
<span class="badge pull-right">42</span>
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<span class="badge pull-right">3</span>
|
||||
Messages
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<button class="btn btn-primary" type="button">
|
||||
Messages <span class="badge">4</span>
|
||||
</button>
|
||||
</div>
|
||||
<h4>Adapts to active nav states</h4>
|
||||
<p>Built-in styles are included for placing badges in active states in pill and list navigations.</p>
|
||||
<div class="bs-example">
|
||||
<ul class="nav nav-pills">
|
||||
<li class="active"><a href="#">Home <span class="badge">42</span></a></li>
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Messages <span class="badge">3</span></a></li>
|
||||
</ul>
|
||||
<br>
|
||||
<ul class="nav nav-pills nav-stacked" style="max-width: 260px;">
|
||||
<li class="active">
|
||||
<a href="#">
|
||||
<span class="badge pull-right">42</span>
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<span class="badge pull-right">3</span>
|
||||
Messages
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<button class="btn btn-primary" type="button">
|
||||
Messages <span class="badge">4</span>
|
||||
</button>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li class="active">
|
||||
@ -1983,24 +1960,23 @@ body { padding-bottom: 70px; }
|
||||
...
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Jumbotron
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="jumbotron" class="page-header">Jumbotron</h1>
|
||||
|
||||
<p>A lightweight, flexible component that can optionally extend the entire viewport to showcase key content on your site.</p>
|
||||
<div class="bs-example">
|
||||
<div class="jumbotron">
|
||||
<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-lg" role="button">Learn more</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Jumbotron
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="jumbotron">Jumbotron</h1>
|
||||
</div>
|
||||
<p>A lightweight, flexible component that can optionally extend the entire viewport to showcase key content on your site.</p>
|
||||
<div class="bs-example">
|
||||
<div class="jumbotron">
|
||||
<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-lg" role="button">Learn more</a></p>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="jumbotron">
|
||||
<h1>Hello, world!</h1>
|
||||
@ -2008,7 +1984,7 @@ body { padding-bottom: 70px; }
|
||||
<p><a class="btn btn-primary btn-lg" role="button">Learn more</a></p>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
<p>To make the jumbotron full width, and without rounded corners, place it outside all <code>.container</code>s and instead add a <code>.container</code> within.</p>
|
||||
<p>To make the jumbotron full width, and without rounded corners, place it outside all <code>.container</code>s and instead add a <code>.container</code> within.</p>
|
||||
{% highlight html %}
|
||||
<div class="jumbotron">
|
||||
<div class="container">
|
||||
@ -2016,66 +1992,63 @@ body { padding-bottom: 70px; }
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Page header
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<!-- Page header
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="page-header" class="page-header">Page header</h1>
|
||||
|
||||
<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 as most other components (with additional styles).</p>
|
||||
<div class="bs-example">
|
||||
<div class="page-header">
|
||||
<h1 id="page-header">Page header</h1>
|
||||
</div>
|
||||
<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 as most other components (with additional styles).</p>
|
||||
<div class="bs-example">
|
||||
<div class="page-header">
|
||||
<h1>Example page header <small>Subtext for header</small></h1>
|
||||
</div>
|
||||
<h1>Example page header <small>Subtext for header</small></h1>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="page-header">
|
||||
<h1>Example page header <small>Subtext for header</small></h1>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Thumbnails
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="thumbnails">Thumbnails</h1>
|
||||
</div>
|
||||
<p class="lead">Extend Bootstrap's <a href="../css/#grid">grid system</a> with the thumbnail component to easily display grids of images, videos, text, and more.</p>
|
||||
<!-- Thumbnails
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="thumbnails" class="page-header">Thumbnails</h1>
|
||||
|
||||
<h3 id="thumbnails-default">Default example</h3>
|
||||
<p>By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.</p>
|
||||
<div class="bs-example">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<a href="#" class="thumbnail">
|
||||
<img data-src="holder.js/100%x180" alt="Generic placeholder thumbnail">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<a href="#" class="thumbnail">
|
||||
<img data-src="holder.js/100%x180" alt="Generic placeholder thumbnail">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<a href="#" class="thumbnail">
|
||||
<img data-src="holder.js/100%x180" alt="Generic placeholder thumbnail">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<a href="#" class="thumbnail">
|
||||
<img data-src="holder.js/100%x180" alt="Generic placeholder thumbnail">
|
||||
</a>
|
||||
</div>
|
||||
<p class="lead">Extend Bootstrap's <a href="../css/#grid">grid system</a> with the thumbnail component to easily display grids of images, videos, text, and more.</p>
|
||||
|
||||
<h3 id="thumbnails-default">Default example</h3>
|
||||
<p>By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.</p>
|
||||
<div class="bs-example">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<a href="#" class="thumbnail">
|
||||
<img data-src="holder.js/100%x180" alt="Generic placeholder thumbnail">
|
||||
</a>
|
||||
</div>
|
||||
</div><!-- /.bs-example -->
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<a href="#" class="thumbnail">
|
||||
<img data-src="holder.js/100%x180" alt="Generic placeholder thumbnail">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<a href="#" class="thumbnail">
|
||||
<img data-src="holder.js/100%x180" alt="Generic placeholder thumbnail">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<a href="#" class="thumbnail">
|
||||
<img data-src="holder.js/100%x180" alt="Generic placeholder thumbnail">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-md-3">
|
||||
@ -2087,42 +2060,42 @@ body { padding-bottom: 70px; }
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="thumbnails-custom-content">Custom content</h3>
|
||||
<p>With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.</p>
|
||||
<div class="bs-example">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<img data-src="holder.js/300x200" alt="Generic placeholder thumbnail">
|
||||
<div class="caption">
|
||||
<h3>Thumbnail label</h3>
|
||||
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
<p><a href="#" class="btn btn-primary" role="button">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<img data-src="holder.js/300x200" alt="Generic placeholder thumbnail">
|
||||
<div class="caption">
|
||||
<h3>Thumbnail label</h3>
|
||||
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
<p><a href="#" class="btn btn-primary" role="button">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<img data-src="holder.js/300x200" alt="Generic placeholder thumbnail">
|
||||
<div class="caption">
|
||||
<h3>Thumbnail label</h3>
|
||||
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
<p><a href="#" class="btn btn-primary" role="button">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
|
||||
</div>
|
||||
<h3 id="thumbnails-custom-content">Custom content</h3>
|
||||
<p>With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.</p>
|
||||
<div class="bs-example">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<img data-src="holder.js/300x200" alt="Generic placeholder thumbnail">
|
||||
<div class="caption">
|
||||
<h3>Thumbnail label</h3>
|
||||
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
<p><a href="#" class="btn btn-primary" role="button">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.bs-example -->
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<img data-src="holder.js/300x200" alt="Generic placeholder thumbnail">
|
||||
<div class="caption">
|
||||
<h3>Thumbnail label</h3>
|
||||
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
<p><a href="#" class="btn btn-primary" role="button">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<img data-src="holder.js/300x200" alt="Generic placeholder thumbnail">
|
||||
<div class="caption">
|
||||
<h3>Thumbnail label</h3>
|
||||
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
<p><a href="#" class="btn btn-primary" role="button">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-md-4">
|
||||
@ -2137,41 +2110,39 @@ body { padding-bottom: 70px; }
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Alerts
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="alerts" class="page-header">Alerts</h1>
|
||||
|
||||
<p class="lead">Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. For inline dismissal, use the <a href="../javascript/#alerts">alerts jQuery plugin</a>.</p>
|
||||
|
||||
<h2 id="alerts-examples">Examples</h2>
|
||||
<p>Wrap any text and an optional dismiss button in <code>.alert</code> and one of the four contextual classes (e.g., <code>.alert-success</code>) for basic alert messages.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>No default class</h4>
|
||||
<p>Alerts don't have default classes, only base and modifier classes. A default gray alert doesn't make too much sense, so you're required to specify a type via contextual class. Choose from success, info, warning, or danger.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Alerts
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="alerts">Alerts</h1>
|
||||
<div class="bs-example">
|
||||
<div class="alert alert-success">
|
||||
<strong>Well done!</strong> You successfully read this important alert message.
|
||||
</div>
|
||||
<p class="lead">Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. For inline dismissal, use the <a href="../javascript/#alerts">alerts jQuery plugin</a>.</p>
|
||||
|
||||
<h2 id="alerts-examples">Examples</h2>
|
||||
<p>Wrap any text and an optional dismiss button in <code>.alert</code> and one of the four contextual classes (e.g., <code>.alert-success</code>) for basic alert messages.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>No default class</h4>
|
||||
<p>Alerts don't have default classes, only base and modifier classes. A default gray alert doesn't make too much sense, so you're required to specify a type via contextual class. Choose from success, info, warning, or danger.</p>
|
||||
<div class="alert alert-info">
|
||||
<strong>Heads up!</strong> This alert needs your attention, but it's not super important.
|
||||
</div>
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="alert alert-success">
|
||||
<strong>Well done!</strong> You successfully read this important alert message.
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
<strong>Heads up!</strong> This alert needs your attention, but it's not super important.
|
||||
</div>
|
||||
<div class="alert alert-warning">
|
||||
<strong>Warning!</strong> Better check yourself, you're not looking too good.
|
||||
</div>
|
||||
<div class="alert alert-danger">
|
||||
<strong>Oh snap!</strong> Change a few things up and try submitting again.
|
||||
</div>
|
||||
<div class="alert alert-warning">
|
||||
<strong>Warning!</strong> Better check yourself, you're not looking too good.
|
||||
</div>
|
||||
<div class="alert alert-danger">
|
||||
<strong>Oh snap!</strong> Change a few things up and try submitting again.
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="alert alert-success">...</div>
|
||||
<div class="alert alert-info">...</div>
|
||||
@ -2179,14 +2150,14 @@ body { padding-bottom: 70px; }
|
||||
<div class="alert alert-danger">...</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h2 id="alerts-dismissable">Dismissable alerts</h2>
|
||||
<p>Build on any alert by adding an optional <code>.alert-dismissable</code> and close button.</p>
|
||||
<div class="bs-example">
|
||||
<div class="alert alert-warning alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<strong>Warning!</strong> Better check yourself, you're not looking too good.
|
||||
</div>
|
||||
<h2 id="alerts-dismissable">Dismissable alerts</h2>
|
||||
<p>Build on any alert by adding an optional <code>.alert-dismissable</code> and close button.</p>
|
||||
<div class="bs-example">
|
||||
<div class="alert alert-warning alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<strong>Warning!</strong> Better check yourself, you're not looking too good.
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="alert alert-warning alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
@ -2194,27 +2165,27 @@ body { padding-bottom: 70px; }
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Ensure proper behavior across all devices</h4>
|
||||
<p>Be sure to use the <code><button></code> element with the <code>data-dismiss="alert"</code> data attribute.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Ensure proper behavior across all devices</h4>
|
||||
<p>Be sure to use the <code><button></code> element with the <code>data-dismiss="alert"</code> data attribute.</p>
|
||||
</div>
|
||||
|
||||
<h2 id="alerts-links">Links in alerts</h2>
|
||||
<p>Use the <code>.alert-link</code> utility class to quickly provide matching colored links within any alert.</p>
|
||||
<div class="bs-example">
|
||||
<div class="alert alert-success">
|
||||
<strong>Well done!</strong> You successfully read <a href="#" class="alert-link">this important alert message</a>.
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
<strong>Heads up!</strong> This <a href="#" class="alert-link">alert needs your attention</a>, but it's not super important.
|
||||
</div>
|
||||
<div class="alert alert-warning">
|
||||
<strong>Warning!</strong> Better check yourself, you're <a href="#" class="alert-link">not looking too good</a>.
|
||||
</div>
|
||||
<div class="alert alert-danger">
|
||||
<strong>Oh snap!</strong> <a href="#" class="alert-link">Change a few things up</a> and try submitting again.
|
||||
</div>
|
||||
<h2 id="alerts-links">Links in alerts</h2>
|
||||
<p>Use the <code>.alert-link</code> utility class to quickly provide matching colored links within any alert.</p>
|
||||
<div class="bs-example">
|
||||
<div class="alert alert-success">
|
||||
<strong>Well done!</strong> You successfully read <a href="#" class="alert-link">this important alert message</a>.
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
<strong>Heads up!</strong> This <a href="#" class="alert-link">alert needs your attention</a>, but it's not super important.
|
||||
</div>
|
||||
<div class="alert alert-warning">
|
||||
<strong>Warning!</strong> Better check yourself, you're <a href="#" class="alert-link">not looking too good</a>.
|
||||
</div>
|
||||
<div class="alert alert-danger">
|
||||
<strong>Oh snap!</strong> <a href="#" class="alert-link">Change a few things up</a> and try submitting again.
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="alert alert-success">
|
||||
<a href="#" class="alert-link">...</a>
|
||||
@ -2229,33 +2200,31 @@ body { padding-bottom: 70px; }
|
||||
<a href="#" class="alert-link">...</a>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Progress bars
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="progress" class="page-header">Progress bars</h1>
|
||||
|
||||
<p class="lead">Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>Progress bars use CSS3 transitions and animations to achieve some of their effects. These features are not supported in Internet Explorer 9 and below or older versions of Firefox. Opera 12 does not support animations.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Progress bars
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="progress">Progress bars</h1>
|
||||
</div>
|
||||
<p class="lead">Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>Progress bars use CSS3 transitions and animations to achieve some of their effects. These features are not supported in Internet Explorer 9 and below or older versions of Firefox. Opera 12 does not support animations.</p>
|
||||
</div>
|
||||
|
||||
<h3 id="progress-basic">Basic example</h3>
|
||||
<p>Default progress bar.</p>
|
||||
<div class="bs-example">
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
|
||||
<span class="sr-only">60% Complete</span>
|
||||
</div>
|
||||
<h3 id="progress-basic">Basic example</h3>
|
||||
<p>Default progress bar.</p>
|
||||
<div class="bs-example">
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
|
||||
<span class="sr-only">60% Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
|
||||
@ -2264,30 +2233,30 @@ body { padding-bottom: 70px; }
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="progress-alternatives">Contextual alternatives</h3>
|
||||
<p>Progress bars use some of the same button and alert classes for consistent styles.</p>
|
||||
<div class="bs-example">
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
|
||||
<span class="sr-only">40% Complete (success)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
|
||||
<span class="sr-only">20% Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
|
||||
<span class="sr-only">60% Complete (warning)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">
|
||||
<span class="sr-only">80% Complete (danger)</span>
|
||||
</div>
|
||||
<h3 id="progress-alternatives">Contextual alternatives</h3>
|
||||
<p>Progress bars use some of the same button and alert classes for consistent styles.</p>
|
||||
<div class="bs-example">
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
|
||||
<span class="sr-only">40% Complete (success)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
|
||||
<span class="sr-only">20% Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
|
||||
<span class="sr-only">60% Complete (warning)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">
|
||||
<span class="sr-only">80% Complete (danger)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
|
||||
@ -2311,30 +2280,30 @@ body { padding-bottom: 70px; }
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="progress-striped">Striped</h3>
|
||||
<p>Uses a gradient to create a striped effect. Not available in IE8.</p>
|
||||
<div class="bs-example">
|
||||
<div class="progress progress-striped" >
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
|
||||
<span class="sr-only">40% Complete (success)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress progress-striped">
|
||||
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
|
||||
<span class="sr-only">20% Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress progress-striped">
|
||||
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
|
||||
<span class="sr-only">60% Complete (warning)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress progress-striped">
|
||||
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">
|
||||
<span class="sr-only">80% Complete (danger)</span>
|
||||
</div>
|
||||
<h3 id="progress-striped">Striped</h3>
|
||||
<p>Uses a gradient to create a striped effect. Not available in IE8.</p>
|
||||
<div class="bs-example">
|
||||
<div class="progress progress-striped" >
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
|
||||
<span class="sr-only">40% Complete (success)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress progress-striped">
|
||||
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
|
||||
<span class="sr-only">20% Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress progress-striped">
|
||||
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
|
||||
<span class="sr-only">60% Complete (warning)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress progress-striped">
|
||||
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">
|
||||
<span class="sr-only">80% Complete (danger)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="progress progress-striped">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
|
||||
@ -2358,13 +2327,13 @@ body { padding-bottom: 70px; }
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="progress-animated">Animated</h3>
|
||||
<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-example">
|
||||
<div class="progress progress-striped active">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%"><span class="sr-only">45% Complete</span></div>
|
||||
</div>
|
||||
<h3 id="progress-animated">Animated</h3>
|
||||
<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-example">
|
||||
<div class="progress progress-striped active">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%"><span class="sr-only">45% Complete</span></div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="progress progress-striped active">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%">
|
||||
@ -2373,21 +2342,21 @@ body { padding-bottom: 70px; }
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="progress-stacked">Stacked</h3>
|
||||
<p>Place multiple bars into the same <code>.progress</code> to stack them.</p>
|
||||
<div class="bs-example">
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success" style="width: 35%">
|
||||
<span class="sr-only">35% Complete (success)</span>
|
||||
</div>
|
||||
<div class="progress-bar progress-bar-warning" style="width: 20%">
|
||||
<span class="sr-only">20% Complete (warning)</span>
|
||||
</div>
|
||||
<div class="progress-bar progress-bar-danger" style="width: 10%">
|
||||
<span class="sr-only">10% Complete (danger)</span>
|
||||
</div>
|
||||
<h3 id="progress-stacked">Stacked</h3>
|
||||
<p>Place multiple bars into the same <code>.progress</code> to stack them.</p>
|
||||
<div class="bs-example">
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success" style="width: 35%">
|
||||
<span class="sr-only">35% Complete (success)</span>
|
||||
</div>
|
||||
<div class="progress-bar progress-bar-warning" style="width: 20%">
|
||||
<span class="sr-only">20% Complete (warning)</span>
|
||||
</div>
|
||||
<div class="progress-bar progress-bar-danger" style="width: 10%">
|
||||
<span class="sr-only">10% Complete (danger)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success" style="width: 35%">
|
||||
@ -2401,50 +2370,48 @@ body { padding-bottom: 70px; }
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Media object
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="media" class="page-header">Media object</h1>
|
||||
|
||||
<!-- Media object
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="media">Media object</h1>
|
||||
</div>
|
||||
<p class="lead">Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.</p>
|
||||
<p class="lead">Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.</p>
|
||||
|
||||
<h3 id="media-default">Default media</h3>
|
||||
<p>The default media allow to float a media object (images, video, audio) to the left or right of a content block.</p>
|
||||
<div class="bs-example">
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
</div>
|
||||
<h3 id="media-default">Default media</h3>
|
||||
<p>The default media allow to float a media object (images, video, audio) to the left or right of a content block.</p>
|
||||
<div class="bs-example">
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
</div>
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Nested media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
</div>
|
||||
</div>
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Nested media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.bs-example -->
|
||||
</div>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
@ -2457,60 +2424,60 @@ body { padding-bottom: 70px; }
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="media-list">Media list</h3>
|
||||
<p>With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists).</p>
|
||||
<div class="bs-example">
|
||||
<ul class="media-list">
|
||||
<li class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Media heading</h4>
|
||||
<p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.</p>
|
||||
<!-- Nested media object -->
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Nested media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
|
||||
<!-- Nested media object -->
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Nested media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
|
||||
</div>
|
||||
<h3 id="media-list">Media list</h3>
|
||||
<p>With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists).</p>
|
||||
<div class="bs-example">
|
||||
<ul class="media-list">
|
||||
<li class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Media heading</h4>
|
||||
<p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.</p>
|
||||
<!-- Nested media object -->
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Nested media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
|
||||
<!-- Nested media object -->
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Nested media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Nested media object -->
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Nested media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
|
||||
</div>
|
||||
</div>
|
||||
<!-- Nested media object -->
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Nested media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="media">
|
||||
<a class="pull-right" href="#">
|
||||
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="media">
|
||||
<a class="pull-right" href="#">
|
||||
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ul class="media-list">
|
||||
<li class="media">
|
||||
@ -2524,29 +2491,28 @@ body { padding-bottom: 70px; }
|
||||
</li>
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- List group
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="list-group" class="page-header">List group</h1>
|
||||
|
||||
<p class="lead">List groups are a flexible and powerful component for displaying not only simple lists of elements, but complex ones with custom content.</p>
|
||||
|
||||
<h3 id="list-group-basic">Basic example</h3>
|
||||
<p>The most basic list group is simply an unordered list with list items, and the proper classes. Build upon it with the options that follow, or your own CSS as needed.</p>
|
||||
<div class="bs-example">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">Cras justo odio</li>
|
||||
<li class="list-group-item">Dapibus ac facilisis in</li>
|
||||
<li class="list-group-item">Morbi leo risus</li>
|
||||
<li class="list-group-item">Porta ac consectetur ac</li>
|
||||
<li class="list-group-item">Vestibulum at eros</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- List group
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="list-group">List group</h1>
|
||||
</div>
|
||||
<p class="lead">List groups are a flexible and powerful component for displaying not only simple lists of elements, but complex ones with custom content.</p>
|
||||
|
||||
<h3 id="list-group-basic">Basic example</h3>
|
||||
<p>The most basic list group is simply an unordered list with list items, and the proper classes. Build upon it with the options that follow, or your own CSS as needed.</p>
|
||||
<div class="bs-example">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">Cras justo odio</li>
|
||||
<li class="list-group-item">Dapibus ac facilisis in</li>
|
||||
<li class="list-group-item">Morbi leo risus</li>
|
||||
<li class="list-group-item">Porta ac consectetur ac</li>
|
||||
<li class="list-group-item">Vestibulum at eros</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">Cras justo odio</li>
|
||||
@ -2557,24 +2523,24 @@ body { padding-bottom: 70px; }
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="list-group-badges">Badges</h3>
|
||||
<p>Add the badges component to any list group item and it will automatically be positioned on the right.</p>
|
||||
<div class="bs-example">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">
|
||||
<span class="badge">14</span>
|
||||
Cras justo odio
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span class="badge">2</span>
|
||||
Dapibus ac facilisis in
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span class="badge">1</span>
|
||||
Morbi leo risus
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3 id="list-group-badges">Badges</h3>
|
||||
<p>Add the badges component to any list group item and it will automatically be positioned on the right.</p>
|
||||
<div class="bs-example">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">
|
||||
<span class="badge">14</span>
|
||||
Cras justo odio
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span class="badge">2</span>
|
||||
Dapibus ac facilisis in
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span class="badge">1</span>
|
||||
Morbi leo risus
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">
|
||||
@ -2584,19 +2550,19 @@ body { padding-bottom: 70px; }
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="list-group-linked">Linked items</h3>
|
||||
<p>Linkify list group items by using anchor tags instead of list items (that also means a parent <code><div></code> instead of an <code><ul></code>). No need for individual parents around each element.</p>
|
||||
<div class="bs-example">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item active">
|
||||
Cras justo odio
|
||||
</a>
|
||||
<a href="#" class="list-group-item">Dapibus ac facilisis in</a>
|
||||
<a href="#" class="list-group-item">Morbi leo risus</a>
|
||||
<a href="#" class="list-group-item">Porta ac consectetur ac</a>
|
||||
<a href="#" class="list-group-item">Vestibulum at eros</a>
|
||||
</div>
|
||||
<h3 id="list-group-linked">Linked items</h3>
|
||||
<p>Linkify list group items by using anchor tags instead of list items (that also means a parent <code><div></code> instead of an <code><ul></code>). No need for individual parents around each element.</p>
|
||||
<div class="bs-example">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item active">
|
||||
Cras justo odio
|
||||
</a>
|
||||
<a href="#" class="list-group-item">Dapibus ac facilisis in</a>
|
||||
<a href="#" class="list-group-item">Morbi leo risus</a>
|
||||
<a href="#" class="list-group-item">Porta ac consectetur ac</a>
|
||||
<a href="#" class="list-group-item">Vestibulum at eros</a>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item active">
|
||||
@ -2609,28 +2575,28 @@ body { padding-bottom: 70px; }
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="list-group-contextual-classes">Contextual classes</h3>
|
||||
<p>Use contextual classes to style list items, default or linked. Also includes <code>.active</code> state.</p>
|
||||
<div class="bs-example">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item list-group-item-success">Dapibus ac facilisis in</li>
|
||||
<li class="list-group-item list-group-item-info">Cras sit amet nibh libero</li>
|
||||
<li class="list-group-item list-group-item-warning">Porta ac consectetur ac</li>
|
||||
<li class="list-group-item list-group-item-danger">Vestibulum at eros</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item list-group-item-success">Dapibus ac facilisis in</a>
|
||||
<a href="#" class="list-group-item list-group-item-info">Cras sit amet nibh libero</a>
|
||||
<a href="#" class="list-group-item list-group-item-warning">Porta ac consectetur ac</a>
|
||||
<a href="#" class="list-group-item list-group-item-danger">Vestibulum at eros</a>
|
||||
</div>
|
||||
<h3 id="list-group-contextual-classes">Contextual classes</h3>
|
||||
<p>Use contextual classes to style list items, default or linked. Also includes <code>.active</code> state.</p>
|
||||
<div class="bs-example">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item list-group-item-success">Dapibus ac facilisis in</li>
|
||||
<li class="list-group-item list-group-item-info">Cras sit amet nibh libero</li>
|
||||
<li class="list-group-item list-group-item-warning">Porta ac consectetur ac</li>
|
||||
<li class="list-group-item list-group-item-danger">Vestibulum at eros</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item list-group-item-success">Dapibus ac facilisis in</a>
|
||||
<a href="#" class="list-group-item list-group-item-info">Cras sit amet nibh libero</a>
|
||||
<a href="#" class="list-group-item list-group-item-warning">Porta ac consectetur ac</a>
|
||||
<a href="#" class="list-group-item list-group-item-danger">Vestibulum at eros</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item list-group-item-success">Dapibus ac facilisis in</li>
|
||||
@ -2646,24 +2612,24 @@ body { padding-bottom: 70px; }
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="list-group-custom-content">Custom content</h3>
|
||||
<p>Add nearly any HTML within, even for linked list groups like the one below.</p>
|
||||
<div class="bs-example">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item active">
|
||||
<h4 class="list-group-item-heading">List group item heading</h4>
|
||||
<p class="list-group-item-text">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
|
||||
</a>
|
||||
<a href="#" class="list-group-item">
|
||||
<h4 class="list-group-item-heading">List group item heading</h4>
|
||||
<p class="list-group-item-text">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
|
||||
</a>
|
||||
<a href="#" class="list-group-item">
|
||||
<h4 class="list-group-item-heading">List group item heading</h4>
|
||||
<p class="list-group-item-text">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
|
||||
</a>
|
||||
</div>
|
||||
<h3 id="list-group-custom-content">Custom content</h3>
|
||||
<p>Add nearly any HTML within, even for linked list groups like the one below.</p>
|
||||
<div class="bs-example">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item active">
|
||||
<h4 class="list-group-item-heading">List group item heading</h4>
|
||||
<p class="list-group-item-text">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
|
||||
</a>
|
||||
<a href="#" class="list-group-item">
|
||||
<h4 class="list-group-item-heading">List group item heading</h4>
|
||||
<p class="list-group-item-text">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
|
||||
</a>
|
||||
<a href="#" class="list-group-item">
|
||||
<h4 class="list-group-item-heading">List group item heading</h4>
|
||||
<p class="list-group-item-text">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item active">
|
||||
@ -2672,28 +2638,26 @@ body { padding-bottom: 70px; }
|
||||
</a>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Panels
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="panels" class="page-header">Panels</h1>
|
||||
|
||||
<!-- Panels
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="panels">Panels</h1>
|
||||
</div>
|
||||
<p class="lead">While not always necessary, sometimes you need to put your DOM in a box. For those situations, try the panel component.</p>
|
||||
<p class="lead">While not always necessary, sometimes you need to put your DOM in a box. For those situations, try the panel component.</p>
|
||||
|
||||
<h3 id="panels-basic">Basic example</h3>
|
||||
<p>By default, all the <code>.panel</code> does is apply some basic border and padding to contain some content.</p>
|
||||
<div class="bs-example">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
Basic panel example
|
||||
</div>
|
||||
<h3 id="panels-basic">Basic example</h3>
|
||||
<p>By default, all the <code>.panel</code> does is apply some basic border and padding to contain some content.</p>
|
||||
<div class="bs-example">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
Basic panel example
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
@ -2702,24 +2666,24 @@ body { padding-bottom: 70px; }
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="panels-heading">Panel with heading</h3>
|
||||
<p>Easily add a heading container to your panel with <code>.panel-heading</code>. You may also include any <code><h1></code>-<code><h6></code> with a <code>.panel-title</code> class to add a pre-styled heading.</p>
|
||||
<div class="bs-example">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Panel heading without title</div>
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Panel title</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
<h3 id="panels-heading">Panel with heading</h3>
|
||||
<p>Easily add a heading container to your panel with <code>.panel-heading</code>. You may also include any <code><h1></code>-<code><h6></code> with a <code>.panel-title</code> class to add a pre-styled heading.</p>
|
||||
<div class="bs-example">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Panel heading without title</div>
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Panel title</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Panel heading without title</div>
|
||||
@ -2738,16 +2702,16 @@ body { padding-bottom: 70px; }
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="panels-footer">Panel with footer</h3>
|
||||
<p>Wrap buttons or secondary text in <code>.panel-footer</code>. Note that panel footers <strong>do not</strong> inherit colors and borders when using contextual variations as they are not meant to be in the foreground.</p>
|
||||
<div class="bs-example">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
<div class="panel-footer">Panel footer</div>
|
||||
<h3 id="panels-footer">Panel with footer</h3>
|
||||
<p>Wrap buttons or secondary text in <code>.panel-footer</code>. Note that panel footers <strong>do not</strong> inherit colors and borders when using contextual variations as they are not meant to be in the foreground.</p>
|
||||
<div class="bs-example">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
<div class="panel-footer">Panel footer</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
@ -2757,50 +2721,50 @@ body { padding-bottom: 70px; }
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="panels-alternatives">Contextual alternatives</h3>
|
||||
<p>Like other components, easily make a panel more meaningful to a particular context by adding any of the contextual state classes.</p>
|
||||
<div class="bs-example">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Panel title</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
<h3 id="panels-alternatives">Contextual alternatives</h3>
|
||||
<p>Like other components, easily make a panel more meaningful to a particular context by adding any of the contextual state classes.</p>
|
||||
<div class="bs-example">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Panel title</h3>
|
||||
</div>
|
||||
<div class="panel panel-success">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Panel title</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Panel title</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-warning">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Panel title</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-danger">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Panel title</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-success">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Panel title</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Panel title</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-warning">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Panel title</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-danger">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Panel title</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="panel panel-primary">...</div>
|
||||
<div class="panel panel-success">...</div>
|
||||
@ -2809,49 +2773,49 @@ body { padding-bottom: 70px; }
|
||||
<div class="panel panel-danger">...</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="panels-tables">With tables</h3>
|
||||
<p>Add any non-bordered <code>.table</code> within a panel for a seamless design. If there is a <code>.panel-body</code>, we add an extra border to the top of the table for separation.</p>
|
||||
<div class="bs-example">
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<div class="panel-heading">Panel heading</div>
|
||||
<div class="panel-body">
|
||||
<p>Some default panel content here. Nulla vitae elit libero, a pharetra augue. Aenean lacinia bibendum nulla sed consectetur. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
</div>
|
||||
|
||||
<!-- Table -->
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Username</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<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>Larry</td>
|
||||
<td>the Bird</td>
|
||||
<td>@twitter</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="panels-tables">With tables</h3>
|
||||
<p>Add any non-bordered <code>.table</code> within a panel for a seamless design. If there is a <code>.panel-body</code>, we add an extra border to the top of the table for separation.</p>
|
||||
<div class="bs-example">
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<div class="panel-heading">Panel heading</div>
|
||||
<div class="panel-body">
|
||||
<p>Some default panel content here. Nulla vitae elit libero, a pharetra augue. Aenean lacinia bibendum nulla sed consectetur. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
</div>
|
||||
|
||||
<!-- Table -->
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Username</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<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>Larry</td>
|
||||
<td>the Bird</td>
|
||||
<td>@twitter</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
@ -2867,45 +2831,45 @@ body { padding-bottom: 70px; }
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<p>If there is no panel body, the component moves from panel header to table without interruption.</p>
|
||||
<div class="bs-example">
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<div class="panel-heading">Panel heading</div>
|
||||
<p>If there is no panel body, the component moves from panel header to table without interruption.</p>
|
||||
<div class="bs-example">
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<div class="panel-heading">Panel heading</div>
|
||||
|
||||
<!-- Table -->
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Username</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<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>Larry</td>
|
||||
<td>the Bird</td>
|
||||
<td>@twitter</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- Table -->
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Username</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<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>Larry</td>
|
||||
<td>the Bird</td>
|
||||
<td>@twitter</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
@ -2919,27 +2883,26 @@ body { padding-bottom: 70px; }
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
|
||||
<h3 id="panels-list-group">With list groups</h3>
|
||||
<p>Easily include full-width <a href="#list-group">list groups</a> within any panel.</p>
|
||||
<div class="bs-example">
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<div class="panel-heading">Panel heading</div>
|
||||
<div class="panel-body">
|
||||
<p>Some default panel content here. Nulla vitae elit libero, a pharetra augue. Aenean lacinia bibendum nulla sed consectetur. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
</div>
|
||||
|
||||
<!-- List group -->
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">Cras justo odio</li>
|
||||
<li class="list-group-item">Dapibus ac facilisis in</li>
|
||||
<li class="list-group-item">Morbi leo risus</li>
|
||||
<li class="list-group-item">Porta ac consectetur ac</li>
|
||||
<li class="list-group-item">Vestibulum at eros</li>
|
||||
</ul>
|
||||
<h3 id="panels-list-group">With list groups</h3>
|
||||
<p>Easily include full-width <a href="#list-group">list groups</a> within any panel.</p>
|
||||
<div class="bs-example">
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<div class="panel-heading">Panel heading</div>
|
||||
<div class="panel-body">
|
||||
<p>Some default panel content here. Nulla vitae elit libero, a pharetra augue. Aenean lacinia bibendum nulla sed consectetur. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
</div>
|
||||
|
||||
<!-- List group -->
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">Cras justo odio</li>
|
||||
<li class="list-group-item">Dapibus ac facilisis in</li>
|
||||
<li class="list-group-item">Morbi leo risus</li>
|
||||
<li class="list-group-item">Porta ac consectetur ac</li>
|
||||
<li class="list-group-item">Vestibulum at eros</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
@ -2958,47 +2921,42 @@ body { padding-bottom: 70px; }
|
||||
</ul>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Wells
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="wells" class="page-header">Wells</h1>
|
||||
|
||||
<h3>Default well</h3>
|
||||
<p>Use the well as a simple effect on an element to give it an inset effect.</p>
|
||||
<div class="bs-example">
|
||||
<div class="well">
|
||||
Look, I'm in a well!
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Wells
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="wells">Wells</h1>
|
||||
</div>
|
||||
|
||||
<h3>Default well</h3>
|
||||
<p>Use the well as a simple effect on an element to give it an inset effect.</p>
|
||||
<div class="bs-example">
|
||||
<div class="well">
|
||||
Look, I'm in a well!
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="well">...</div>
|
||||
{% endhighlight %}
|
||||
<h3>Optional classes</h3>
|
||||
<p>Control padding and rounded corners with two optional modifier classes.</p>
|
||||
<div class="bs-example">
|
||||
<div class="well well-lg">
|
||||
Look, I'm in a large well!
|
||||
</div>
|
||||
<h3>Optional classes</h3>
|
||||
<p>Control padding and rounded corners with two optional modifier classes.</p>
|
||||
<div class="bs-example">
|
||||
<div class="well well-lg">
|
||||
Look, I'm in a large well!
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="well well-lg">...</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="well well-sm">
|
||||
Look, I'm in a small well!
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<div class="well well-sm">
|
||||
Look, I'm in a small well!
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="well well-sm">...</div>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
</div>
|
||||
|
3704
docs/css.html
3704
docs/css.html
@ -6,16 +6,15 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
---
|
||||
|
||||
|
||||
<!-- Global Bootstrap settings
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="overview">Overview</h1>
|
||||
</div>
|
||||
<p class="lead">Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.</p>
|
||||
<!-- Global Bootstrap settings
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="overview" class="page-header">Overview</h1>
|
||||
|
||||
<h3 id="overview-doctype">HTML5 doctype</h3>
|
||||
<p>Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.</p>
|
||||
<p class="lead">Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.</p>
|
||||
|
||||
<h3 id="overview-doctype">HTML5 doctype</h3>
|
||||
<p>Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.</p>
|
||||
{% highlight html %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
@ -23,74 +22,73 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
</html>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="overview-mobile">Mobile first</h3>
|
||||
<p>With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, <strong>Bootstrap is mobile first</strong>. Mobile first styles can be found throughout the entire library instead of in separate files.</p>
|
||||
<p>To ensure proper rendering and touch zooming, <strong>add the viewport meta tag</strong> to your <code><head></code>.</p>
|
||||
<h3 id="overview-mobile">Mobile first</h3>
|
||||
<p>With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, <strong>Bootstrap is mobile first</strong>. Mobile first styles can be found throughout the entire library instead of in separate files.</p>
|
||||
<p>To ensure proper rendering and touch zooming, <strong>add the viewport meta tag</strong> to your <code><head></code>.</p>
|
||||
{% highlight html %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
{% endhighlight %}
|
||||
<p>You can disable zooming capabilities on mobile devices by adding <code>user-scalable=no</code> to the viewport meta tag. This disables zooming, meaning users are only able to scroll, and results in your site feeling a bit more like a native application. Overall we don't recommend this on every site, so use caution!</p>
|
||||
<p>You can disable zooming capabilities on mobile devices by adding <code>user-scalable=no</code> to the viewport meta tag. This disables zooming, meaning users are only able to scroll, and results in your site feeling a bit more like a native application. Overall we don't recommend this on every site, so use caution!</p>
|
||||
{% highlight html %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="overview-responsive-images">Responsive images</h3>
|
||||
<p>Images in Bootstrap 3 can be made responsive-friendly via the addition of the <code>.img-responsive</code> class. This applies <code>max-width: 100%;</code> and <code>height: auto;</code> to the image so that it scales nicely to the parent element.</p>
|
||||
<h3 id="overview-responsive-images">Responsive images</h3>
|
||||
<p>Images in Bootstrap 3 can be made responsive-friendly via the addition of the <code>.img-responsive</code> class. This applies <code>max-width: 100%;</code> and <code>height: auto;</code> to the image so that it scales nicely to the parent element.</p>
|
||||
{% highlight html %}
|
||||
<img src="..." class="img-responsive" alt="Responsive image">
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="overview-type-links">Typography and links</h3>
|
||||
<p>Bootstrap sets basic global display, typography, and link styles. Specifically, we:</p>
|
||||
<ul>
|
||||
<li>Set <code>background-color: #fff;</code> on the <code>body</code></li>
|
||||
<li>Use the <code>@font-family-base</code>, <code>@font-size-base</code>, and <code>@line-height-base</code> attributes as our typographic base</li>
|
||||
<li>Set the global link color via <code>@link-color</code> and apply link underlines only on <code>:hover</code></li>
|
||||
</ul>
|
||||
<p>These styles can be found within <code>scaffolding.less</code>.</p>
|
||||
<h3 id="overview-type-links">Typography and links</h3>
|
||||
<p>Bootstrap sets basic global display, typography, and link styles. Specifically, we:</p>
|
||||
<ul>
|
||||
<li>Set <code>background-color: #fff;</code> on the <code>body</code></li>
|
||||
<li>Use the <code>@font-family-base</code>, <code>@font-size-base</code>, and <code>@line-height-base</code> attributes as our typographic base</li>
|
||||
<li>Set the global link color via <code>@link-color</code> and apply link underlines only on <code>:hover</code></li>
|
||||
</ul>
|
||||
<p>These styles can be found within <code>scaffolding.less</code>.</p>
|
||||
|
||||
<h3 id="overview-normalize">Normalize</h3>
|
||||
<p>For improved cross-browser rendering, we use <a href="http://necolas.github.io/normalize.css/" target="_blank">Normalize</a>, a project by <a href="http://twitter.com/necolas" target="_blank">Nicolas Gallagher</a> and <a href="http://twitter.com/jon_neal" target="_blank">Jonathan Neal</a>.</p>
|
||||
<h3 id="overview-normalize">Normalize</h3>
|
||||
<p>For improved cross-browser rendering, we use <a href="http://necolas.github.io/normalize.css/" target="_blank">Normalize</a>, a project by <a href="http://twitter.com/necolas" target="_blank">Nicolas Gallagher</a> and <a href="http://twitter.com/jon_neal" target="_blank">Jonathan Neal</a>.</p>
|
||||
|
||||
<h3 id="overview-container">Containers</h3>
|
||||
<p>Easily center a page's contents by wrapping its contents in a <code>.container</code>. Containers set <code>width</code> at various media query breakpoints to match our grid system.</p>
|
||||
<p>Note that, due to <code>padding</code> and fixed widths, containers are not nestable by default.</p>
|
||||
<h3 id="overview-container">Containers</h3>
|
||||
<p>Easily center a page's contents by wrapping its contents in a <code>.container</code>. Containers set <code>width</code> at various media query breakpoints to match our grid system.</p>
|
||||
<p>Note that, due to <code>padding</code> and fixed widths, containers are not nestable by default.</p>
|
||||
{% highlight html %}
|
||||
<div class="container">
|
||||
...
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Grid system
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="grid" class="page-header">Grid system</h1>
|
||||
|
||||
<p class="lead">Bootstrap includes a responsive, mobile first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases. It includes <a href="#grid-example-basic">predefined classes</a> for easy layout options, as well as powerful <a href="#grid-less">mixins for generating more semantic layouts</a>.</p>
|
||||
|
||||
<h3 id="grid-intro">Introduction</h3>
|
||||
<p>Grid systems are used for creating page layouts through a series of rows and columns that house your content. Here's how the Bootstrap grid system works:</p>
|
||||
<ul>
|
||||
<li>Rows must be placed within a <code>.container</code> (fixed-width) or <code>.container-fluid</code> (full-width) for proper alignment and padding.</li>
|
||||
<li>Use rows to create horizontal groups of columns.</li>
|
||||
<li>Content should be placed within columns, and only columns may be immediate children of rows.</li>
|
||||
<li>Predefined grid classes like <code>.row</code> and <code>.col-xs-4</code> are available for quickly making grid layouts. Less mixins can also be used for more semantic layouts.</li>
|
||||
<li>Columns create gutters (gaps between column content) via <code>padding</code>. That padding is offset in rows for the first and last column via negative margin on <code>.row</code>s.</li>
|
||||
<li>Grid columns are created by specifying the number of twelve available columns you wish to span. For example, three equal columns would use three <code>.col-xs-4</code>.</li>
|
||||
</ul>
|
||||
<p>Look to the examples for applying these principles to your code.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Grids and full-width layouts</h4>
|
||||
<p>Folks looking to create fully fluid layouts (meaning your site stretches the entire width of the viewport) must wrap their grid content in a containing element with <code>padding: 0 15px;</code> to offset the <code>margin: 0 -15px;</code> used on <code>.row</code>s.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Grid system
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="grid">Grid system</h1>
|
||||
</div>
|
||||
<p class="lead">Bootstrap includes a responsive, mobile first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases. It includes <a href="#grid-example-basic">predefined classes</a> for easy layout options, as well as powerful <a href="#grid-less">mixins for generating more semantic layouts</a>.</p>
|
||||
|
||||
<h3 id="grid-intro">Introduction</h3>
|
||||
<p>Grid systems are used for creating page layouts through a series of rows and columns that house your content. Here's how the Bootstrap grid system works:</p>
|
||||
<ul>
|
||||
<li>Rows must be placed within a <code>.container</code> (fixed-width) or <code>.container-fluid</code> (full-width) for proper alignment and padding.</li>
|
||||
<li>Use rows to create horizontal groups of columns.</li>
|
||||
<li>Content should be placed within columns, and only columns may be immediate children of rows.</li>
|
||||
<li>Predefined grid classes like <code>.row</code> and <code>.col-xs-4</code> are available for quickly making grid layouts. Less mixins can also be used for more semantic layouts.</li>
|
||||
<li>Columns create gutters (gaps between column content) via <code>padding</code>. That padding is offset in rows for the first and last column via negative margin on <code>.row</code>s.</li>
|
||||
<li>Grid columns are created by specifying the number of twelve available columns you wish to span. For example, three equal columns would use three <code>.col-xs-4</code>.</li>
|
||||
</ul>
|
||||
<p>Look to the examples for applying these principles to your code.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Grids and full-width layouts</h4>
|
||||
<p>Folks looking to create fully fluid layouts (meaning your site stretches the entire width of the viewport) must wrap their grid content in a containing element with <code>padding: 0 15px;</code> to offset the <code>margin: 0 -15px;</code> used on <code>.row</code>s.</p>
|
||||
</div>
|
||||
|
||||
<h3 id="grid-media-queries">Media queries</h3>
|
||||
<p>We use the following media queries in our Less files to create the key breakpoints in our grid system.</p>
|
||||
<h3 id="grid-media-queries">Media queries</h3>
|
||||
<p>We use the following media queries in our Less files to create the key breakpoints in our grid system.</p>
|
||||
{% highlight css %}
|
||||
/* Extra small devices (phones, less than 768px) */
|
||||
/* No media query since this is the default in Bootstrap */
|
||||
@ -104,7 +102,7 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
/* Large devices (large desktops, 1200px and up) */
|
||||
@media (min-width: @screen-lg-min) { ... }
|
||||
{% endhighlight %}
|
||||
<p>We occasionally expand on these media queries to include a <code>max-width</code> to limit CSS to a narrower set of devices.</p>
|
||||
<p>We occasionally expand on these media queries to include a <code>max-width</code> to limit CSS to a narrower set of devices.</p>
|
||||
{% highlight css %}
|
||||
@media (max-width: @screen-xs-max) { ... }
|
||||
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { ... }
|
||||
@ -112,114 +110,114 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
@media (min-width: @screen-lg-min) { ... }
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="grid-options">Grid options</h3>
|
||||
<p>See how aspects of the Bootstrap grid system work across multiple devices with a handy table.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>
|
||||
Extra small devices
|
||||
<small>Phones (<768px)</small>
|
||||
</th>
|
||||
<th>
|
||||
Small devices
|
||||
<small>Tablets (≥768px)</small>
|
||||
</th>
|
||||
<th>
|
||||
Medium devices
|
||||
<small>Desktops (≥992px)</small>
|
||||
</th>
|
||||
<th>
|
||||
Large devices
|
||||
<small>Desktops (≥1200px)</small>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Grid behavior</th>
|
||||
<td>Horizontal at all times</td>
|
||||
<td colspan="3">Collapsed to start, horizontal above breakpoints</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Container width</th>
|
||||
<td>None (auto)</td>
|
||||
<td>750px</td>
|
||||
<td>970px</td>
|
||||
<td>1170px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Class prefix</th>
|
||||
<td><code>.col-xs-</code></td>
|
||||
<td><code>.col-sm-</code></td>
|
||||
<td><code>.col-md-</code></td>
|
||||
<td><code>.col-lg-</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th># of columns</th>
|
||||
<td colspan="4">12</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Column width</th>
|
||||
<td class="text-muted">Auto</td>
|
||||
<td>60px</td>
|
||||
<td>78px</td>
|
||||
<td>95px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Gutter width</th>
|
||||
<td colspan="4">30px (15px on each side of a column)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Nestable</th>
|
||||
<td colspan="4">Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Offsets</th>
|
||||
<td colspan="4">Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Column ordering</th>
|
||||
<td colspan="4">Yes</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override grid classes targeted at smaller devices. Therefore, applying any <code>.col-md-</code> class to an element will not only affect its styling on medium devices but also on large devices if a <code>.col-lg-</code> class is not present.</p>
|
||||
<h3 id="grid-options">Grid options</h3>
|
||||
<p>See how aspects of the Bootstrap grid system work across multiple devices with a handy table.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>
|
||||
Extra small devices
|
||||
<small>Phones (<768px)</small>
|
||||
</th>
|
||||
<th>
|
||||
Small devices
|
||||
<small>Tablets (≥768px)</small>
|
||||
</th>
|
||||
<th>
|
||||
Medium devices
|
||||
<small>Desktops (≥992px)</small>
|
||||
</th>
|
||||
<th>
|
||||
Large devices
|
||||
<small>Desktops (≥1200px)</small>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Grid behavior</th>
|
||||
<td>Horizontal at all times</td>
|
||||
<td colspan="3">Collapsed to start, horizontal above breakpoints</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Container width</th>
|
||||
<td>None (auto)</td>
|
||||
<td>750px</td>
|
||||
<td>970px</td>
|
||||
<td>1170px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Class prefix</th>
|
||||
<td><code>.col-xs-</code></td>
|
||||
<td><code>.col-sm-</code></td>
|
||||
<td><code>.col-md-</code></td>
|
||||
<td><code>.col-lg-</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th># of columns</th>
|
||||
<td colspan="4">12</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Column width</th>
|
||||
<td class="text-muted">Auto</td>
|
||||
<td>60px</td>
|
||||
<td>78px</td>
|
||||
<td>95px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Gutter width</th>
|
||||
<td colspan="4">30px (15px on each side of a column)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Nestable</th>
|
||||
<td colspan="4">Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Offsets</th>
|
||||
<td colspan="4">Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Column ordering</th>
|
||||
<td colspan="4">Yes</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override grid classes targeted at smaller devices. Therefore, applying any <code>.col-md-</code> class to an element will not only affect its styling on medium devices but also on large devices if a <code>.col-lg-</code> class is not present.</p>
|
||||
|
||||
<h3 id="grid-example-basic">Example: Stacked-to-horizontal</h3>
|
||||
<p>Using a single set of <code>.col-md-*</code> grid classes, you can create a basic grid system that starts out stacked on mobile devices and tablet devices (the extra small to small range) before becoming horizontal on desktop (medium) devices. Place grid columns in any <code>.row</code>.</p>
|
||||
<div class="bs-docs-grid">
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-8">.col-md-8</div>
|
||||
<div class="col-md-4">.col-md-4</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-4">.col-md-4</div>
|
||||
<div class="col-md-4">.col-md-4</div>
|
||||
<div class="col-md-4">.col-md-4</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-6">.col-md-6</div>
|
||||
<div class="col-md-6">.col-md-6</div>
|
||||
</div>
|
||||
<h3 id="grid-example-basic">Example: Stacked-to-horizontal</h3>
|
||||
<p>Using a single set of <code>.col-md-*</code> grid classes, you can create a basic grid system that starts out stacked on mobile devices and tablet devices (the extra small to small range) before becoming horizontal on desktop (medium) devices. Place grid columns in any <code>.row</code>.</p>
|
||||
<div class="bs-docs-grid">
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-8">.col-md-8</div>
|
||||
<div class="col-md-4">.col-md-4</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-4">.col-md-4</div>
|
||||
<div class="col-md-4">.col-md-4</div>
|
||||
<div class="col-md-4">.col-md-4</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-6">.col-md-6</div>
|
||||
<div class="col-md-6">.col-md-6</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="row">
|
||||
<div class="col-md-1">.col-md-1</div>
|
||||
@ -250,8 +248,8 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="grid-example-fluid">Example: Fluid container</h3>
|
||||
<p>Turn any fixed-width grid layout into a full-width layout by changing your outermost <code>.container</code> to <code>.container-fluid</code>.</p>
|
||||
<h3 id="grid-example-fluid">Example: Fluid container</h3>
|
||||
<p>Turn any fixed-width grid layout into a full-width layout by changing your outermost <code>.container</code> to <code>.container-fluid</code>.</p>
|
||||
{% highlight html %}
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
@ -260,23 +258,23 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="grid-example-mixed">Example: Mobile and desktop</h3>
|
||||
<p>Don't want your columns to simply stack in smaller devices? Use the extra small and medium device grid classes by adding <code>.col-xs-*</code> <code>.col-md-*</code> to your columns. See the example below for a better idea of how it all works.</p>
|
||||
<div class="bs-docs-grid">
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-12 col-md-8">.col-xs-12 .col-md-8</div>
|
||||
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
|
||||
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
|
||||
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-6">.col-xs-6</div>
|
||||
<div class="col-xs-6">.col-xs-6</div>
|
||||
</div>
|
||||
<h3 id="grid-example-mixed">Example: Mobile and desktop</h3>
|
||||
<p>Don't want your columns to simply stack in smaller devices? Use the extra small and medium device grid classes by adding <code>.col-xs-*</code> <code>.col-md-*</code> to your columns. See the example below for a better idea of how it all works.</p>
|
||||
<div class="bs-docs-grid">
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-12 col-md-8">.col-xs-12 .col-md-8</div>
|
||||
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
|
||||
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
|
||||
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-6">.col-xs-6</div>
|
||||
<div class="col-xs-6">.col-xs-6</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<!-- Stack the columns on mobile by making one full-width and the other half-width -->
|
||||
<div class="row">
|
||||
@ -298,21 +296,21 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="grid-example-mixed-complete">Example: Mobile, tablet, desktops</h3>
|
||||
<p>Build on the previous example by creating even more dynamic and powerful layouts with tablet <code>.col-sm-*</code> classes.</p>
|
||||
<div class="bs-docs-grid">
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-12 col-sm-6 col-md-8">.col-xs-12 .col-sm-6 .col-md-8</div>
|
||||
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
|
||||
<div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
|
||||
<!-- Optional: clear the XS cols if their content doesn't match in height -->
|
||||
<div class="clearfix visible-xs"></div>
|
||||
<div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
|
||||
</div>
|
||||
<h3 id="grid-example-mixed-complete">Example: Mobile, tablet, desktops</h3>
|
||||
<p>Build on the previous example by creating even more dynamic and powerful layouts with tablet <code>.col-sm-*</code> classes.</p>
|
||||
<div class="bs-docs-grid">
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-12 col-sm-6 col-md-8">.col-xs-12 .col-sm-6 .col-md-8</div>
|
||||
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
|
||||
<div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
|
||||
<!-- Optional: clear the XS cols if their content doesn't match in height -->
|
||||
<div class="clearfix visible-xs"></div>
|
||||
<div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6 col-md-8">.col-xs-12 .col-sm-6 .col-md-8</div>
|
||||
@ -327,24 +325,24 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="grid-responsive-resets">Responsive column resets</h3>
|
||||
<p>With the four tiers of grids available you're bound to run into issues where, at certain breakpoints, your columns don't clear quite right as one is taller than the other. To fix that, use a combination of a <code>.clearfix</code> and our <a href="#responsive-utilities">responsive utility classes</a>.</p>
|
||||
<div class="bs-docs-grid">
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
.col-xs-6 .col-sm-3
|
||||
<br>
|
||||
Resize your viewport or check it out on your phone for an example.
|
||||
<h3 id="grid-responsive-resets">Responsive column resets</h3>
|
||||
<p>With the four tiers of grids available you're bound to run into issues where, at certain breakpoints, your columns don't clear quite right as one is taller than the other. To fix that, use a combination of a <code>.clearfix</code> and our <a href="#responsive-utilities">responsive utility classes</a>.</p>
|
||||
<div class="bs-docs-grid">
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
.col-xs-6 .col-sm-3
|
||||
<br>
|
||||
Resize your viewport or check it out on your phone for an example.
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
|
||||
|
||||
<!-- Add the extra clearfix for only the required viewport -->
|
||||
<div class="clearfix visible-xs"></div>
|
||||
|
||||
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
|
||||
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
|
||||
|
||||
<!-- Add the extra clearfix for only the required viewport -->
|
||||
<div class="clearfix visible-xs"></div>
|
||||
|
||||
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
|
||||
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
|
||||
@ -357,7 +355,7 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
<p>In addition to column clearing at responsive breakpoints, you may need to <strong>reset offsets, pushes, or pulls</strong>. Those resets are available for medium and large grid tiers only, since they start only at the (second) small grid tier. See this in action in <a href="../examples/grid/">the grid example</a>.</p>
|
||||
<p>In addition to column clearing at responsive breakpoints, you may need to <strong>reset offsets, pushes, or pulls</strong>. Those resets are available for medium and large grid tiers only, since they start only at the (second) small grid tier. See this in action in <a href="../examples/grid/">the grid example</a>.</p>
|
||||
{% highlight html %}
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-md-6">.col-sm-5 .col-md-6</div>
|
||||
@ -371,21 +369,21 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h3 id="grid-offsetting">Offsetting columns</h3>
|
||||
<p>Move columns to the right using <code>.col-md-offset-*</code> classes. These classes increase the left margin of a column by <code>*</code> columns. For example, <code>.col-md-offset-4</code> moves <code>.col-md-4</code> over four columns.</p>
|
||||
<div class="bs-docs-grid">
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-4">.col-md-4</div>
|
||||
<div class="col-md-4 col-md-offset-4">.col-md-4 .col-md-offset-4</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-3 col-md-offset-3">.col-md-3 .col-md-offset-3</div>
|
||||
<div class="col-md-3 col-md-offset-3">.col-md-3 .col-md-offset-3</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-6 col-md-offset-3">.col-md-6 .col-md-offset-3</div>
|
||||
</div>
|
||||
<h3 id="grid-offsetting">Offsetting columns</h3>
|
||||
<p>Move columns to the right using <code>.col-md-offset-*</code> classes. These classes increase the left margin of a column by <code>*</code> columns. For example, <code>.col-md-offset-4</code> moves <code>.col-md-4</code> over four columns.</p>
|
||||
<div class="bs-docs-grid">
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-4">.col-md-4</div>
|
||||
<div class="col-md-4 col-md-offset-4">.col-md-4 .col-md-offset-4</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-3 col-md-offset-3">.col-md-3 .col-md-offset-3</div>
|
||||
<div class="col-md-3 col-md-offset-3">.col-md-3 .col-md-offset-3</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-6 col-md-offset-3">.col-md-6 .col-md-offset-3</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="row">
|
||||
<div class="col-md-4">.col-md-4</div>
|
||||
@ -401,21 +399,21 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h3 id="grid-nesting">Nesting columns</h3>
|
||||
<p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.col-md-*</code> columns within an existing <code>.col-md-*</code> column. Nested rows should include a set of columns that add up to 12 or less.</p>
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-9">
|
||||
Level 1: .col-md-9
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-6">
|
||||
Level 2: .col-md-6
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
Level 2: .col-md-6
|
||||
</div>
|
||||
<h3 id="grid-nesting">Nesting columns</h3>
|
||||
<p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.col-md-*</code> columns within an existing <code>.col-md-*</code> column. Nested rows should include a set of columns that add up to 12 or less.</p>
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-9">
|
||||
Level 1: .col-md-9
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-6">
|
||||
Level 2: .col-md-6
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
Level 2: .col-md-6
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
@ -432,12 +430,12 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="grid-column-ordering">Column ordering</h3>
|
||||
<p>Easily change the order of our built-in grid columns with <code>.col-md-push-*</code> and <code>.col-md-pull-*</code> modifier classes.</p>
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-9 col-md-push-3">.col-md-9 .col-md-push-3</div>
|
||||
<div class="col-md-3 col-md-pull-9">.col-md-3 .col-md-pull-9</div>
|
||||
</div>
|
||||
<h3 id="grid-column-ordering">Column ordering</h3>
|
||||
<p>Easily change the order of our built-in grid columns with <code>.col-md-push-*</code> and <code>.col-md-pull-*</code> modifier classes.</p>
|
||||
<div class="row show-grid">
|
||||
<div class="col-md-9 col-md-push-3">.col-md-9 .col-md-push-3</div>
|
||||
<div class="col-md-3 col-md-pull-9">.col-md-3 .col-md-pull-9</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
<div class="row">
|
||||
@ -446,19 +444,19 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="grid-less">Less mixins and variables</h3>
|
||||
<p>In addition to <a href="#grid-example-basic">prebuilt grid classes</a> for fast layouts, Bootstrap includes Less variables and mixins for quickly generating your own simple, semantic layouts.</p>
|
||||
<h3 id="grid-less">Less mixins and variables</h3>
|
||||
<p>In addition to <a href="#grid-example-basic">prebuilt grid classes</a> for fast layouts, Bootstrap includes Less variables and mixins for quickly generating your own simple, semantic layouts.</p>
|
||||
|
||||
<h4>Variables</h4>
|
||||
<p>Variables determine the number of columns, the gutter width, and the media query point at which to begin floating columns. We use these to generate the predefined grid classes documented above, as well as for the custom mixins listed below.</p>
|
||||
<h4>Variables</h4>
|
||||
<p>Variables determine the number of columns, the gutter width, and the media query point at which to begin floating columns. We use these to generate the predefined grid classes documented above, as well as for the custom mixins listed below.</p>
|
||||
{% highlight css %}
|
||||
@grid-columns: 12;
|
||||
@grid-gutter-width: 30px;
|
||||
@grid-float-breakpoint: 768px;
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Mixins</h4>
|
||||
<p>Mixins are used in conjunction with the grid variables to generate semantic CSS for individual grid columns.</p>
|
||||
<h4>Mixins</h4>
|
||||
<p>Mixins are used in conjunction with the grid variables to generate semantic CSS for individual grid columns.</p>
|
||||
{% highlight css %}
|
||||
// Creates a wrapper for a series of columns
|
||||
.make-row(@gutter: @grid-gutter-width) {
|
||||
@ -593,8 +591,8 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Example usage</h4>
|
||||
<p>You can modify the variables to your own custom values, or just use the mixins with their default values. Here's an example of using the default settings to create a two-column layout with a gap between.</p>
|
||||
<h4>Example usage</h4>
|
||||
<p>You can modify the variables to your own custom values, or just use the mixins with their default values. Here's an example of using the default settings to create a two-column layout with a gap between.</p>
|
||||
{% highlight css %}
|
||||
.wrapper {
|
||||
.make-row();
|
||||
@ -613,52 +611,48 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
<div class="content-secondary">...</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Typography
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="type" class="page-header">Typography</h1>
|
||||
|
||||
<!-- Headings -->
|
||||
<h2 id="type-headings">Headings</h2>
|
||||
<p>All HTML headings, <code><h1></code> through <code><h6></code>, are available. <code>.h1</code> through <code>.h6</code> classes are also available, for when you want to match the font styling of a heading but still want your text to be displayed inline.</p>
|
||||
<div class="bs-example bs-example-type">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><h1>h1. Bootstrap heading</h1></td>
|
||||
<td class="type-info">Semibold 36px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h2>h2. Bootstrap heading</h2></td>
|
||||
<td class="type-info">Semibold 30px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h3>h3. Bootstrap heading</h3></td>
|
||||
<td class="type-info">Semibold 24px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h4>h4. Bootstrap heading</h4></td>
|
||||
<td class="type-info">Semibold 18px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h5>h5. Bootstrap heading</h5></td>
|
||||
<td class="type-info">Semibold 14px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h6>h6. Bootstrap heading</h6></td>
|
||||
<td class="type-info">Semibold 12px</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Typography
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="type">Typography</h1>
|
||||
</div>
|
||||
|
||||
<!-- Headings -->
|
||||
<h2 id="type-headings">Headings</h2>
|
||||
<p>All HTML headings, <code><h1></code> through <code><h6></code>, are available. <code>.h1</code> through <code>.h6</code> classes are also available, for when you want to match the font styling of a heading but still want your text to be displayed inline.</p>
|
||||
<div class="bs-example bs-example-type">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><h1>h1. Bootstrap heading</h1></td>
|
||||
<td class="type-info">Semibold 36px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h2>h2. Bootstrap heading</h2></td>
|
||||
<td class="type-info">Semibold 30px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h3>h3. Bootstrap heading</h3></td>
|
||||
<td class="type-info">Semibold 24px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h4>h4. Bootstrap heading</h4></td>
|
||||
<td class="type-info">Semibold 18px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h5>h5. Bootstrap heading</h5></td>
|
||||
<td class="type-info">Semibold 14px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h6>h6. Bootstrap heading</h6></td>
|
||||
<td class="type-info">Semibold 12px</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<h1>h1. Bootstrap heading</h1>
|
||||
<h2>h2. Bootstrap heading</h2>
|
||||
@ -668,31 +662,31 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
<h6>h6. Bootstrap heading</h6>
|
||||
{% endhighlight %}
|
||||
|
||||
<p>Create lighter, secondary text in any heading with a generic <code><small></code> tag or the <code>.small</code> class.</p>
|
||||
<div class="bs-example bs-example-type">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><h1>h1. Bootstrap heading <small>Secondary text</small></h1></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h2>h2. Bootstrap heading <small>Secondary text</small></h2></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h3>h3. Bootstrap heading <small>Secondary text</small></h3></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h4>h4. Bootstrap heading <small>Secondary text</small></h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h5>h5. Bootstrap heading <small>Secondary text</small></h5></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h6>h6. Bootstrap heading <small>Secondary text</small></h6></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>Create lighter, secondary text in any heading with a generic <code><small></code> tag or the <code>.small</code> class.</p>
|
||||
<div class="bs-example bs-example-type">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><h1>h1. Bootstrap heading <small>Secondary text</small></h1></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h2>h2. Bootstrap heading <small>Secondary text</small></h2></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h3>h3. Bootstrap heading <small>Secondary text</small></h3></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h4>h4. Bootstrap heading <small>Secondary text</small></h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h5>h5. Bootstrap heading <small>Secondary text</small></h5></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h6>h6. Bootstrap heading <small>Secondary text</small></h6></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<h1>h1. Bootstrap heading <small>Secondary text</small></h1>
|
||||
<h2>h2. Bootstrap heading <small>Secondary text</small></h2>
|
||||
@ -703,79 +697,79 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<!-- Body copy -->
|
||||
<h2 id="type-body-copy">Body copy</h2>
|
||||
<p>Bootstrap's global default <code>font-size</code> is <strong>14px</strong>, with a <code>line-height</code> of <strong>1.428</strong>. This is applied to the <code><body></code> and all paragraphs. In addition, <code><p></code> (paragraphs) receive a bottom margin of half their computed line-height (10px by default).</p>
|
||||
<div class="bs-example">
|
||||
<p>Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.</p>
|
||||
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.</p>
|
||||
<p>Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>
|
||||
</div>
|
||||
<!-- Body copy -->
|
||||
<h2 id="type-body-copy">Body copy</h2>
|
||||
<p>Bootstrap's global default <code>font-size</code> is <strong>14px</strong>, with a <code>line-height</code> of <strong>1.428</strong>. This is applied to the <code><body></code> and all paragraphs. In addition, <code><p></code> (paragraphs) receive a bottom margin of half their computed line-height (10px by default).</p>
|
||||
<div class="bs-example">
|
||||
<p>Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.</p>
|
||||
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.</p>
|
||||
<p>Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<p>...</p>
|
||||
{% endhighlight %}
|
||||
|
||||
<!-- Body copy .lead -->
|
||||
<h3>Lead body copy</h3>
|
||||
<p>Make a paragraph stand out by adding <code>.lead</code>.</p>
|
||||
<div class="bs-example">
|
||||
<p class="lead">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.</p>
|
||||
</div>
|
||||
<!-- Body copy .lead -->
|
||||
<h3>Lead body copy</h3>
|
||||
<p>Make a paragraph stand out by adding <code>.lead</code>.</p>
|
||||
<div class="bs-example">
|
||||
<p class="lead">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.</p>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<p class="lead">...</p>
|
||||
{% endhighlight %}
|
||||
|
||||
<!-- Using Less -->
|
||||
<h3>Built with Less</h3>
|
||||
<p>The typographic scale is based on two Less variables in <strong>variables.less</strong>: <code>@font-size-base</code> and <code>@line-height-base</code>. The first is the base font-size used throughout and the second is the base line-height. We use those variables and some simple math to create the margins, paddings, and line-heights of all our type and more. Customize them and Bootstrap adapts.</p>
|
||||
<!-- Using Less -->
|
||||
<h3>Built with Less</h3>
|
||||
<p>The typographic scale is based on two Less variables in <strong>variables.less</strong>: <code>@font-size-base</code> and <code>@line-height-base</code>. The first is the base font-size used throughout and the second is the base line-height. We use those variables and some simple math to create the margins, paddings, and line-heights of all our type and more. Customize them and Bootstrap adapts.</p>
|
||||
|
||||
|
||||
<!-- Emphasis -->
|
||||
<h2 id="type-emphasis">Emphasis</h2>
|
||||
<p>Make use of HTML's default emphasis tags with lightweight styles.</p>
|
||||
<!-- Emphasis -->
|
||||
<h2 id="type-emphasis">Emphasis</h2>
|
||||
<p>Make use of HTML's default emphasis tags with lightweight styles.</p>
|
||||
|
||||
<h3>Small text</h3>
|
||||
<p>For de-emphasizing inline or blocks of text, use the <code><small></code> tag to set text at 85% the size of the parent. Heading elements receive their own <code>font-size</code> for nested <code><small></code> elements.</p>
|
||||
<p>You may alternatively use an inline element with <code>.small</code> in place of any <code><small></code></p>
|
||||
<div class="bs-example">
|
||||
<p><small>This line of text is meant to be treated as fine print.</small></p>
|
||||
</div>
|
||||
<h3>Small text</h3>
|
||||
<p>For de-emphasizing inline or blocks of text, use the <code><small></code> tag to set text at 85% the size of the parent. Heading elements receive their own <code>font-size</code> for nested <code><small></code> elements.</p>
|
||||
<p>You may alternatively use an inline element with <code>.small</code> in place of any <code><small></code></p>
|
||||
<div class="bs-example">
|
||||
<p><small>This line of text is meant to be treated as fine print.</small></p>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<small>This line of text is meant to be treated as fine print.</small>
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h3>Bold</h3>
|
||||
<p>For emphasizing a snippet of text with a heavier font-weight.</p>
|
||||
<div class="bs-example">
|
||||
<p>The following snippet of text is <strong>rendered as bold text</strong>.</p>
|
||||
</div>
|
||||
<h3>Bold</h3>
|
||||
<p>For emphasizing a snippet of text with a heavier font-weight.</p>
|
||||
<div class="bs-example">
|
||||
<p>The following snippet of text is <strong>rendered as bold text</strong>.</p>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<strong>rendered as bold text</strong>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>Italics</h3>
|
||||
<p>For emphasizing a snippet of text with italics.</p>
|
||||
<div class="bs-example">
|
||||
<p>The following snippet of text is <em>rendered as italicized text</em>.</p>
|
||||
</div>
|
||||
<h3>Italics</h3>
|
||||
<p>For emphasizing a snippet of text with italics.</p>
|
||||
<div class="bs-example">
|
||||
<p>The following snippet of text is <em>rendered as italicized text</em>.</p>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<em>rendered as italicized text</em>
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Alternate elements</h4>
|
||||
<p>Feel free to use <code><b></code> and <code><i></code> in HTML5. <code><b></code> is meant to highlight words or phrases without conveying additional importance while <code><i></code> is mostly for voice, technical terms, etc.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Alternate elements</h4>
|
||||
<p>Feel free to use <code><b></code> and <code><i></code> in HTML5. <code><b></code> is meant to highlight words or phrases without conveying additional importance while <code><i></code> is mostly for voice, technical terms, etc.</p>
|
||||
</div>
|
||||
|
||||
<h3>Alignment classes</h3>
|
||||
<p>Easily realign text to components with text alignment classes.</p>
|
||||
<div class="bs-example">
|
||||
<p class="text-left">Left aligned text.</p>
|
||||
<p class="text-center">Center aligned text.</p>
|
||||
<p class="text-right">Right aligned text.</p>
|
||||
<p class="text-justify">Justified text.</p>
|
||||
</div>
|
||||
<h3>Alignment classes</h3>
|
||||
<p>Easily realign text to components with text alignment classes.</p>
|
||||
<div class="bs-example">
|
||||
<p class="text-left">Left aligned text.</p>
|
||||
<p class="text-center">Center aligned text.</p>
|
||||
<p class="text-right">Right aligned text.</p>
|
||||
<p class="text-justify">Justified text.</p>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<p class="text-left">Left aligned text.</p>
|
||||
<p class="text-center">Center aligned text.</p>
|
||||
@ -784,44 +778,44 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<!-- Abbreviations -->
|
||||
<h2 id="type-abbreviations">Abbreviations</h2>
|
||||
<p>Stylized implementation of HTML's <code><abbr></code> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a <code>title</code> attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.</p>
|
||||
<!-- Abbreviations -->
|
||||
<h2 id="type-abbreviations">Abbreviations</h2>
|
||||
<p>Stylized implementation of HTML's <code><abbr></code> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a <code>title</code> attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.</p>
|
||||
|
||||
<h3>Basic abbreviation</h3>
|
||||
<p>For expanded text on long hover of an abbreviation, include the <code>title</code> attribute with the <code><abbr></code> element.</p>
|
||||
<div class="bs-example">
|
||||
<p>An abbreviation of the word attribute is <abbr title="attribute">attr</abbr>.</p>
|
||||
</div>
|
||||
<h3>Basic abbreviation</h3>
|
||||
<p>For expanded text on long hover of an abbreviation, include the <code>title</code> attribute with the <code><abbr></code> element.</p>
|
||||
<div class="bs-example">
|
||||
<p>An abbreviation of the word attribute is <abbr title="attribute">attr</abbr>.</p>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<abbr title="attribute">attr</abbr>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>Initialism</h3>
|
||||
<p>Add <code>.initialism</code> to an abbreviation for a slightly smaller font-size.</p>
|
||||
<div class="bs-example">
|
||||
<p><abbr title="HyperText Markup Language" class="initialism">HTML</abbr> is the best thing since sliced bread.</p>
|
||||
</div>
|
||||
<h3>Initialism</h3>
|
||||
<p>Add <code>.initialism</code> to an abbreviation for a slightly smaller font-size.</p>
|
||||
<div class="bs-example">
|
||||
<p><abbr title="HyperText Markup Language" class="initialism">HTML</abbr> is the best thing since sliced bread.</p>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<abbr title="HyperText Markup Language" class="initialism">HTML</abbr>
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<!-- Addresses -->
|
||||
<h2 id="type-addresses">Addresses</h2>
|
||||
<p>Present contact information for the nearest ancestor or the entire body of work. Preserve formatting by ending all lines with <code><br></code>.</p>
|
||||
<div class="bs-example">
|
||||
<address>
|
||||
<strong>Twitter, Inc.</strong><br>
|
||||
795 Folsom Ave, Suite 600<br>
|
||||
San Francisco, CA 94107<br>
|
||||
<abbr title="Phone">P:</abbr> (123) 456-7890
|
||||
</address>
|
||||
<address>
|
||||
<strong>Full Name</strong><br>
|
||||
<a href="mailto:#">first.last@example.com</a>
|
||||
</address>
|
||||
</div>
|
||||
<!-- Addresses -->
|
||||
<h2 id="type-addresses">Addresses</h2>
|
||||
<p>Present contact information for the nearest ancestor or the entire body of work. Preserve formatting by ending all lines with <code><br></code>.</p>
|
||||
<div class="bs-example">
|
||||
<address>
|
||||
<strong>Twitter, Inc.</strong><br>
|
||||
795 Folsom Ave, Suite 600<br>
|
||||
San Francisco, CA 94107<br>
|
||||
<abbr title="Phone">P:</abbr> (123) 456-7890
|
||||
</address>
|
||||
<address>
|
||||
<strong>Full Name</strong><br>
|
||||
<a href="mailto:#">first.last@example.com</a>
|
||||
</address>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<address>
|
||||
<strong>Twitter, Inc.</strong><br>
|
||||
@ -837,34 +831,34 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<!-- Blockquotes -->
|
||||
<h2 id="type-blockquotes">Blockquotes</h2>
|
||||
<p>For quoting blocks of content from another source within your document.</p>
|
||||
<!-- Blockquotes -->
|
||||
<h2 id="type-blockquotes">Blockquotes</h2>
|
||||
<p>For quoting blocks of content from another source within your document.</p>
|
||||
|
||||
<h3>Default blockquote</h3>
|
||||
<p>Wrap <code><blockquote></code> around any <abbr title="HyperText Markup Language">HTML</abbr> as the quote. For straight quotes, we recommend a <code><p></code>.</p>
|
||||
<div class="bs-example">
|
||||
<blockquote>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
|
||||
</blockquote>
|
||||
</div>
|
||||
<h3>Default blockquote</h3>
|
||||
<p>Wrap <code><blockquote></code> around any <abbr title="HyperText Markup Language">HTML</abbr> as the quote. For straight quotes, we recommend a <code><p></code>.</p>
|
||||
<div class="bs-example">
|
||||
<blockquote>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
|
||||
</blockquote>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<blockquote>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
|
||||
</blockquote>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>Blockquote options</h3>
|
||||
<p>Style and content changes for simple variations on a standard <code><blockquote></code>.</p>
|
||||
<h3>Blockquote options</h3>
|
||||
<p>Style and content changes for simple variations on a standard <code><blockquote></code>.</p>
|
||||
|
||||
<h4>Naming a source</h4>
|
||||
<p>Add a <code><footer></code> for identifying the source. Wrap the name of the source work in <code><cite></code>.</p>
|
||||
<div class="bs-example">
|
||||
<blockquote>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
|
||||
<footer>Someone famous in <cite title="Source Title">Source Title</cite></footer>
|
||||
</blockquote>
|
||||
</div>
|
||||
<h4>Naming a source</h4>
|
||||
<p>Add a <code><footer></code> for identifying the source. Wrap the name of the source work in <code><cite></code>.</p>
|
||||
<div class="bs-example">
|
||||
<blockquote>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
|
||||
<footer>Someone famous in <cite title="Source Title">Source Title</cite></footer>
|
||||
</blockquote>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<blockquote>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
|
||||
@ -872,14 +866,14 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
</blockquote>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Alternate displays</h4>
|
||||
<p>Add <code>.blockquote-reverse</code> for blockquote with right-aligned content.</p>
|
||||
<div class="bs-example" style="overflow: hidden;">
|
||||
<blockquote class="blockquote-reverse">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
|
||||
<footer>Someone famous in <cite title="Source Title">Source Title</cite></footer>
|
||||
</blockquote>
|
||||
</div>
|
||||
<h4>Alternate displays</h4>
|
||||
<p>Add <code>.blockquote-reverse</code> for blockquote with right-aligned content.</p>
|
||||
<div class="bs-example" style="overflow: hidden;">
|
||||
<blockquote class="blockquote-reverse">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
|
||||
<footer>Someone famous in <cite title="Source Title">Source Title</cite></footer>
|
||||
</blockquote>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<blockquote class="blockquote-reverse">
|
||||
...
|
||||
@ -887,111 +881,111 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<!-- Lists -->
|
||||
<h2 id="type-lists">Lists</h2>
|
||||
<!-- Lists -->
|
||||
<h2 id="type-lists">Lists</h2>
|
||||
|
||||
<h3>Unordered</h3>
|
||||
<p>A list of items in which the order does <em>not</em> explicitly matter.</p>
|
||||
<div class="bs-example">
|
||||
<ul>
|
||||
<li>Lorem ipsum dolor sit amet</li>
|
||||
<li>Consectetur adipiscing elit</li>
|
||||
<li>Integer molestie lorem at massa</li>
|
||||
<li>Facilisis in pretium nisl aliquet</li>
|
||||
<li>Nulla volutpat aliquam velit
|
||||
<ul>
|
||||
<li>Phasellus iaculis neque</li>
|
||||
<li>Purus sodales ultricies</li>
|
||||
<li>Vestibulum laoreet porttitor sem</li>
|
||||
<li>Ac tristique libero volutpat at</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Faucibus porta lacus fringilla vel</li>
|
||||
<li>Aenean sit amet erat nunc</li>
|
||||
<li>Eget porttitor lorem</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3>Unordered</h3>
|
||||
<p>A list of items in which the order does <em>not</em> explicitly matter.</p>
|
||||
<div class="bs-example">
|
||||
<ul>
|
||||
<li>Lorem ipsum dolor sit amet</li>
|
||||
<li>Consectetur adipiscing elit</li>
|
||||
<li>Integer molestie lorem at massa</li>
|
||||
<li>Facilisis in pretium nisl aliquet</li>
|
||||
<li>Nulla volutpat aliquam velit
|
||||
<ul>
|
||||
<li>Phasellus iaculis neque</li>
|
||||
<li>Purus sodales ultricies</li>
|
||||
<li>Vestibulum laoreet porttitor sem</li>
|
||||
<li>Ac tristique libero volutpat at</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Faucibus porta lacus fringilla vel</li>
|
||||
<li>Aenean sit amet erat nunc</li>
|
||||
<li>Eget porttitor lorem</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ul>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>Ordered</h3>
|
||||
<p>A list of items in which the order <em>does</em> explicitly matter.</p>
|
||||
<div class="bs-example">
|
||||
<ol>
|
||||
<li>Lorem ipsum dolor sit amet</li>
|
||||
<li>Consectetur adipiscing elit</li>
|
||||
<li>Integer molestie lorem at massa</li>
|
||||
<li>Facilisis in pretium nisl aliquet</li>
|
||||
<li>Nulla volutpat aliquam velit</li>
|
||||
<li>Faucibus porta lacus fringilla vel</li>
|
||||
<li>Aenean sit amet erat nunc</li>
|
||||
<li>Eget porttitor lorem</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h3>Ordered</h3>
|
||||
<p>A list of items in which the order <em>does</em> explicitly matter.</p>
|
||||
<div class="bs-example">
|
||||
<ol>
|
||||
<li>Lorem ipsum dolor sit amet</li>
|
||||
<li>Consectetur adipiscing elit</li>
|
||||
<li>Integer molestie lorem at massa</li>
|
||||
<li>Facilisis in pretium nisl aliquet</li>
|
||||
<li>Nulla volutpat aliquam velit</li>
|
||||
<li>Faucibus porta lacus fringilla vel</li>
|
||||
<li>Aenean sit amet erat nunc</li>
|
||||
<li>Eget porttitor lorem</li>
|
||||
</ol>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ol>
|
||||
<li>...</li>
|
||||
</ol>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>Unstyled</h3>
|
||||
<p>Remove the default <code>list-style</code> and left margin on list items (immediate children only). <strong>This only applies to immediate children list items</strong>, meaning you will need to add the class for any nested lists as well.</p>
|
||||
<div class="bs-example">
|
||||
<ul class="list-unstyled">
|
||||
<li>Lorem ipsum dolor sit amet</li>
|
||||
<li>Consectetur adipiscing elit</li>
|
||||
<li>Integer molestie lorem at massa</li>
|
||||
<li>Facilisis in pretium nisl aliquet</li>
|
||||
<li>Nulla volutpat aliquam velit
|
||||
<ul>
|
||||
<li>Phasellus iaculis neque</li>
|
||||
<li>Purus sodales ultricies</li>
|
||||
<li>Vestibulum laoreet porttitor sem</li>
|
||||
<li>Ac tristique libero volutpat at</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Faucibus porta lacus fringilla vel</li>
|
||||
<li>Aenean sit amet erat nunc</li>
|
||||
<li>Eget porttitor lorem</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3>Unstyled</h3>
|
||||
<p>Remove the default <code>list-style</code> and left margin on list items (immediate children only). <strong>This only applies to immediate children list items</strong>, meaning you will need to add the class for any nested lists as well.</p>
|
||||
<div class="bs-example">
|
||||
<ul class="list-unstyled">
|
||||
<li>Lorem ipsum dolor sit amet</li>
|
||||
<li>Consectetur adipiscing elit</li>
|
||||
<li>Integer molestie lorem at massa</li>
|
||||
<li>Facilisis in pretium nisl aliquet</li>
|
||||
<li>Nulla volutpat aliquam velit
|
||||
<ul>
|
||||
<li>Phasellus iaculis neque</li>
|
||||
<li>Purus sodales ultricies</li>
|
||||
<li>Vestibulum laoreet porttitor sem</li>
|
||||
<li>Ac tristique libero volutpat at</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Faucibus porta lacus fringilla vel</li>
|
||||
<li>Aenean sit amet erat nunc</li>
|
||||
<li>Eget porttitor lorem</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ul class="list-unstyled">
|
||||
<li>...</li>
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>Inline</h3>
|
||||
<p>Place all list items on a single line with <code>display: inline-block;</code> and some light padding.</p>
|
||||
<div class="bs-example">
|
||||
<ul class="list-inline">
|
||||
<li>Lorem ipsum</li>
|
||||
<li>Phasellus iaculis</li>
|
||||
<li>Nulla volutpat</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3>Inline</h3>
|
||||
<p>Place all list items on a single line with <code>display: inline-block;</code> and some light padding.</p>
|
||||
<div class="bs-example">
|
||||
<ul class="list-inline">
|
||||
<li>Lorem ipsum</li>
|
||||
<li>Phasellus iaculis</li>
|
||||
<li>Nulla volutpat</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<ul class="list-inline">
|
||||
<li>...</li>
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>Description</h3>
|
||||
<p>A list of terms with their associated descriptions.</p>
|
||||
<div class="bs-example">
|
||||
<dl>
|
||||
<dt>Description lists</dt>
|
||||
<dd>A description list is perfect for defining terms.</dd>
|
||||
<dt>Euismod</dt>
|
||||
<dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd>
|
||||
<dd>Donec id elit non mi porta gravida at eget metus.</dd>
|
||||
<dt>Malesuada porta</dt>
|
||||
<dd>Etiam porta sem malesuada magna mollis euismod.</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<h3>Description</h3>
|
||||
<p>A list of terms with their associated descriptions.</p>
|
||||
<div class="bs-example">
|
||||
<dl>
|
||||
<dt>Description lists</dt>
|
||||
<dd>A description list is perfect for defining terms.</dd>
|
||||
<dt>Euismod</dt>
|
||||
<dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd>
|
||||
<dd>Donec id elit non mi porta gravida at eget metus.</dd>
|
||||
<dt>Malesuada porta</dt>
|
||||
<dd>Etiam porta sem malesuada magna mollis euismod.</dd>
|
||||
</dl>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<dl>
|
||||
<dt>...</dt>
|
||||
@ -999,21 +993,21 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
</dl>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Horizontal description</h4>
|
||||
<p>Make terms and descriptions in <code><dl></code> line up side-by-side. Starts off stacked like default <code><dl></code>s, but when the navbar expands, so do these.</p>
|
||||
<div class="bs-example">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Description lists</dt>
|
||||
<dd>A description list is perfect for defining terms.</dd>
|
||||
<dt>Euismod</dt>
|
||||
<dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd>
|
||||
<dd>Donec id elit non mi porta gravida at eget metus.</dd>
|
||||
<dt>Malesuada porta</dt>
|
||||
<dd>Etiam porta sem malesuada magna mollis euismod.</dd>
|
||||
<dt>Felis euismod semper eget lacinia</dt>
|
||||
<dd>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<h4>Horizontal description</h4>
|
||||
<p>Make terms and descriptions in <code><dl></code> line up side-by-side. Starts off stacked like default <code><dl></code>s, but when the navbar expands, so do these.</p>
|
||||
<div class="bs-example">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Description lists</dt>
|
||||
<dd>A description list is perfect for defining terms.</dd>
|
||||
<dt>Euismod</dt>
|
||||
<dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd>
|
||||
<dd>Donec id elit non mi porta gravida at eget metus.</dd>
|
||||
<dt>Malesuada porta</dt>
|
||||
<dd>Etiam porta sem malesuada magna mollis euismod.</dd>
|
||||
<dt>Felis euismod semper eget lacinia</dt>
|
||||
<dd>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</dd>
|
||||
</dl>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<dl class="dl-horizontal">
|
||||
<dt>...</dt>
|
||||
@ -1021,22 +1015,21 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
</dl>
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Auto-truncating</h4>
|
||||
<p>Horizontal description lists will truncate terms that are too long to fit in the left column with <code>text-overflow</code>. In narrower viewports, they will change to the default stacked layout.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Auto-truncating</h4>
|
||||
<p>Horizontal description lists will truncate terms that are too long to fit in the left column with <code>text-overflow</code>. In narrower viewports, they will change to the default stacked layout.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Code
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="code">Code</h1>
|
||||
</div>
|
||||
|
||||
<h2 id="code-inline">Inline</h2>
|
||||
<p>Wrap inline snippets of code with <code><code></code>.</p>
|
||||
<!-- Code
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="code" class="page-header">Code</h1>
|
||||
|
||||
<h2 id="code-inline">Inline</h2>
|
||||
<p>Wrap inline snippets of code with <code><code></code>.</p>
|
||||
<div class="bs-example">
|
||||
For example, <code><section></code> should be wrapped as inline.
|
||||
</div>
|
||||
@ -1044,8 +1037,8 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
<h2 id="code-user-input">User input</h2>
|
||||
<p>Use the <code><kbd></code> to indicate input that is typically entered via keyboard.</p>
|
||||
<h2 id="code-user-input">User input</h2>
|
||||
<p>Use the <code><kbd></code> to indicate input that is typically entered via keyboard.</p>
|
||||
<div class="bs-example">
|
||||
To switch directories, type <kbd>cd</kbd> followed the name of the directory.
|
||||
</div>
|
||||
@ -1053,8 +1046,8 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
To switch directories, type <kbd>cd</kbd> followed the name of the directory.
|
||||
{% endhighlight %}
|
||||
|
||||
<h2 id="code-block">Basic block</h2>
|
||||
<p>Use <code><pre></code> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.</p>
|
||||
<h2 id="code-block">Basic block</h2>
|
||||
<p>Use <code><pre></code> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.</p>
|
||||
<div class="bs-example">
|
||||
<pre><p>Sample text here...</p></pre>
|
||||
</div>
|
||||
@ -1062,52 +1055,50 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
<pre><p>Sample text here...</p></pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Tables
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="tables">Tables</h1>
|
||||
</div>
|
||||
<!-- Tables
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="tables" class="page-header">Tables</h1>
|
||||
|
||||
<h2 id="tables-example">Basic example</h2>
|
||||
<p>For basic styling—light padding and only horizontal dividers—add the base class <code>.table</code> to any <code><table></code>. It may seem super redundant, but given the widespread use of tables for other plugins like calendars and date pickers, we've opted to isolate our custom table styles.</p>
|
||||
<div class="bs-example">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Username</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<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>Larry</td>
|
||||
<td>the Bird</td>
|
||||
<td>@twitter</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /example -->
|
||||
<h2 id="tables-example">Basic example</h2>
|
||||
<p>For basic styling—light padding and only horizontal dividers—add the base class <code>.table</code> to any <code><table></code>. It may seem super redundant, but given the widespread use of tables for other plugins like calendars and date pickers, we've opted to isolate our custom table styles.</p>
|
||||
<div class="bs-example">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Username</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<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>Larry</td>
|
||||
<td>the Bird</td>
|
||||
<td>@twitter</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /example -->
|
||||
{% highlight html %}
|
||||
<table class="table">
|
||||
...
|
||||
@ -1115,44 +1106,44 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="tables-striped">Striped rows</h2>
|
||||
<p>Use <code>.table-striped</code> to add zebra-striping to any table row within the <code><tbody></code>.</p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>Striped tables are styled via the <code>:nth-child</code> CSS selector, which is not available in Internet Explorer 8.</p>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Username</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<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>Larry</td>
|
||||
<td>the Bird</td>
|
||||
<td>@twitter</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /example -->
|
||||
<h2 id="tables-striped">Striped rows</h2>
|
||||
<p>Use <code>.table-striped</code> to add zebra-striping to any table row within the <code><tbody></code>.</p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>Striped tables are styled via the <code>:nth-child</code> CSS selector, which is not available in Internet Explorer 8.</p>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Username</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<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>Larry</td>
|
||||
<td>the Bird</td>
|
||||
<td>@twitter</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /example -->
|
||||
{% highlight html %}
|
||||
<table class="table table-striped">
|
||||
...
|
||||
@ -1160,44 +1151,44 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="tables-bordered">Bordered table</h2>
|
||||
<p>Add <code>.table-bordered</code> for borders on all sides of the table and cells.</p>
|
||||
<div class="bs-example">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Username</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="2">1</td>
|
||||
<td>Mark</td>
|
||||
<td>Otto</td>
|
||||
<td>@mdo</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mark</td>
|
||||
<td>Otto</td>
|
||||
<td>@TwBootstrap</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 -->
|
||||
<h2 id="tables-bordered">Bordered table</h2>
|
||||
<p>Add <code>.table-bordered</code> for borders on all sides of the table and cells.</p>
|
||||
<div class="bs-example">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Username</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="2">1</td>
|
||||
<td>Mark</td>
|
||||
<td>Otto</td>
|
||||
<td>@mdo</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mark</td>
|
||||
<td>Otto</td>
|
||||
<td>@TwBootstrap</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 -->
|
||||
{% highlight html %}
|
||||
<table class="table table-bordered">
|
||||
...
|
||||
@ -1205,39 +1196,39 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="tables-hover-rows">Hover rows</h2>
|
||||
<p>Add <code>.table-hover</code> to enable a hover state on table rows within a <code><tbody></code>.</p>
|
||||
<div class="bs-example">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Username</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<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 -->
|
||||
<h2 id="tables-hover-rows">Hover rows</h2>
|
||||
<p>Add <code>.table-hover</code> to enable a hover state on table rows within a <code><tbody></code>.</p>
|
||||
<div class="bs-example">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Username</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<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 -->
|
||||
{% highlight html %}
|
||||
<table class="table table-hover">
|
||||
...
|
||||
@ -1245,39 +1236,39 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="tables-condensed">Condensed table</h2>
|
||||
<p>Add <code>.table-condensed</code> to make tables more compact by cutting cell padding in half.</p>
|
||||
<div class="bs-example">
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Username</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<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 -->
|
||||
<h2 id="tables-condensed">Condensed table</h2>
|
||||
<p>Add <code>.table-condensed</code> to make tables more compact by cutting cell padding in half.</p>
|
||||
<div class="bs-example">
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Username</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<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 -->
|
||||
{% highlight html %}
|
||||
<table class="table table-condensed">
|
||||
...
|
||||
@ -1285,122 +1276,122 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="tables-contextual-classes">Contextual classes</h2>
|
||||
<p>Use contextual classes to color table rows or individual cells.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<colgroup>
|
||||
<col class="col-xs-1">
|
||||
<col class="col-xs-7">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Class</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>.active</code>
|
||||
</td>
|
||||
<td>Applies the hover color to a particular row or cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>.success</code>
|
||||
</td>
|
||||
<td>Indicates a successful or positive action</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>.info</code>
|
||||
</td>
|
||||
<td>Indicates a neutral informative change or action</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>.warning</code>
|
||||
</td>
|
||||
<td>Indicates a warning that might need attention</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>.danger</code>
|
||||
</td>
|
||||
<td>Indicates a dangerous or potentially negative action</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Column heading</th>
|
||||
<th>Column heading</th>
|
||||
<th>Column heading</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="active">
|
||||
<td>1</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr class="success">
|
||||
<td>3</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr class="info">
|
||||
<td>5</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>6</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr class="warning">
|
||||
<td>7</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>8</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr class="danger">
|
||||
<td>9</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /example -->
|
||||
<h2 id="tables-contextual-classes">Contextual classes</h2>
|
||||
<p>Use contextual classes to color table rows or individual cells.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<colgroup>
|
||||
<col class="col-xs-1">
|
||||
<col class="col-xs-7">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Class</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>.active</code>
|
||||
</td>
|
||||
<td>Applies the hover color to a particular row or cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>.success</code>
|
||||
</td>
|
||||
<td>Indicates a successful or positive action</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>.info</code>
|
||||
</td>
|
||||
<td>Indicates a neutral informative change or action</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>.warning</code>
|
||||
</td>
|
||||
<td>Indicates a warning that might need attention</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>.danger</code>
|
||||
</td>
|
||||
<td>Indicates a dangerous or potentially negative action</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Column heading</th>
|
||||
<th>Column heading</th>
|
||||
<th>Column heading</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="active">
|
||||
<td>1</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr class="success">
|
||||
<td>3</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr class="info">
|
||||
<td>5</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>6</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr class="warning">
|
||||
<td>7</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>8</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr class="danger">
|
||||
<td>9</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /example -->
|
||||
{% highlight html %}
|
||||
<!-- On rows -->
|
||||
<tr class="active">...</tr>
|
||||
@ -1420,99 +1411,99 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="tables-responsive">Responsive tables</h2>
|
||||
<p>Create responsive tables by wrapping any <code>.table</code> in <code>.table-responsive</code> to make them scroll horizontally up to small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.</p>
|
||||
<div class="bs-example">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
<h2 id="tables-responsive">Responsive tables</h2>
|
||||
<p>Create responsive tables by wrapping any <code>.table</code> in <code>.table-responsive</code> to make them scroll horizontally up to small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.</p>
|
||||
<div class="bs-example">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
</div><!-- /example -->
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
</div><!-- /example -->
|
||||
{% highlight html %}
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
@ -1520,43 +1511,40 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
</table>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Forms
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="forms">Forms</h1>
|
||||
</div>
|
||||
<!-- Forms
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="forms" class="page-header">Forms</h1>
|
||||
|
||||
<h2 id="forms-example">Basic example</h2>
|
||||
<p>Individual form controls automatically receive some global styling. All textual <code><input></code>, <code><textarea></code>, and <code><select></code> elements with <code>.form-control</code> are set to <code>width: 100%;</code> by default. Wrap labels and controls in <code>.form-group</code> for optimum spacing.</p>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Email address</label>
|
||||
<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="exampleInputPassword1">Password</label>
|
||||
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="exampleInputFile">File input</label>
|
||||
<input type="file" id="exampleInputFile">
|
||||
<p class="help-block">Example block-level help text here.</p>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox"> Check me out
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default">Submit</button>
|
||||
</form>
|
||||
</div><!-- /example -->
|
||||
<h2 id="forms-example">Basic example</h2>
|
||||
<p>Individual form controls automatically receive some global styling. All textual <code><input></code>, <code><textarea></code>, and <code><select></code> elements with <code>.form-control</code> are set to <code>width: 100%;</code> by default. Wrap labels and controls in <code>.form-group</code> for optimum spacing.</p>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Email address</label>
|
||||
<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="exampleInputPassword1">Password</label>
|
||||
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="exampleInputFile">File input</label>
|
||||
<input type="file" id="exampleInputFile">
|
||||
<p class="help-block">Example block-level help text here.</p>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox"> Check me out
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default">Submit</button>
|
||||
</form>
|
||||
</div><!-- /example -->
|
||||
{% highlight html %}
|
||||
<form role="form">
|
||||
<div class="form-group">
|
||||
@ -1582,34 +1570,34 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="forms-inline">Inline form</h2>
|
||||
<p>Add <code>.form-inline</code> to your <code><form></code> for left-aligned and inline-block controls. <strong>This only applies to forms within viewports that are at least 768px wide.</strong></p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Requires custom widths</h4>
|
||||
<p>Inputs, selects, and textareas are 100% wide by default in Bootstrap. To use the inline form, you'll have to set a width on the form controls used within.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Always add labels</h4>
|
||||
<p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the <code>.sr-only</code> class.</p>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<form class="form-inline" role="form">
|
||||
<div class="form-group">
|
||||
<label class="sr-only" for="exampleInputEmail2">Email address</label>
|
||||
<input type="email" class="form-control" id="exampleInputEmail2" placeholder="Enter email">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="sr-only" for="exampleInputPassword2">Password</label>
|
||||
<input type="password" class="form-control" id="exampleInputPassword2" placeholder="Password">
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox"> Remember me
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default">Sign in</button>
|
||||
</form>
|
||||
</div><!-- /example -->
|
||||
<h2 id="forms-inline">Inline form</h2>
|
||||
<p>Add <code>.form-inline</code> to your <code><form></code> for left-aligned and inline-block controls. <strong>This only applies to forms within viewports that are at least 768px wide.</strong></p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Requires custom widths</h4>
|
||||
<p>Inputs, selects, and textareas are 100% wide by default in Bootstrap. To use the inline form, you'll have to set a width on the form controls used within.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Always add labels</h4>
|
||||
<p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the <code>.sr-only</code> class.</p>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<form class="form-inline" role="form">
|
||||
<div class="form-group">
|
||||
<label class="sr-only" for="exampleInputEmail2">Email address</label>
|
||||
<input type="email" class="form-control" id="exampleInputEmail2" placeholder="Enter email">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="sr-only" for="exampleInputPassword2">Password</label>
|
||||
<input type="password" class="form-control" id="exampleInputPassword2" placeholder="Password">
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox"> Remember me
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default">Sign in</button>
|
||||
</form>
|
||||
</div><!-- /example -->
|
||||
{% highlight html %}
|
||||
<form class="form-inline" role="form">
|
||||
<div class="form-group">
|
||||
@ -1630,38 +1618,38 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="forms-horizontal">Horizontal form</h2>
|
||||
<p>Use Bootstrap's predefined grid classes to align labels and groups of form controls in a horizontal layout by adding <code>.form-horizontal</code> to the form. Doing so changes <code>.form-group</code>s to behave as grid rows, so no need for <code>.row</code>.</p>
|
||||
<div class="bs-example">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label for="inputEmail3" class="col-sm-2 control-label">Email</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="email" class="form-control" id="inputEmail3" placeholder="Email">
|
||||
<h2 id="forms-horizontal">Horizontal form</h2>
|
||||
<p>Use Bootstrap's predefined grid classes to align labels and groups of form controls in a horizontal layout by adding <code>.form-horizontal</code> to the form. Doing so changes <code>.form-group</code>s to behave as grid rows, so no need for <code>.row</code>.</p>
|
||||
<div class="bs-example">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label for="inputEmail3" class="col-sm-2 control-label">Email</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="email" class="form-control" id="inputEmail3" placeholder="Email">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputPassword3" class="col-sm-2 control-label">Password</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" id="inputPassword3" placeholder="Password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox"> Remember me
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputPassword3" class="col-sm-2 control-label">Password</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" id="inputPassword3" placeholder="Password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-default">Sign in</button>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox"> Remember me
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-default">Sign in</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
@ -1694,65 +1682,65 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="forms-controls">Supported controls</h2>
|
||||
<p>Examples of standard form controls supported in an example form layout.</p>
|
||||
<h2 id="forms-controls">Supported 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: <code>text</code>, <code>password</code>, <code>datetime</code>, <code>datetime-local</code>, <code>date</code>, <code>month</code>, <code>time</code>, <code>week</code>, <code>number</code>, <code>email</code>, <code>url</code>, <code>search</code>, <code>tel</code>, and <code>color</code>.</p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Type declaration required</h4>
|
||||
<p>Inputs will only be fully styled if their <code>type</code> is properly declared.</p>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<input type="text" class="form-control" placeholder="Text input">
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
<h3>Inputs</h3>
|
||||
<p>Most common form control, text-based input fields. Includes support for all HTML5 types: <code>text</code>, <code>password</code>, <code>datetime</code>, <code>datetime-local</code>, <code>date</code>, <code>month</code>, <code>time</code>, <code>week</code>, <code>number</code>, <code>email</code>, <code>url</code>, <code>search</code>, <code>tel</code>, and <code>color</code>.</p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Type declaration required</h4>
|
||||
<p>Inputs will only be fully styled if their <code>type</code> is properly declared.</p>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<input type="text" class="form-control" placeholder="Text input">
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<input type="text" class="form-control" placeholder="Text input">
|
||||
{% endhighlight %}
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Input groups</h4>
|
||||
<p>To add integrated text or buttons before and/or after any text-based <code><input></code>, <a href="../components/#input-groups">check out the input group component</a>.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Input groups</h4>
|
||||
<p>To add integrated text or buttons before and/or after any text-based <code><input></code>, <a href="../components/#input-groups">check out the input group component</a>.</p>
|
||||
</div>
|
||||
|
||||
<h3>Textarea</h3>
|
||||
<p>Form control which supports multiple lines of text. Change <code>rows</code> attribute as necessary.</p>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<textarea class="form-control" rows="3"></textarea>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
<h3>Textarea</h3>
|
||||
<p>Form control which supports multiple lines of text. Change <code>rows</code> attribute as necessary.</p>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<textarea class="form-control" rows="3"></textarea>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<textarea class="form-control" rows="3"></textarea>
|
||||
{% endhighlight %}
|
||||
|
||||
<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>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" value="">
|
||||
Option one is this and that—be sure to include why it's great
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<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>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
|
||||
Option two can be something else and selecting it will deselect option one
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
<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>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" value="">
|
||||
Option one is this and that—be sure to include why it's great
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<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>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
|
||||
Option two can be something else and selecting it will deselect option one
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
@ -1775,21 +1763,21 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Inline checkboxes</h4>
|
||||
<p>Use the <code>.checkbox-inline</code> or <code>.radio-inline</code> classes on a series of checkboxes or radios for controls that appear on the same line.</p>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<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>
|
||||
</div><!-- /.bs-example -->
|
||||
<h4>Inline checkboxes</h4>
|
||||
<p>Use the <code>.checkbox-inline</code> or <code>.radio-inline</code> classes on a series of checkboxes or radios for controls that appear on the same line.</p>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<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>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" id="inlineCheckbox1" value="option1"> 1
|
||||
@ -1802,27 +1790,27 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
</label>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>Selects</h3>
|
||||
<p>Use the default option, or add <code>multiple</code> to show multiple options at once.</p>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
<option>2</option>
|
||||
<option>3</option>
|
||||
<option>4</option>
|
||||
<option>5</option>
|
||||
</select>
|
||||
<br>
|
||||
<select multiple class="form-control">
|
||||
<option>1</option>
|
||||
<option>2</option>
|
||||
<option>3</option>
|
||||
<option>4</option>
|
||||
<option>5</option>
|
||||
</select>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
<h3>Selects</h3>
|
||||
<p>Use the default option, or add <code>multiple</code> to show multiple options at once.</p>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
<option>2</option>
|
||||
<option>3</option>
|
||||
<option>4</option>
|
||||
<option>5</option>
|
||||
</select>
|
||||
<br>
|
||||
<select multiple class="form-control">
|
||||
<option>1</option>
|
||||
<option>2</option>
|
||||
<option>3</option>
|
||||
<option>4</option>
|
||||
<option>5</option>
|
||||
</select>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
@ -1842,24 +1830,24 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="forms-controls-static">Static control</h2>
|
||||
<p>When you need to place plain text next to a form label within a horizontal form, use the <code>.form-control-static</code> class on a <code><p></code>.</p>
|
||||
<div class="bs-example">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">Email</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">email@example.com</p>
|
||||
</div>
|
||||
<h2 id="forms-controls-static">Static control</h2>
|
||||
<p>When you need to place plain text next to a form label within a horizontal form, use the <code>.form-control-static</code> class on a <code><p></code>.</p>
|
||||
<div class="bs-example">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">Email</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">email@example.com</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputPassword" class="col-sm-2 control-label">Password</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" id="inputPassword" placeholder="Password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputPassword" class="col-sm-2 control-label">Password</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" id="inputPassword" placeholder="Password">
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
@ -1877,66 +1865,65 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
</form>
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="forms-control-focus">Input focus</h2>
|
||||
<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>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<input class="form-control" id="focusedInput" type="text" value="Demonstrative focus state">
|
||||
</form>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Demo <code>:focus</code> state</h4>
|
||||
<p>The above example input uses custom styles in our documentation to demonstrate the <code>:focus</code> state on a <code>.form-control</code>.</p>
|
||||
</div>
|
||||
<h2 id="forms-control-focus">Input focus</h2>
|
||||
<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>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<input class="form-control" id="focusedInput" type="text" value="Demonstrative focus state">
|
||||
</form>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Demo <code>:focus</code> state</h4>
|
||||
<p>The above example input uses custom styles in our documentation to demonstrate the <code>:focus</code> state on a <code>.form-control</code>.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<h2 id="forms-control-disabled">Disabled inputs</h2>
|
||||
<p>Add the <code>disabled</code> attribute on an input to prevent user input and trigger a slightly different look.</p>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here…" disabled>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
<h2 id="forms-control-disabled">Disabled inputs</h2>
|
||||
<p>Add the <code>disabled</code> attribute on an input to prevent user input and trigger a slightly different look.</p>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here…" disabled>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here..." disabled>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="forms-disabled-fieldsets">Disabled fieldsets</h3>
|
||||
<p>Add the <code>disabled</code> attribute to a <code><fieldset></code> to disable all the controls within the <code><fieldset></code> at once.</p>
|
||||
<h3 id="forms-disabled-fieldsets">Disabled fieldsets</h3>
|
||||
<p>Add the <code>disabled</code> attribute to a <code><fieldset></code> to disable all the controls within the <code><fieldset></code> at once.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Link functionality of <code><a></code> not impacted</h4>
|
||||
<p>This class will only change the appearance of <code><a class="btn btn-default"></code> buttons, not their functionality. Use custom JavaScript to disable links here.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Link functionality of <code><a></code> not impacted</h4>
|
||||
<p>This class will only change the appearance of <code><a class="btn btn-default"></code> buttons, not their functionality. Use custom JavaScript to disable links here.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>While Bootstrap will apply these styles in all browsers, Internet Explorer 9 and below don't actually support the <code>disabled</code> attribute on a <code><fieldset></code>. Use custom JavaScript to disable the fieldset in these browsers.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>While Bootstrap will apply these styles in all browsers, Internet Explorer 9 and below don't actually support the <code>disabled</code> attribute on a <code><fieldset></code>. Use custom JavaScript to disable the fieldset in these browsers.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<fieldset disabled>
|
||||
<div class="form-group">
|
||||
<label for="disabledTextInput">Disabled input</label>
|
||||
<input type="text" id="disabledTextInput" class="form-control" placeholder="Disabled input">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="disabledSelect">Disabled select menu</label>
|
||||
<select id="disabledSelect" class="form-control">
|
||||
<option>Disabled select</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox"> Can't check this
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<fieldset disabled>
|
||||
<div class="form-group">
|
||||
<label for="disabledTextInput">Disabled input</label>
|
||||
<input type="text" id="disabledTextInput" class="form-control" placeholder="Disabled input">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="disabledSelect">Disabled select menu</label>
|
||||
<select id="disabledSelect" class="form-control">
|
||||
<option>Disabled select</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox"> Can't check this
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<form role="form">
|
||||
<fieldset disabled>
|
||||
@ -1961,25 +1948,25 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="forms-control-validation">Validation states</h2>
|
||||
<p>Bootstrap includes validation styles for error, warning, and success states on form controls. To use, add <code>.has-warning</code>, <code>.has-error</code>, or <code>.has-success</code> to the parent element. Any <code>.control-label</code>, <code>.form-control</code>, and <code>.help-block</code> within that element will receive the validation styles.</p>
|
||||
<h2 id="forms-control-validation">Validation states</h2>
|
||||
<p>Bootstrap includes validation styles for error, warning, and success states on form controls. To use, add <code>.has-warning</code>, <code>.has-error</code>, or <code>.has-success</code> to the parent element. Any <code>.control-label</code>, <code>.form-control</code>, and <code>.help-block</code> within that element will receive the validation styles.</p>
|
||||
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<div class="form-group has-success">
|
||||
<label class="control-label" for="inputSuccess1">Input with success</label>
|
||||
<input type="text" class="form-control" id="inputSuccess1">
|
||||
</div>
|
||||
<div class="form-group has-warning">
|
||||
<label class="control-label" for="inputWarning1">Input with warning</label>
|
||||
<input type="text" class="form-control" id="inputWarning1">
|
||||
</div>
|
||||
<div class="form-group has-error">
|
||||
<label class="control-label" for="inputError1">Input with error</label>
|
||||
<input type="text" class="form-control" id="inputError1">
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<div class="form-group has-success">
|
||||
<label class="control-label" for="inputSuccess1">Input with success</label>
|
||||
<input type="text" class="form-control" id="inputSuccess1">
|
||||
</div>
|
||||
<div class="form-group has-warning">
|
||||
<label class="control-label" for="inputWarning1">Input with warning</label>
|
||||
<input type="text" class="form-control" id="inputWarning1">
|
||||
</div>
|
||||
<div class="form-group has-error">
|
||||
<label class="control-label" for="inputError1">Input with error</label>
|
||||
<input type="text" class="form-control" id="inputError1">
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<div class="form-group has-success">
|
||||
<label class="control-label" for="inputSuccess1">Input with success</label>
|
||||
@ -1995,27 +1982,27 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>With optional icons</h3>
|
||||
<p>You can also add optional feedback icons with the addition of an extra class and the right icon.</p>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<div class="form-group has-success has-feedback">
|
||||
<label class="control-label" for="inputSuccess2">Input with success</label>
|
||||
<input type="text" class="form-control" id="inputSuccess2">
|
||||
<span class="glyphicon glyphicon-ok form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="form-group has-warning has-feedback">
|
||||
<label class="control-label" for="inputWarning2">Input with warning</label>
|
||||
<input type="text" class="form-control" id="inputWarning2">
|
||||
<span class="glyphicon glyphicon-warning-sign form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="form-group has-error has-feedback">
|
||||
<label class="control-label" for="inputError2">Input with error</label>
|
||||
<input type="text" class="form-control" id="inputError2">
|
||||
<span class="glyphicon glyphicon-remove form-control-feedback"></span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<h3>With optional icons</h3>
|
||||
<p>You can also add optional feedback icons with the addition of an extra class and the right icon.</p>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<div class="form-group has-success has-feedback">
|
||||
<label class="control-label" for="inputSuccess2">Input with success</label>
|
||||
<input type="text" class="form-control" id="inputSuccess2">
|
||||
<span class="glyphicon glyphicon-ok form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="form-group has-warning has-feedback">
|
||||
<label class="control-label" for="inputWarning2">Input with warning</label>
|
||||
<input type="text" class="form-control" id="inputWarning2">
|
||||
<span class="glyphicon glyphicon-warning-sign form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="form-group has-error has-feedback">
|
||||
<label class="control-label" for="inputError2">Input with error</label>
|
||||
<input type="text" class="form-control" id="inputError2">
|
||||
<span class="glyphicon glyphicon-remove form-control-feedback"></span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="form-group has-success has-feedback">
|
||||
<label class="control-label" for="inputSuccess2">Input with success</label>
|
||||
@ -2034,18 +2021,18 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<p>Optional icons also work on horizontal and inline forms.</p>
|
||||
<div class="bs-example">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group has-success has-feedback">
|
||||
<label class="control-label col-sm-3" for="inputSuccess3">Input with success</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="inputSuccess3">
|
||||
<span class="glyphicon glyphicon-ok form-control-feedback"></span>
|
||||
</div>
|
||||
<p>Optional icons also work on horizontal and inline forms.</p>
|
||||
<div class="bs-example">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group has-success has-feedback">
|
||||
<label class="control-label col-sm-3" for="inputSuccess3">Input with success</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="inputSuccess3">
|
||||
<span class="glyphicon glyphicon-ok form-control-feedback"></span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group has-success has-feedback">
|
||||
@ -2058,15 +2045,15 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
</form>
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-example">
|
||||
<form class="form-inline" role="form">
|
||||
<div class="form-group has-success has-feedback">
|
||||
<label class="control-label" for="inputSuccess4">Input with success</label>
|
||||
<input type="text" class="form-control" id="inputSuccess4">
|
||||
<span class="glyphicon glyphicon-ok form-control-feedback"></span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<form class="form-inline" role="form">
|
||||
<div class="form-group has-success has-feedback">
|
||||
<label class="control-label" for="inputSuccess4">Input with success</label>
|
||||
<input type="text" class="form-control" id="inputSuccess4">
|
||||
<span class="glyphicon glyphicon-ok form-control-feedback"></span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<form class="form-inline" role="form">
|
||||
<div class="form-group has-success has-feedback">
|
||||
@ -2078,31 +2065,30 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="forms-control-sizes">Control sizing</h2>
|
||||
<p>Set heights using classes like <code>.input-lg</code>, and set widths using grid column classes like <code>.col-lg-*</code>.</p>
|
||||
|
||||
<h2 id="forms-control-sizes">Control sizing</h2>
|
||||
<p>Set heights using classes like <code>.input-lg</code>, and set widths using grid column classes like <code>.col-lg-*</code>.</p>
|
||||
<h3>Height sizing</h3>
|
||||
<p>Create taller or shorter form controls that match button sizes.</p>
|
||||
<div class="bs-example bs-example-control-sizing">
|
||||
<form role="form">
|
||||
<div class="controls">
|
||||
<input class="form-control input-lg" type="text" placeholder=".input-lg">
|
||||
<input type="text" class="form-control" placeholder="Default input">
|
||||
<input class="form-control input-sm" type="text" placeholder=".input-sm">
|
||||
|
||||
<h3>Height sizing</h3>
|
||||
<p>Create taller or shorter form controls that match button sizes.</p>
|
||||
<div class="bs-example bs-example-control-sizing">
|
||||
<form role="form">
|
||||
<div class="controls">
|
||||
<input class="form-control input-lg" type="text" placeholder=".input-lg">
|
||||
<input type="text" class="form-control" placeholder="Default input">
|
||||
<input class="form-control input-sm" type="text" placeholder=".input-sm">
|
||||
|
||||
<select class="form-control input-lg">
|
||||
<option value="">.input-lg</option>
|
||||
</select>
|
||||
<select class="form-control">
|
||||
<option value="">Default select</option>
|
||||
</select>
|
||||
<select class="form-control input-sm">
|
||||
<option value="">.input-sm</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
<select class="form-control input-lg">
|
||||
<option value="">.input-lg</option>
|
||||
</select>
|
||||
<select class="form-control">
|
||||
<option value="">Default select</option>
|
||||
</select>
|
||||
<select class="form-control input-sm">
|
||||
<option value="">.input-sm</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<input class="form-control input-lg" type="text" placeholder=".input-lg">
|
||||
<input class="form-control" type="text" placeholder="Default input">
|
||||
@ -2113,23 +2099,23 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
<select class="form-control input-sm">...</select>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>Column sizing</h3>
|
||||
<p>Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.</p>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
<input type="text" class="form-control" placeholder=".col-xs-2">
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input type="text" class="form-control" placeholder=".col-xs-3">
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<input type="text" class="form-control" placeholder=".col-xs-4">
|
||||
</div>
|
||||
<h3>Column sizing</h3>
|
||||
<p>Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.</p>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
<input type="text" class="form-control" placeholder=".col-xs-2">
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
<div class="col-xs-3">
|
||||
<input type="text" class="form-control" placeholder=".col-xs-3">
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<input type="text" class="form-control" placeholder=".col-xs-4">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
@ -2144,40 +2130,37 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<h2 id="forms-help-text">Help text</h2>
|
||||
<p>Block level help text for form controls.</p>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<input type="text" class="form-control">
|
||||
<span class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
<h2 id="forms-help-text">Help text</h2>
|
||||
<p>Block level help text for form controls.</p>
|
||||
<div class="bs-example">
|
||||
<form role="form">
|
||||
<input type="text" class="form-control">
|
||||
<span class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<span class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Buttons
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="buttons" class="page-header">Buttons</h1>
|
||||
|
||||
<h2 id="buttons-options">Options</h2>
|
||||
<p>Use any of the available button classes to quickly create a styled button.</p>
|
||||
<div class="bs-example">
|
||||
<button type="button" class="btn btn-default">Default</button>
|
||||
<button type="button" class="btn btn-primary">Primary</button>
|
||||
<button type="button" class="btn btn-success">Success</button>
|
||||
<button type="button" class="btn btn-info">Info</button>
|
||||
<button type="button" class="btn btn-warning">Warning</button>
|
||||
<button type="button" class="btn btn-danger">Danger</button>
|
||||
<button type="button" class="btn btn-link">Link</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Buttons
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="buttons">Buttons</h1>
|
||||
</div>
|
||||
|
||||
<h2 id="buttons-options">Options</h2>
|
||||
<p>Use any of the available button classes to quickly create a styled button.</p>
|
||||
<div class="bs-example">
|
||||
<button type="button" class="btn btn-default">Default</button>
|
||||
<button type="button" class="btn btn-primary">Primary</button>
|
||||
<button type="button" class="btn btn-success">Success</button>
|
||||
<button type="button" class="btn btn-info">Info</button>
|
||||
<button type="button" class="btn btn-warning">Warning</button>
|
||||
<button type="button" class="btn btn-danger">Danger</button>
|
||||
<button type="button" class="btn btn-link">Link</button>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<!-- Standard button -->
|
||||
<button type="button" class="btn btn-default">Default</button>
|
||||
@ -2201,26 +2184,26 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
<button type="button" class="btn btn-link">Link</button>
|
||||
{% endhighlight %}
|
||||
|
||||
<h2 id="buttons-sizes">Sizes</h2>
|
||||
<p>Fancy larger or smaller buttons? Add <code>.btn-lg</code>, <code>.btn-sm</code>, or <code>.btn-xs</code> for additional sizes.</p>
|
||||
<div class="bs-example">
|
||||
<p>
|
||||
<button type="button" class="btn btn-primary btn-lg">Large button</button>
|
||||
<button type="button" class="btn btn-default btn-lg">Large button</button>
|
||||
</p>
|
||||
<p>
|
||||
<button type="button" class="btn btn-primary">Default button</button>
|
||||
<button type="button" class="btn btn-default">Default button</button>
|
||||
</p>
|
||||
<p>
|
||||
<button type="button" class="btn btn-primary btn-sm">Small button</button>
|
||||
<button type="button" class="btn btn-default btn-sm">Small button</button>
|
||||
</p>
|
||||
<p>
|
||||
<button type="button" class="btn btn-primary btn-xs">Extra small button</button>
|
||||
<button type="button" class="btn btn-default btn-xs">Extra small button</button>
|
||||
</p>
|
||||
</div>
|
||||
<h2 id="buttons-sizes">Sizes</h2>
|
||||
<p>Fancy larger or smaller buttons? Add <code>.btn-lg</code>, <code>.btn-sm</code>, or <code>.btn-xs</code> for additional sizes.</p>
|
||||
<div class="bs-example">
|
||||
<p>
|
||||
<button type="button" class="btn btn-primary btn-lg">Large button</button>
|
||||
<button type="button" class="btn btn-default btn-lg">Large button</button>
|
||||
</p>
|
||||
<p>
|
||||
<button type="button" class="btn btn-primary">Default button</button>
|
||||
<button type="button" class="btn btn-default">Default button</button>
|
||||
</p>
|
||||
<p>
|
||||
<button type="button" class="btn btn-primary btn-sm">Small button</button>
|
||||
<button type="button" class="btn btn-default btn-sm">Small button</button>
|
||||
</p>
|
||||
<p>
|
||||
<button type="button" class="btn btn-primary btn-xs">Extra small button</button>
|
||||
<button type="button" class="btn btn-default btn-xs">Extra small button</button>
|
||||
</p>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<p>
|
||||
<button type="button" class="btn btn-primary btn-lg">Large button</button>
|
||||
@ -2240,95 +2223,95 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
</p>
|
||||
{% endhighlight %}
|
||||
|
||||
<p>Create block level buttons—those that span the full width of a parent— by adding <code>.btn-block</code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="well" style="max-width: 400px; margin: 0 auto 10px;">
|
||||
<button type="button" class="btn btn-primary btn-lg btn-block">Block level button</button>
|
||||
<button type="button" class="btn btn-default btn-lg btn-block">Block level button</button>
|
||||
</div>
|
||||
<p>Create block level buttons—those that span the full width of a parent— by adding <code>.btn-block</code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="well" style="max-width: 400px; margin: 0 auto 10px;">
|
||||
<button type="button" class="btn btn-primary btn-lg btn-block">Block level button</button>
|
||||
<button type="button" class="btn btn-default btn-lg btn-block">Block level button</button>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<button type="button" class="btn btn-primary btn-lg btn-block">Block level button</button>
|
||||
<button type="button" class="btn btn-default btn-lg btn-block">Block level button</button>
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="buttons-active">Active state</h2>
|
||||
<p>Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. For <code><button></code> elements, this is done via <code>:active</code>. For <code><a></code> elements, it's done with <code>.active</code>. However, you may use <code>.active</code> <code><button></code>s should you need to replicate the active state progammatically.</p>
|
||||
<h2 id="buttons-active">Active state</h2>
|
||||
<p>Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. For <code><button></code> elements, this is done via <code>:active</code>. For <code><a></code> elements, it's done with <code>.active</code>. However, you may use <code>.active</code> <code><button></code>s should you need to replicate the active state progammatically.</p>
|
||||
|
||||
<h3>Button element</h3>
|
||||
<p>No need to add <code>:active</code> as it's a pseudo-class, but if you need to force the same appearance, go ahead and add <code>.active</code>.</p>
|
||||
<p class="bs-example">
|
||||
<button type="button" class="btn btn-primary btn-lg active">Primary button</button>
|
||||
<button type="button" class="btn btn-default btn-lg active">Button</button>
|
||||
</p>
|
||||
<h3>Button element</h3>
|
||||
<p>No need to add <code>:active</code> as it's a pseudo-class, but if you need to force the same appearance, go ahead and add <code>.active</code>.</p>
|
||||
<p class="bs-example">
|
||||
<button type="button" class="btn btn-primary btn-lg active">Primary button</button>
|
||||
<button type="button" class="btn btn-default btn-lg active">Button</button>
|
||||
</p>
|
||||
{% highlight html %}
|
||||
<button type="button" class="btn btn-primary btn-lg active">Primary button</button>
|
||||
<button type="button" class="btn btn-default btn-lg active">Button</button>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>Anchor element</h3>
|
||||
<p>Add the <code>.active</code> class to <code><a></code> buttons.</p>
|
||||
<p class="bs-example">
|
||||
<a href="#" class="btn btn-primary btn-lg active" role="button">Primary link</a>
|
||||
<a href="#" class="btn btn-default btn-lg active" role="button">Link</a>
|
||||
</p>
|
||||
<h3>Anchor element</h3>
|
||||
<p>Add the <code>.active</code> class to <code><a></code> buttons.</p>
|
||||
<p class="bs-example">
|
||||
<a href="#" class="btn btn-primary btn-lg active" role="button">Primary link</a>
|
||||
<a href="#" class="btn btn-default btn-lg active" role="button">Link</a>
|
||||
</p>
|
||||
{% highlight html %}
|
||||
<a href="#" class="btn btn-primary btn-lg active" role="button">Primary link</a>
|
||||
<a href="#" class="btn btn-default btn-lg active" role="button">Link</a>
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="buttons-disabled">Disabled state</h2>
|
||||
<p>Make buttons look unclickable by fading them back 50%.</p>
|
||||
<h2 id="buttons-disabled">Disabled state</h2>
|
||||
<p>Make buttons look unclickable by fading them back 50%.</p>
|
||||
|
||||
<h3>Button element</h3>
|
||||
<p>Add the <code>disabled</code> attribute to <code><button></code> buttons.</p>
|
||||
<p class="bs-example">
|
||||
<button type="button" class="btn btn-primary btn-lg" disabled="disabled">Primary button</button>
|
||||
<button type="button" class="btn btn-default btn-lg" disabled="disabled">Button</button>
|
||||
</p>
|
||||
<h3>Button element</h3>
|
||||
<p>Add the <code>disabled</code> attribute to <code><button></code> buttons.</p>
|
||||
<p class="bs-example">
|
||||
<button type="button" class="btn btn-primary btn-lg" disabled="disabled">Primary button</button>
|
||||
<button type="button" class="btn btn-default btn-lg" disabled="disabled">Button</button>
|
||||
</p>
|
||||
{% highlight html %}
|
||||
<button type="button" class="btn btn-lg btn-primary" disabled="disabled">Primary button</button>
|
||||
<button type="button" class="btn btn-default btn-lg" disabled="disabled">Button</button>
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>If you add the <code>disabled</code> attribute to a <code><button></code>, Internet Explorer 9 and below will render text gray with a nasty text-shadow that we cannot fix.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>If you add the <code>disabled</code> attribute to a <code><button></code>, Internet Explorer 9 and below will render text gray with a nasty text-shadow that we cannot fix.</p>
|
||||
</div>
|
||||
|
||||
<h3>Anchor element</h3>
|
||||
<p>Add the <code>.disabled</code> class to <code><a></code> buttons.</p>
|
||||
<p class="bs-example">
|
||||
<a href="#" class="btn btn-primary btn-lg disabled" role="button">Primary link</a>
|
||||
<a href="#" class="btn btn-default btn-lg disabled" role="button">Link</a>
|
||||
</p>
|
||||
<h3>Anchor element</h3>
|
||||
<p>Add the <code>.disabled</code> class to <code><a></code> buttons.</p>
|
||||
<p class="bs-example">
|
||||
<a href="#" class="btn btn-primary btn-lg disabled" role="button">Primary link</a>
|
||||
<a href="#" class="btn btn-default btn-lg disabled" role="button">Link</a>
|
||||
</p>
|
||||
{% highlight html %}
|
||||
<a href="#" class="btn btn-primary btn-lg disabled" role="button">Primary link</a>
|
||||
<a href="#" class="btn btn-default btn-lg disabled" role="button">Link</a>
|
||||
{% endhighlight %}
|
||||
<p>
|
||||
We use <code>.disabled</code> as a utility class here, similar to the common <code>.active</code> class, so no prefix is required.
|
||||
</p>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Link functionality not impacted</h4>
|
||||
<p>This class will only change the <code><a></code>'s appearance, not its functionality. Use custom JavaScript to disable links here.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Context-specific usage</h4>
|
||||
<p>While button classes can be used on <code><a></code> and <code><button></code> elements, only <code><button></code> elements are supported within our nav and navbar components.</p>
|
||||
</div>
|
||||
<p>
|
||||
We use <code>.disabled</code> as a utility class here, similar to the common <code>.active</code> class, so no prefix is required.
|
||||
</p>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Link functionality not impacted</h4>
|
||||
<p>This class will only change the <code><a></code>'s appearance, not its functionality. Use custom JavaScript to disable links here.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Context-specific usage</h4>
|
||||
<p>While button classes can be used on <code><a></code> and <code><button></code> elements, only <code><button></code> elements are supported within our nav and navbar components.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<h2 id="buttons-tags">Button tags</h2>
|
||||
<p>Use the button classes on an <code><a></code>, <code><button></code>, or <code><input></code> element.</p>
|
||||
<form class="bs-example">
|
||||
<a class="btn btn-default" href="#" role="button">Link</a>
|
||||
<button class="btn btn-default" type="submit">Button</button>
|
||||
<input class="btn btn-default" type="button" value="Input">
|
||||
<input class="btn btn-default" type="submit" value="Submit">
|
||||
</form>
|
||||
<h2 id="buttons-tags">Button tags</h2>
|
||||
<p>Use the button classes on an <code><a></code>, <code><button></code>, or <code><input></code> element.</p>
|
||||
<form class="bs-example">
|
||||
<a class="btn btn-default" href="#" role="button">Link</a>
|
||||
<button class="btn btn-default" type="submit">Button</button>
|
||||
<input class="btn btn-default" type="button" value="Input">
|
||||
<input class="btn btn-default" type="submit" value="Submit">
|
||||
</form>
|
||||
{% highlight html %}
|
||||
<a class="btn btn-default" href="#" role="button">Link</a>
|
||||
<button class="btn btn-default" type="submit">Button</button>
|
||||
@ -2336,64 +2319,59 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
<input class="btn btn-default" type="submit" value="Submit">
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Cross-browser rendering</h4>
|
||||
<p>As a best practice, <strong>we highly recommend using the <code><button></code> element whenever possible</strong> to ensure matching cross-browser rendering.</p>
|
||||
<p>Among other things, there's <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=697451">a Firefox bug</a> that prevents us from setting the <code>line-height</code> of <code><input></code>-based buttons, causing them to not exactly match the height of other buttons on Firefox.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Cross-browser rendering</h4>
|
||||
<p>As a best practice, <strong>we highly recommend using the <code><button></code> element whenever possible</strong> to ensure matching cross-browser rendering.</p>
|
||||
<p>Among other things, there's <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=697451">a Firefox bug</a> that prevents us from setting the <code>line-height</code> of <code><input></code>-based buttons, causing them to not exactly match the height of other buttons on Firefox.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Images
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="images">Images</h1>
|
||||
</div>
|
||||
<!-- Images
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="images" class="page-header">Images</h1>
|
||||
|
||||
<p>Add classes to an <code><img></code> element to easily style images in any project.</p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>Keep in mind that Internet Explorer 8 lacks support for rounded corners.</p>
|
||||
</div>
|
||||
<div class="bs-example bs-example-images">
|
||||
<img data-src="holder.js/140x140" class="img-rounded" alt="A generic square placeholder image with rounded corners">
|
||||
<img data-src="holder.js/140x140" class="img-circle" alt="A generic square placeholder image where only the portion within the circle circumscribed about said square is visible">
|
||||
<img data-src="holder.js/140x140" class="img-thumbnail" alt="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera">
|
||||
</div>
|
||||
<p>Add classes to an <code><img></code> element to easily style images in any project.</p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>Keep in mind that Internet Explorer 8 lacks support for rounded corners.</p>
|
||||
</div>
|
||||
<div class="bs-example bs-example-images">
|
||||
<img data-src="holder.js/140x140" class="img-rounded" alt="A generic square placeholder image with rounded corners">
|
||||
<img data-src="holder.js/140x140" class="img-circle" alt="A generic square placeholder image where only the portion within the circle circumscribed about said square is visible">
|
||||
<img data-src="holder.js/140x140" class="img-thumbnail" alt="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera">
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<img src="..." alt="..." class="img-rounded">
|
||||
<img src="..." alt="..." class="img-circle">
|
||||
<img src="..." alt="..." class="img-thumbnail">
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Responsive images</h4>
|
||||
<p>Looking for how to make images more responsive? <a href="#overview-responsive-images">Check out the responsive images section</a> up top.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Responsive images</h4>
|
||||
<p>Looking for how to make images more responsive? <a href="#overview-responsive-images">Check out the responsive images section</a> up top.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Helpers
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="helper-classes">Helper classes</h1>
|
||||
</div>
|
||||
|
||||
<h3 id="helper-classes-colors">Contextual colors</h3>
|
||||
<p>Convey meaning through color with a handful of emphasis utility classes. These may also be applied to links and will darken on hover just like our default link styles.</p>
|
||||
<div class="bs-example">
|
||||
<p class="text-muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p>
|
||||
<p class="text-primary">Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
<p class="text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>
|
||||
<p class="text-info">Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
|
||||
<p class="text-warning">Etiam porta sem malesuada magna mollis euismod.</p>
|
||||
<p class="text-danger">Donec ullamcorper nulla non metus auctor fringilla.</p>
|
||||
</div>
|
||||
<!-- Helpers
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="helper-classes" class="page-header">Helper classes</h1>
|
||||
|
||||
<h3 id="helper-classes-colors">Contextual colors</h3>
|
||||
<p>Convey meaning through color with a handful of emphasis utility classes. These may also be applied to links and will darken on hover just like our default link styles.</p>
|
||||
<div class="bs-example">
|
||||
<p class="text-muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p>
|
||||
<p class="text-primary">Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
<p class="text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>
|
||||
<p class="text-info">Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
|
||||
<p class="text-warning">Etiam porta sem malesuada magna mollis euismod.</p>
|
||||
<p class="text-danger">Donec ullamcorper nulla non metus auctor fringilla.</p>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<p class="text-muted">...</p>
|
||||
<p class="text-primary">...</p>
|
||||
@ -2402,20 +2380,20 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
<p class="text-warning">...</p>
|
||||
<p class="text-danger">...</p>
|
||||
{% endhighlight %}
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Dealing with specificity</h4>
|
||||
<p>Sometimes emphasis classes cannot be applied due to the specificity of another selector. In most cases, a sufficient workaround is to wrap your text in a <code><span></code> with the class.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Dealing with specificity</h4>
|
||||
<p>Sometimes emphasis classes cannot be applied due to the specificity of another selector. In most cases, a sufficient workaround is to wrap your text in a <code><span></code> with the class.</p>
|
||||
</div>
|
||||
|
||||
<h3 id="helper-classes-backgrounds">Contextual backgrounds</h3>
|
||||
<p>Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes.</p>
|
||||
<div class="bs-example bs-example-bg-classes">
|
||||
<p class="bg-primary">Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
<p class="bg-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>
|
||||
<p class="bg-info">Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
|
||||
<p class="bg-warning">Etiam porta sem malesuada magna mollis euismod.</p>
|
||||
<p class="bg-danger">Donec ullamcorper nulla non metus auctor fringilla.</p>
|
||||
</div>
|
||||
<h3 id="helper-classes-backgrounds">Contextual backgrounds</h3>
|
||||
<p>Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes.</p>
|
||||
<div class="bs-example bs-example-bg-classes">
|
||||
<p class="bg-primary">Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
<p class="bg-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>
|
||||
<p class="bg-info">Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
|
||||
<p class="bg-warning">Etiam porta sem malesuada magna mollis euismod.</p>
|
||||
<p class="bg-danger">Donec ullamcorper nulla non metus auctor fringilla.</p>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<p class="bg-primary">...</p>
|
||||
<p class="bg-success">...</p>
|
||||
@ -2425,28 +2403,28 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h3 id="helper-classes-close">Close icon</h3>
|
||||
<p>Use the generic close icon for dismissing content like modals and alerts.</p>
|
||||
<div class="bs-example">
|
||||
<p><button type="button" class="close" aria-hidden="true">×</button></p>
|
||||
</div>
|
||||
<h3 id="helper-classes-close">Close icon</h3>
|
||||
<p>Use the generic close icon for dismissing content like modals and alerts.</p>
|
||||
<div class="bs-example">
|
||||
<p><button type="button" class="close" aria-hidden="true">×</button></p>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<button type="button" class="close" aria-hidden="true">×</button>
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h3 id="helper-classes-carets">Carets</h3>
|
||||
<p>Use carets to indicate dropdown functionality and direction. Note that the default caret will reverse automatically in <a href="../components/#btn-dropdowns-dropup">dropup menus</a>.</p>
|
||||
<div class="bs-example">
|
||||
<span class="caret"></span>
|
||||
</div>
|
||||
<h3 id="helper-classes-carets">Carets</h3>
|
||||
<p>Use carets to indicate dropdown functionality and direction. Note that the default caret will reverse automatically in <a href="../components/#btn-dropdowns-dropup">dropup menus</a>.</p>
|
||||
<div class="bs-example">
|
||||
<span class="caret"></span>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<span class="caret"></span>
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h3 id="helper-classes-floats">Quick floats</h3>
|
||||
<p>Float an element to the left or right with a class. <code>!important</code> is included to avoid specificity issues. Classes can also be used as mixins.</p>
|
||||
<h3 id="helper-classes-floats">Quick floats</h3>
|
||||
<p>Float an element to the left or right with a class. <code>!important</code> is included to avoid specificity issues. Classes can also be used as mixins.</p>
|
||||
{% highlight html %}
|
||||
<div class="pull-left">...</div>
|
||||
<div class="pull-right">...</div>
|
||||
@ -2469,14 +2447,14 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Not for use in navbars</h4>
|
||||
<p>To align components in navbars with utility classes, use <code>.navbar-left</code> or <code>.navbar-right</code> instead. <a href="../components/#navbar-component-alignment">See the navbar docs</a> for details.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Not for use in navbars</h4>
|
||||
<p>To align components in navbars with utility classes, use <code>.navbar-left</code> or <code>.navbar-right</code> instead. <a href="../components/#navbar-component-alignment">See the navbar docs</a> for details.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<h3 id="helper-classes-center">Center content blocks</h3>
|
||||
<p>Set an element to <code>display: block</code> and center via <code>margin</code>. Available as a mixin and class.</p>
|
||||
<h3 id="helper-classes-center">Center content blocks</h3>
|
||||
<p>Set an element to <code>display: block</code> and center via <code>margin</code>. Available as a mixin and class.</p>
|
||||
{% highlight html %}
|
||||
<div class="center-block">...</div>
|
||||
{% endhighlight %}
|
||||
@ -2495,9 +2473,8 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
|
||||
<h3 id="helper-classes-clearfix">Clearfix</h3>
|
||||
<p>Clear the <code>float</code> on any element with the <code>.clearfix</code> class. Utilizes <a href="http://nicolasgallagher.com/micro-clearfix-hack/">the micro clearfix</a> as popularized by Nicolas Gallagher. Can also be used as a mixin.</p>
|
||||
<h3 id="helper-classes-clearfix">Clearfix</h3>
|
||||
<p>Clear the <code>float</code> on any element with the <code>.clearfix</code> class. Utilizes <a href="http://nicolasgallagher.com/micro-clearfix-hack/">the micro clearfix</a> as popularized by Nicolas Gallagher. Can also be used as a mixin.</p>
|
||||
{% highlight html %}
|
||||
<!-- Usage as a class -->
|
||||
<div class="clearfix">...</div>
|
||||
@ -2522,10 +2499,10 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h3 id="helper-classes-show-hide">Showing and hiding content</h3>
|
||||
<p>Force an element to be shown or hidden (<strong>including for screen readers</strong>) with the use of <code>.show</code> and <code>.hidden</code> classes. These classes use <code>!important</code> to avoid specificity conflicts, just like the <a href="#helper-classes-floats">quick floats</a>. They are only available for block level toggling. They can also be used as mixins.</p>
|
||||
<p><code>.hide</code> is available, but it does not always affect screen readers and is <strong>deprecated</strong> as of v3.0.1. Use <code>.hidden</code> or <code>.sr-only</code> instead.</p>
|
||||
<p>Furthermore, <code>.invisible</code> can be used to toggle only the visibility of an element, meaning its <code>display</code> is not modified and the element can still affect the flow of the document.</p>
|
||||
<h3 id="helper-classes-show-hide">Showing and hiding content</h3>
|
||||
<p>Force an element to be shown or hidden (<strong>including for screen readers</strong>) with the use of <code>.show</code> and <code>.hidden</code> classes. These classes use <code>!important</code> to avoid specificity conflicts, just like the <a href="#helper-classes-floats">quick floats</a>. They are only available for block level toggling. They can also be used as mixins.</p>
|
||||
<p><code>.hide</code> is available, but it does not always affect screen readers and is <strong>deprecated</strong> as of v3.0.1. Use <code>.hidden</code> or <code>.sr-only</code> instead.</p>
|
||||
<p>Furthermore, <code>.invisible</code> can be used to toggle only the visibility of an element, meaning its <code>display</code> is not modified and the element can still affect the flow of the document.</p>
|
||||
{% highlight html %}
|
||||
<div class="show">...</div>
|
||||
<div class="hidden">...</div>
|
||||
@ -2553,8 +2530,8 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h3 id="helper-classes-screen-readers">Screen reader content</h3>
|
||||
<p>Hide an element to all devices <strong>except screen readers</strong> with <code>.sr-only</code>. Necessary for following <a href="../getting-started/#accessibility">accessibility best practices</a>. Can also be used as a mixin.</p>
|
||||
<h3 id="helper-classes-screen-readers">Screen reader content</h3>
|
||||
<p>Hide an element to all devices <strong>except screen readers</strong> with <code>.sr-only</code>. Necessary for following <a href="../getting-started/#accessibility">accessibility best practices</a>. Can also be used as a mixin.</p>
|
||||
{% highlight html %}
|
||||
<a class="sr-only" href="#content">Skip to main content</a>
|
||||
{% endhighlight %}
|
||||
@ -2566,8 +2543,8 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h3 id="helper-classes-image-replacement">Image replacement</h3>
|
||||
<p>Utilize the <code>.text-hide</code> class or mixin to help replace an element's text content with a background image.</p>
|
||||
<h3 id="helper-classes-image-replacement">Image replacement</h3>
|
||||
<p>Utilize the <code>.text-hide</code> class or mixin to help replace an element's text content with a background image.</p>
|
||||
{% highlight html %}
|
||||
<h1 class="text-hide">Custom heading</h1>
|
||||
{% endhighlight %}
|
||||
@ -2577,272 +2554,269 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
.text-hide();
|
||||
}
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Responsive utilities
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="responsive-utilities" class="page-header">Responsive utilities</h1>
|
||||
|
||||
<p class="lead">For faster mobile-friendly development, use these utility classes for showing and hiding content by device via media query. Also included are utility classes for toggling content when printed.</p>
|
||||
<p>Try to use these on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation. <strong>Responsive utilities are currently only available for block and table toggling.</strong> Use with inline and table elements is currently not supported.</p>
|
||||
|
||||
|
||||
<h2 id="responsive-utilities-classes">Available classes</h2>
|
||||
<p>Use a single or combination of the available classes for toggling content across viewport breakpoints.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped responsive-utilities">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>
|
||||
Extra small devices
|
||||
<small>Phones (<768px)</small>
|
||||
</th>
|
||||
<th>
|
||||
Small devices
|
||||
<small>Tablets (≥768px)</small>
|
||||
</th>
|
||||
<th>
|
||||
Medium devices
|
||||
<small>Desktops (≥992px)</small>
|
||||
</th>
|
||||
<th>
|
||||
Large devices
|
||||
<small>Desktops (≥1200px)</small>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><code>.visible-xs</code></th>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.visible-sm</code></th>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.visible-md</code></th>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.visible-lg</code></th>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><code>.hidden-xs</code></th>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.hidden-sm</code></th>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.hidden-md</code></th>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.hidden-lg</code></th>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Responsive utilities
|
||||
================================================== -->
|
||||
<div class="bs-docs-section" id="responsive-utilities">
|
||||
<div class="page-header">
|
||||
<h1>Responsive utilities</h1>
|
||||
</div>
|
||||
<p class="lead">For faster mobile-friendly development, use these utility classes for showing and hiding content by device via media query. Also included are utility classes for toggling content when printed.</p>
|
||||
<p>Try to use these on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation. <strong>Responsive utilities are currently only available for block and table toggling.</strong> Use with inline and table elements is currently not supported.</p>
|
||||
|
||||
|
||||
<h2 id="responsive-utilities-classes">Available classes</h2>
|
||||
<p>Use a single or combination of the available classes for toggling content across viewport breakpoints.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped responsive-utilities">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>
|
||||
Extra small devices
|
||||
<small>Phones (<768px)</small>
|
||||
</th>
|
||||
<th>
|
||||
Small devices
|
||||
<small>Tablets (≥768px)</small>
|
||||
</th>
|
||||
<th>
|
||||
Medium devices
|
||||
<small>Desktops (≥992px)</small>
|
||||
</th>
|
||||
<th>
|
||||
Large devices
|
||||
<small>Desktops (≥1200px)</small>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><code>.visible-xs</code></th>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.visible-sm</code></th>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.visible-md</code></th>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.visible-lg</code></th>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><code>.hidden-xs</code></th>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.hidden-sm</code></th>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.hidden-md</code></th>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.hidden-lg</code></th>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<h2 id="responsive-utilities-print">Print classes</h2>
|
||||
<p>Similar to the regular responsive classes, use these for toggling content for print.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped responsive-utilities">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Class</th>
|
||||
<th>Browser</th>
|
||||
<th>Print</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><code>.visible-print</code></th>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.hidden-print</code></th>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<h2 id="responsive-utilities-tests">Test cases</h2>
|
||||
<p>Resize your browser or load on different devices to test the responsive utility classes.</p>
|
||||
|
||||
<h3>Visible on...</h3>
|
||||
<p>Green checkmarks indicate the element <strong>is visible</strong> in your current viewport.</p>
|
||||
<div class="row responsive-utilities-test visible-on">
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<span class="hidden-xs">Extra small</span>
|
||||
<span class="visible-xs">✔ Visible on x-small</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<span class="hidden-sm">Small</span>
|
||||
<span class="visible-sm">✔ Visible on small</span>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<span class="hidden-md">Medium</span>
|
||||
<span class="visible-md">✔ Visible on medium</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<span class="hidden-lg">Large</span>
|
||||
<span class="visible-lg">✔ Visible on large</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row responsive-utilities-test visible-on">
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-xs hidden-sm">Extra small and small</span>
|
||||
<span class="visible-xs visible-sm">✔ Visible on x-small and small</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-md hidden-lg">Medium and large</span>
|
||||
<span class="visible-md visible-lg">✔ Visible on medium and large</span>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-xs hidden-md">Extra small and medium</span>
|
||||
<span class="visible-xs visible-md">✔ Visible on x-small and medium</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-sm hidden-lg">Small and large</span>
|
||||
<span class="visible-sm visible-lg">✔ Visible on small and large</span>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-xs hidden-lg">Extra small and large</span>
|
||||
<span class="visible-xs visible-lg">✔ Visible on x-small and large</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-sm hidden-md">Small and medium</span>
|
||||
<span class="visible-sm visible-md">✔ Visible on small and medium</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Hidden on...</h3>
|
||||
<p>Here, green checkmarks also indicate the element <strong>is hidden</strong> in your current viewport.</p>
|
||||
<div class="row responsive-utilities-test hidden-on">
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<span class="hidden-xs">Extra small</span>
|
||||
<span class="visible-xs">✔ Hidden on x-small</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<span class="hidden-sm">Small</span>
|
||||
<span class="visible-sm">✔ Hidden on small</span>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<span class="hidden-md">Medium</span>
|
||||
<span class="visible-md">✔ Hidden on medium</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<span class="hidden-lg">Large</span>
|
||||
<span class="visible-lg">✔ Hidden on large</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row responsive-utilities-test hidden-on">
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-xs hidden-sm">Extra small and small</span>
|
||||
<span class="visible-xs visible-sm">✔ Hidden on x-small and small</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-md hidden-lg">Medium and large</span>
|
||||
<span class="visible-md visible-lg">✔ Hidden on medium and large</span>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-xs hidden-md">Extra small and medium</span>
|
||||
<span class="visible-xs visible-md">✔ Hidden on x-small and medium</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-sm hidden-lg">Small and large</span>
|
||||
<span class="visible-sm visible-lg">✔ Hidden on small and large</span>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-xs hidden-lg">Extra small and large</span>
|
||||
<span class="visible-xs visible-lg">✔ Hidden on x-small and large</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-sm hidden-md">Small and medium</span>
|
||||
<span class="visible-sm visible-md">✔ Hidden on small and medium</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 id="responsive-utilities-print">Print classes</h2>
|
||||
<p>Similar to the regular responsive classes, use these for toggling content for print.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped responsive-utilities">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Class</th>
|
||||
<th>Browser</th>
|
||||
<th>Print</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><code>.visible-print</code></th>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.hidden-print</code></th>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<h2 id="responsive-utilities-tests">Test cases</h2>
|
||||
<p>Resize your browser or load on different devices to test the responsive utility classes.</p>
|
||||
|
||||
<!-- Using Less
|
||||
================================================== -->
|
||||
<div class="bs-docs-section" id="less">
|
||||
<div class="page-header">
|
||||
<h1>Using Less</h1>
|
||||
<h3>Visible on...</h3>
|
||||
<p>Green checkmarks indicate the element <strong>is visible</strong> in your current viewport.</p>
|
||||
<div class="row responsive-utilities-test visible-on">
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<span class="hidden-xs">Extra small</span>
|
||||
<span class="visible-xs">✔ Visible on x-small</span>
|
||||
</div>
|
||||
<p class="lead">Bootstrap's CSS is built on Less, a preprocessor with additional functionality like variables, mixins, and functions for compiling CSS. Those looking to use the source Less files instead of our compiled CSS files can make use of the numerous variables and mixins we use throughout the framework.</p>
|
||||
|
||||
<p>Grid variables and mixins are covered <a href="#grid-less">within the Grid system section</a>.</p>
|
||||
|
||||
|
||||
<h2 id="less-bootstrap">Compiling Bootstrap</h2>
|
||||
<p>Bootstrap can be used in at least two ways: with the compiled CSS or with the source LESS files. To compile the LESS files, <a href="https://github.com/twbs/bootstrap#compiling-css-and-javascript">visit the README</a> for how to setup your development environment to run the necessary commands.</p>
|
||||
<p>Third party compilation tools may work with Bootstrap, but they are not supported by our core team.</p>
|
||||
|
||||
<h2 id="less-variables">Variables</h2>
|
||||
<p>Variables are used throughout the entire project as a way to centralize and share commonly used values like colors, spacing, or font stacks. For a complete breakdown, please see <a href="../customize/#less-variables-section">the Customizer</a>.</p>
|
||||
|
||||
<h3 id="less-variables-colors">Colors</h3>
|
||||
<p>Easily make use of two color schemes: grayscale and semantic. Grayscale colors provide quick access to commonly used shades of black while semantic include various colors assigned to meaningful contextual values.</p>
|
||||
<div class="bs-example">
|
||||
<div class="color-swatches">
|
||||
<div class="color-swatch gray-darker"></div>
|
||||
<div class="color-swatch gray-dark"></div>
|
||||
<div class="color-swatch gray"></div>
|
||||
<div class="color-swatch gray-light"></div>
|
||||
<div class="color-swatch gray-lighter"></div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<span class="hidden-sm">Small</span>
|
||||
<span class="visible-sm">✔ Visible on small</span>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<span class="hidden-md">Medium</span>
|
||||
<span class="visible-md">✔ Visible on medium</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<span class="hidden-lg">Large</span>
|
||||
<span class="visible-lg">✔ Visible on large</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row responsive-utilities-test visible-on">
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-xs hidden-sm">Extra small and small</span>
|
||||
<span class="visible-xs visible-sm">✔ Visible on x-small and small</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-md hidden-lg">Medium and large</span>
|
||||
<span class="visible-md visible-lg">✔ Visible on medium and large</span>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-xs hidden-md">Extra small and medium</span>
|
||||
<span class="visible-xs visible-md">✔ Visible on x-small and medium</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-sm hidden-lg">Small and large</span>
|
||||
<span class="visible-sm visible-lg">✔ Visible on small and large</span>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-xs hidden-lg">Extra small and large</span>
|
||||
<span class="visible-xs visible-lg">✔ Visible on x-small and large</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-sm hidden-md">Small and medium</span>
|
||||
<span class="visible-sm visible-md">✔ Visible on small and medium</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Hidden on...</h3>
|
||||
<p>Here, green checkmarks also indicate the element <strong>is hidden</strong> in your current viewport.</p>
|
||||
<div class="row responsive-utilities-test hidden-on">
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<span class="hidden-xs">Extra small</span>
|
||||
<span class="visible-xs">✔ Hidden on x-small</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<span class="hidden-sm">Small</span>
|
||||
<span class="visible-sm">✔ Hidden on small</span>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<span class="hidden-md">Medium</span>
|
||||
<span class="visible-md">✔ Hidden on medium</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<span class="hidden-lg">Large</span>
|
||||
<span class="visible-lg">✔ Hidden on large</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row responsive-utilities-test hidden-on">
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-xs hidden-sm">Extra small and small</span>
|
||||
<span class="visible-xs visible-sm">✔ Hidden on x-small and small</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-md hidden-lg">Medium and large</span>
|
||||
<span class="visible-md visible-lg">✔ Hidden on medium and large</span>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-xs hidden-md">Extra small and medium</span>
|
||||
<span class="visible-xs visible-md">✔ Hidden on x-small and medium</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-sm hidden-lg">Small and large</span>
|
||||
<span class="visible-sm visible-lg">✔ Hidden on small and large</span>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-xs hidden-lg">Extra small and large</span>
|
||||
<span class="visible-xs visible-lg">✔ Hidden on x-small and large</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<span class="hidden-sm hidden-md">Small and medium</span>
|
||||
<span class="visible-sm visible-md">✔ Hidden on small and medium</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Using Less
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="less" class="page-header">Using Less</h1>
|
||||
|
||||
<p class="lead">Bootstrap's CSS is built on Less, a preprocessor with additional functionality like variables, mixins, and functions for compiling CSS. Those looking to use the source Less files instead of our compiled CSS files can make use of the numerous variables and mixins we use throughout the framework.</p>
|
||||
|
||||
<p>Grid variables and mixins are covered <a href="#grid-less">within the Grid system section</a>.</p>
|
||||
|
||||
|
||||
<h2 id="less-bootstrap">Compiling Bootstrap</h2>
|
||||
<p>Bootstrap can be used in at least two ways: with the compiled CSS or with the source LESS files. To compile the LESS files, <a href="https://github.com/twbs/bootstrap#compiling-css-and-javascript">visit the README</a> for how to setup your development environment to run the necessary commands.</p>
|
||||
<p>Third party compilation tools may work with Bootstrap, but they are not supported by our core team.</p>
|
||||
|
||||
<h2 id="less-variables">Variables</h2>
|
||||
<p>Variables are used throughout the entire project as a way to centralize and share commonly used values like colors, spacing, or font stacks. For a complete breakdown, please see <a href="../customize/#less-variables-section">the Customizer</a>.</p>
|
||||
|
||||
<h3 id="less-variables-colors">Colors</h3>
|
||||
<p>Easily make use of two color schemes: grayscale and semantic. Grayscale colors provide quick access to commonly used shades of black while semantic include various colors assigned to meaningful contextual values.</p>
|
||||
<div class="bs-example">
|
||||
<div class="color-swatches">
|
||||
<div class="color-swatch gray-darker"></div>
|
||||
<div class="color-swatch gray-dark"></div>
|
||||
<div class="color-swatch gray"></div>
|
||||
<div class="color-swatch gray-light"></div>
|
||||
<div class="color-swatch gray-lighter"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight css %}
|
||||
@gray-darker: lighten(#000, 13.5%); // #222
|
||||
@gray-dark: lighten(#000, 20%); // #333
|
||||
@ -2851,15 +2825,15 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
@gray-lighter: lighten(#000, 93.5%); // #eee
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="color-swatches">
|
||||
<div class="color-swatch brand-primary"></div>
|
||||
<div class="color-swatch brand-success"></div>
|
||||
<div class="color-swatch brand-info"></div>
|
||||
<div class="color-swatch brand-warning"></div>
|
||||
<div class="color-swatch brand-danger"></div>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<div class="color-swatches">
|
||||
<div class="color-swatch brand-primary"></div>
|
||||
<div class="color-swatch brand-success"></div>
|
||||
<div class="color-swatch brand-info"></div>
|
||||
<div class="color-swatch brand-warning"></div>
|
||||
<div class="color-swatch brand-danger"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight css %}
|
||||
@brand-primary: #428bca;
|
||||
@brand-success: #5cb85c;
|
||||
@ -2868,7 +2842,7 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
@brand-danger: #d9534f;
|
||||
{% endhighlight %}
|
||||
|
||||
<p>Use any of these color variables as they are or reassign them to more meaningful variables for your project.</p>
|
||||
<p>Use any of these color variables as they are or reassign them to more meaningful variables for your project.</p>
|
||||
{% highlight css %}
|
||||
// Use as-is
|
||||
.masthead {
|
||||
@ -2882,16 +2856,16 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-variables-scaffolding">Scaffolding</h3>
|
||||
<p>A handful of variables for quickly customizing key elements of your site's skeleton.</p>
|
||||
<h3 id="less-variables-scaffolding">Scaffolding</h3>
|
||||
<p>A handful of variables for quickly customizing key elements of your site's skeleton.</p>
|
||||
{% highlight css %}
|
||||
// Scaffolding
|
||||
@body-bg: #fff;
|
||||
@text-color: @black-50;
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-variables-links">Links</h3>
|
||||
<p>Easily style your links with the right color with only one value.</p>
|
||||
<h3 id="less-variables-links">Links</h3>
|
||||
<p>Easily style your links with the right color with only one value.</p>
|
||||
{% highlight css %}
|
||||
// Variables
|
||||
@link-color: @brand-primary;
|
||||
@ -2908,10 +2882,10 @@ a {
|
||||
}
|
||||
}
|
||||
{% endhighlight %}
|
||||
<p>Note that the <code>@link-color-hover</code> uses a function, another awesome tool from Less, to automagically create the right hover color. You can use <code>darken</code>, <code>lighten</code>, <code>saturate</code>, and <code>desaturate</code>.</p>
|
||||
<p>Note that the <code>@link-color-hover</code> uses a function, another awesome tool from Less, to automagically create the right hover color. You can use <code>darken</code>, <code>lighten</code>, <code>saturate</code>, and <code>desaturate</code>.</p>
|
||||
|
||||
<h3 id="less-variables-typography">Typography</h3>
|
||||
<p>Easily set your type face, text size, leading, and more with a few quick variables. Bootstrap makes use of these as well to provide easy typographic mixins.</p>
|
||||
<h3 id="less-variables-typography">Typography</h3>
|
||||
<p>Easily set your type face, text size, leading, and more with a few quick variables. Bootstrap makes use of these as well to provide easy typographic mixins.</p>
|
||||
{% highlight css %}
|
||||
@font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
@font-family-serif: Georgia, "Times New Roman", Times, serif;
|
||||
@ -2938,15 +2912,15 @@ a {
|
||||
@headings-color: inherit;
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-variables-icons">Icons</h3>
|
||||
<p>Two quick variables for customizing the location and filename of your icons.</p>
|
||||
<h3 id="less-variables-icons">Icons</h3>
|
||||
<p>Two quick variables for customizing the location and filename of your icons.</p>
|
||||
{% highlight css %}
|
||||
@icon-font-path: "../fonts/";
|
||||
@icon-font-name: "glyphicons-halflings-regular";
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-variables-components">Components</h3>
|
||||
<p>Components throughout Bootstrap make use of some default variables for setting common values. Here are the most commonly used.</p>
|
||||
<h3 id="less-variables-components">Components</h3>
|
||||
<p>Components throughout Bootstrap make use of some default variables for setting common values. Here are the most commonly used.</p>
|
||||
{% highlight css %}
|
||||
@padding-base-vertical: 6px;
|
||||
@padding-base-horizontal: 12px;
|
||||
@ -2975,12 +2949,12 @@ a {
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="less-mixins-vendor">Vendor mixins</h2>
|
||||
<p>Vendor mixins are mixins to help support multiple browsers by including all relevant vendor prefixs in your compiled CSS.</p>
|
||||
<h2 id="less-mixins-vendor">Vendor mixins</h2>
|
||||
<p>Vendor mixins are mixins to help support multiple browsers by including all relevant vendor prefixs in your compiled CSS.</p>
|
||||
|
||||
|
||||
<h3 id="less-mixins-box-sizing">Box-sizing</h3>
|
||||
<p>Reset your components' box model with a single mixin. For context, see this <a href="https://developer.mozilla.org/en-US/docs/CSS/box-sizing" target="_blank">helpful article from Mozilla</a>.</p>
|
||||
<h3 id="less-mixins-box-sizing">Box-sizing</h3>
|
||||
<p>Reset your components' box model with a single mixin. For context, see this <a href="https://developer.mozilla.org/en-US/docs/CSS/box-sizing" target="_blank">helpful article from Mozilla</a>.</p>
|
||||
{% highlight css %}
|
||||
.box-sizing(@box-model) {
|
||||
-webkit-box-sizing: @box-model; // Safari <= 5
|
||||
@ -2989,8 +2963,8 @@ a {
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-mixins-rounded-corners">Rounded corners</h3>
|
||||
<p>Today all modern browsers support the non-prefixed <code>border-radius</code> property. As such, there is no <code>.border-radius()</code> mixin, but Bootstrap does include shortcuts for quickly rounding two corners on a particular side of an object.</p>
|
||||
<h3 id="less-mixins-rounded-corners">Rounded corners</h3>
|
||||
<p>Today all modern browsers support the non-prefixed <code>border-radius</code> property. As such, there is no <code>.border-radius()</code> mixin, but Bootstrap does include shortcuts for quickly rounding two corners on a particular side of an object.</p>
|
||||
{% highlight css %}
|
||||
.border-top-radius(@radius) {
|
||||
border-top-right-radius: @radius;
|
||||
@ -3010,9 +2984,9 @@ a {
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-mixins-box-shadow">Box (Drop) shadows</h3>
|
||||
<p>If your target audience is using the latest and greatest browsers and devices, be sure to just use the <code>box-shadow</code> property on its own. If you need support for older Android (pre-v4) and iOS devices (pre-iOS 5), use the mixin to pick up the required <code>-webkit</code> prefix.</p>
|
||||
<p>Be sure to use <code>rgba()</code> colors in your box shadows so they blend as seamlessly as possible with backgrounds.</p>
|
||||
<h3 id="less-mixins-box-shadow">Box (Drop) shadows</h3>
|
||||
<p>If your target audience is using the latest and greatest browsers and devices, be sure to just use the <code>box-shadow</code> property on its own. If you need support for older Android (pre-v4) and iOS devices (pre-iOS 5), use the mixin to pick up the required <code>-webkit</code> prefix.</p>
|
||||
<p>Be sure to use <code>rgba()</code> colors in your box shadows so they blend as seamlessly as possible with backgrounds.</p>
|
||||
{% highlight css %}
|
||||
.box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) {
|
||||
-webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1
|
||||
@ -3020,8 +2994,8 @@ a {
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-mixins-transitions">Transitions</h3>
|
||||
<p>Three mixins for flexibility. Set all transition information with one, or specify a separate delay and duration as needed.</p>
|
||||
<h3 id="less-mixins-transitions">Transitions</h3>
|
||||
<p>Three mixins for flexibility. Set all transition information with one, or specify a separate delay and duration as needed.</p>
|
||||
{% highlight css %}
|
||||
.transition(@transition) {
|
||||
-webkit-transition: @transition;
|
||||
@ -3047,8 +3021,8 @@ a {
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-mixins-transformations">Transformations</h3>
|
||||
<p>Rorate, scale, translate (move), or skew any object.</p>
|
||||
<h3 id="less-mixins-transformations">Transformations</h3>
|
||||
<p>Rorate, scale, translate (move), or skew any object.</p>
|
||||
{% highlight css %}
|
||||
.rotate(@degrees) {
|
||||
-webkit-transform: rotate(@degrees);
|
||||
@ -3103,8 +3077,8 @@ a {
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-mixins-animations">Animations</h3>
|
||||
<p>A single mixin for using all CSS3's animation properties in one declarations and other mixins for individual properties.</p>
|
||||
<h3 id="less-mixins-animations">Animations</h3>
|
||||
<p>A single mixin for using all CSS3's animation properties in one declarations and other mixins for individual properties.</p>
|
||||
{% highlight css %}
|
||||
.animation(@animation) {
|
||||
-webkit-animation: @animation;
|
||||
@ -3136,8 +3110,8 @@ a {
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-mixins-opacity">Opacity</h3>
|
||||
<p>Set the opacity for all browsers and provide a <code>filter</code> fallback for IE8.</p>
|
||||
<h3 id="less-mixins-opacity">Opacity</h3>
|
||||
<p>Set the opacity for all browsers and provide a <code>filter</code> fallback for IE8.</p>
|
||||
{% highlight css %}
|
||||
.opacity(@opacity) {
|
||||
opacity: @opacity;
|
||||
@ -3147,8 +3121,8 @@ a {
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-mixins-placeholder">Placeholder text</h3>
|
||||
<p>Provide context for form controls within each field.</p>
|
||||
<h3 id="less-mixins-placeholder">Placeholder text</h3>
|
||||
<p>Provide context for form controls within each field.</p>
|
||||
{% highlight css %}
|
||||
.placeholder(@color: @input-color-placeholder) {
|
||||
&:-moz-placeholder { color: @color; } // Firefox 4-18
|
||||
@ -3158,8 +3132,8 @@ a {
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-mixins-columns">Columns</h3>
|
||||
<p>Generate columns via CSS within a single element.</p>
|
||||
<h3 id="less-mixins-columns">Columns</h3>
|
||||
<p>Generate columns via CSS within a single element.</p>
|
||||
{% highlight css %}
|
||||
.content-columns(@width; @count; @gap) {
|
||||
-webkit-column-width: @width;
|
||||
@ -3174,34 +3148,34 @@ a {
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-mixins-gradients">Gradients</h3>
|
||||
<p>Easily turn any two colors into a background gradient. Get more advanced and set a direction, use three colors, or use a radial gradient. With a single mixin you get all the prefixed syntaxes you'll need.</p>
|
||||
<h3 id="less-mixins-gradients">Gradients</h3>
|
||||
<p>Easily turn any two colors into a background gradient. Get more advanced and set a direction, use three colors, or use a radial gradient. With a single mixin you get all the prefixed syntaxes you'll need.</p>
|
||||
{% highlight css %}
|
||||
#gradient > .vertical(#333; #000);
|
||||
#gradient > .horizontal(#333; #000);
|
||||
#gradient > .radial(#333; #000);
|
||||
{% endhighlight %}
|
||||
<p>You can also specify the angle of a standard two-color, linear gradient:</p>
|
||||
<p>You can also specify the angle of a standard two-color, linear gradient:</p>
|
||||
{% highlight css %}
|
||||
#gradient > .directional(#333; #000; 45deg);
|
||||
{% endhighlight %}
|
||||
<p>If you need a barber-stripe style gradient, that's easy, too. Just specify a single color and we'll overlay a translucent white stripe.</p>
|
||||
<p>If you need a barber-stripe style gradient, that's easy, too. Just specify a single color and we'll overlay a translucent white stripe.</p>
|
||||
{% highlight css %}
|
||||
#gradient > .striped(#333; #000; 45deg);
|
||||
{% endhighlight %}
|
||||
<p>Up the ante and use three colors instead. Set the first color, the second color, the second color's color stop (a decimal value like 0.25), and the third color with these mixins:</p>
|
||||
<p>Up the ante and use three colors instead. Set the first color, the second color, the second color's color stop (a decimal value like 0.25), and the third color with these mixins:</p>
|
||||
{% highlight css %}
|
||||
#gradient > .vertical-three-colors(#777; #333; .25; #000);
|
||||
#gradient > .horizontal-three-colors(#777; #333; .25; #000);
|
||||
{% endhighlight %}
|
||||
<p><strong>Heads up!</strong> Should you ever need to remove a gradient, be sure to remove any IE-specific <code>filter</code> you may have added. You can do that by using <code>.reset-filter()</code> mixin alignside <code>background-image: none;</code>.</p>
|
||||
<p><strong>Heads up!</strong> Should you ever need to remove a gradient, be sure to remove any IE-specific <code>filter</code> you may have added. You can do that by using <code>.reset-filter()</code> mixin alignside <code>background-image: none;</code>.</p>
|
||||
|
||||
|
||||
<h2 id="less-mixins-utility">Utility mixins</h2>
|
||||
<p>Utility mixins are mixins that combine otherwise unrelated CSS properties to achieve a specific goal or task.</p>
|
||||
<h2 id="less-mixins-utility">Utility mixins</h2>
|
||||
<p>Utility mixins are mixins that combine otherwise unrelated CSS properties to achieve a specific goal or task.</p>
|
||||
|
||||
<h3 id="less-mixins-clearfix">Clearfix</h3>
|
||||
<p>Forget adding <code>class="clearfix"</code> to any element and instead add the <code>.clearfix()</code> mixin where appropriate. Uses the <a href="http://nicolasgallagher.com/micro-clearfix-hack/" target="_blank">micro clearfix</a> from <a href="http://twitter.com/necolas" target="_blank">Nicolas Gallager</a>.</p>
|
||||
<h3 id="less-mixins-clearfix">Clearfix</h3>
|
||||
<p>Forget adding <code>class="clearfix"</code> to any element and instead add the <code>.clearfix()</code> mixin where appropriate. Uses the <a href="http://nicolasgallagher.com/micro-clearfix-hack/" target="_blank">micro clearfix</a> from <a href="http://twitter.com/necolas" target="_blank">Nicolas Gallager</a>.</p>
|
||||
{% highlight css %}
|
||||
// Mixin
|
||||
.clearfix() {
|
||||
@ -3221,8 +3195,8 @@ a {
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-mixins-centering">Horizontal centering</h3>
|
||||
<p>Quickly center any element within its parent. <strong>Requires <code>width</code> or <code>max-width</code> to be set.</strong></p>
|
||||
<h3 id="less-mixins-centering">Horizontal centering</h3>
|
||||
<p>Quickly center any element within its parent. <strong>Requires <code>width</code> or <code>max-width</code> to be set.</strong></p>
|
||||
{% highlight css %}
|
||||
// Mixin
|
||||
.center-block() {
|
||||
@ -3238,8 +3212,8 @@ a {
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-mixins-sizing">Sizing helpers</h3>
|
||||
<p>Specify the dimensions of an object more easily.</p>
|
||||
<h3 id="less-mixins-sizing">Sizing helpers</h3>
|
||||
<p>Specify the dimensions of an object more easily.</p>
|
||||
{% highlight css %}
|
||||
// Mixins
|
||||
.size(@width; @height) {
|
||||
@ -3255,8 +3229,8 @@ a {
|
||||
.avatar { .square(48px); }
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-mixins-resizable">Resizable textareas</h3>
|
||||
<p>Easily configure the resize options for any textarea, or any other element. Defaults to normal browser behavior (<code>both</code>).</p>
|
||||
<h3 id="less-mixins-resizable">Resizable textareas</h3>
|
||||
<p>Easily configure the resize options for any textarea, or any other element. Defaults to normal browser behavior (<code>both</code>).</p>
|
||||
{% highlight css %}
|
||||
.resizable(@direction: both) {
|
||||
// Options: horizontal, vertical, both
|
||||
@ -3266,8 +3240,8 @@ a {
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-mixins-truncating">Truncating text</h3>
|
||||
<p>Easily truncate text with an ellipsis with a single mixin. <strong>Requires element to be <code>block</code> or <code>inline-block</code> level.</strong></p>
|
||||
<h3 id="less-mixins-truncating">Truncating text</h3>
|
||||
<p>Easily truncate text with an ellipsis with a single mixin. <strong>Requires element to be <code>block</code> or <code>inline-block</code> level.</strong></p>
|
||||
{% highlight css %}
|
||||
// Mixin
|
||||
.text-truncate() {
|
||||
@ -3284,8 +3258,8 @@ a {
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="less-mixins-retina-images">Retina images</h3>
|
||||
<p>Specify two image paths and the @1x image dimensions, and Bootstrap will provide an @2x media query. <strong>If you have many images to serve, consider writing your retina image CSS manually in a single media query.</strong></p>
|
||||
<h3 id="less-mixins-retina-images">Retina images</h3>
|
||||
<p>Specify two image paths and the @1x image dimensions, and Bootstrap will provide an @2x media query. <strong>If you have many images to serve, consider writing your retina image CSS manually in a single media query.</strong></p>
|
||||
{% highlight css %}
|
||||
.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
|
||||
background-image: url("@{file-1x}");
|
||||
@ -3307,86 +3281,84 @@ a {
|
||||
.retina-image("/img/bg-1x.png", "/img/bg-2x.png", 100px, 100px);
|
||||
}
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Using Sass
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="sass" class="page-header">Using Sass</h1>
|
||||
<p class="lead">While Bootstrap is built on Less, it also has an <a href="{{ site.sass_repo }}">official Sass port</a>. We maintain it in a separate GitHub repository and handle updates with a conversion script.</p>
|
||||
|
||||
<h2 id="sass-contents">What's included</h2>
|
||||
<p>Since the Sass port has a separate repo and serves a slightly different audience, the contents of the project differ greatly from the main Bootstrap project. This ensures the Sass port is as compatible with as many Sass-based systems as possible.</p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Path</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><code>lib/</code></th>
|
||||
<td>Ruby gem code (Sass configuration, Rails and Compass integrations)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>tasks/</code></th>
|
||||
<td>Converter scripts (turning upstream Less to Sass)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>test/</code></th>
|
||||
<td>Compilation tests</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>templates/</code></th>
|
||||
<td>Compass package manifest</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>vendor/assets/</code></th>
|
||||
<td>Sass, JavaScript, and font files</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>Rakefile</code></th>
|
||||
<td>Internal tasks, such as rake and convert</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>Visit the <a href="{{ site.sass_repo }}">Sass port's GitHub repository</a> to see this files in action.</p>
|
||||
|
||||
|
||||
<h2 id="sass-installation">Installation</h2>
|
||||
<p>Use the appropriate guide for your environment of choice.</p>
|
||||
|
||||
<!-- Using Sass
|
||||
================================================== -->
|
||||
<div class="bs-docs-section" id="sass">
|
||||
<div class="page-header">
|
||||
<h1>Using Sass</h1>
|
||||
</div>
|
||||
<p class="lead">While Bootstrap is built on Less, it also has an <a href="{{ site.sass_repo }}">official Sass port</a>. We maintain it in a separate GitHub repository and handle updates with a conversion script.</p>
|
||||
<h3 id="sass-installation-rails">Rails</h3>
|
||||
|
||||
<h2 id="sass-contents">What's included</h2>
|
||||
<p>Since the Sass port has a separate repo and serves a slightly different audience, the contents of the project differ greatly from the main Bootstrap project. This ensures the Sass port is as compatible with as many Sass-based systems as possible.</p>
|
||||
<p><code>bootstrap-sass</code> is easy to drop into Rails with the asset pipeline.</p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Path</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><code>lib/</code></th>
|
||||
<td>Ruby gem code (Sass configuration, Rails and Compass integrations)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>tasks/</code></th>
|
||||
<td>Converter scripts (turning upstream Less to Sass)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>test/</code></th>
|
||||
<td>Compilation tests</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>templates/</code></th>
|
||||
<td>Compass package manifest</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>vendor/assets/</code></th>
|
||||
<td>Sass, JavaScript, and font files</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>Rakefile</code></th>
|
||||
<td>Internal tasks, such as rake and convert</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>Visit the <a href="{{ site.sass_repo }}">Sass port's GitHub repository</a> to see this files in action.</p>
|
||||
|
||||
|
||||
<h2 id="sass-installation">Installation</h2>
|
||||
<p>Use the appropriate guide for your environment of choice.</p>
|
||||
|
||||
<h3 id="sass-installation-rails">Rails</h3>
|
||||
|
||||
<p><code>bootstrap-sass</code> is easy to drop into Rails with the asset pipeline.</p>
|
||||
|
||||
<p>In your Gemfile you need to add the <code>bootstrap-sass</code> gem, and ensure that the <code>sass-rails</code> gem is present—it is added to new Rails applications by default.</p>
|
||||
<p>In your Gemfile you need to add the <code>bootstrap-sass</code> gem, and ensure that the <code>sass-rails</code> gem is present—it is added to new Rails applications by default.</p>
|
||||
|
||||
{% highlight ruby %}
|
||||
gem 'sass-rails', '>= 3.2' # sass-rails needs to be higher than 3.2
|
||||
gem 'bootstrap-sass', '~> 3.0.3.0'
|
||||
{% endhighlight %}
|
||||
|
||||
<p><code>bundle install</code> and restart your server to make the files available through the pipeline.</p>
|
||||
<p><code>bundle install</code> and restart your server to make the files available through the pipeline.</p>
|
||||
|
||||
|
||||
<h3 id="sass-installation-compass">Compass <small>without Rails</small></h3>
|
||||
<h3 id="sass-installation-compass">Compass <small>without Rails</small></h3>
|
||||
|
||||
<p>Install the gem:</p>
|
||||
<p>Install the gem:</p>
|
||||
|
||||
{% highlight bash %}
|
||||
gem install bootstrap-sass
|
||||
{% endhighlight %}
|
||||
|
||||
<p>If you have an existing Compass project:</p>
|
||||
<p>If you have an existing Compass project:</p>
|
||||
|
||||
{% highlight ruby %}
|
||||
# config.rb:
|
||||
@ -3397,44 +3369,44 @@ require 'bootstrap-sass'
|
||||
bundle exec compass install bootstrap
|
||||
{% endhighlight %}
|
||||
|
||||
<p>If you are creating a new Compass project, you can generate it with <code>bootstrap-sass</code> support:</p>
|
||||
<p>If you are creating a new Compass project, you can generate it with <code>bootstrap-sass</code> support:</p>
|
||||
|
||||
{% highlight bash %}
|
||||
bundle exec compass create my-new-project -r bootstrap-sass --using bootstrap
|
||||
{% endhighlight %}
|
||||
|
||||
<p>This will create a new Compass project with the following files in it:</p>
|
||||
<p>This will create a new Compass project with the following files in it:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="{{ site.sass_repo }}/blob/master/templates/project/_variables.scss.erb">_variables.scss</a> — all of bootstrap variables (override them here).
|
||||
</li>
|
||||
<li><a href="{{ site.sass_repo }}/blob/master/templates/project/styles.scss">styles.scss</a> — main project SCSS file, import `variables` and `bootstrap`.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="{{ site.sass_repo }}/blob/master/templates/project/_variables.scss.erb">_variables.scss</a> — all of bootstrap variables (override them here).
|
||||
</li>
|
||||
<li><a href="{{ site.sass_repo }}/blob/master/templates/project/styles.scss">styles.scss</a> — main project SCSS file, import `variables` and `bootstrap`.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3 id="sass-installation-sass-only">Sass-only <small>without Compass or Rails</small></h3>
|
||||
<h3 id="sass-installation-sass-only">Sass-only <small>without Compass or Rails</small></h3>
|
||||
|
||||
<p>Require the gem, and load paths and Sass helpers will be configured automatically:</p>
|
||||
<p>Require the gem, and load paths and Sass helpers will be configured automatically:</p>
|
||||
|
||||
{% highlight ruby %}
|
||||
require 'bootstrap-sass'
|
||||
{% endhighlight %}
|
||||
|
||||
<p>Using bootstrap-sass as a Bower package is still being tested. You can install it with:</p>
|
||||
<p>Using bootstrap-sass as a Bower package is still being tested. You can install it with:</p>
|
||||
|
||||
{% highlight bash %}
|
||||
bower install 'git://github.com/twbs/bootstrap-sass.git#v3.0.3.0'
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>JS and fonts</h4>
|
||||
<h4>JS and fonts</h4>
|
||||
|
||||
<p>If you are using Rails or Sprockets, see Usage. If none of Rails/Sprockets/Compass were detected the fonts will be referenced as:</p>
|
||||
<p>If you are using Rails or Sprockets, see Usage. If none of Rails/Sprockets/Compass were detected the fonts will be referenced as:</p>
|
||||
|
||||
{% highlight sass %}
|
||||
"#{$icon-font-path}/#{$icon-font-name}.eot"
|
||||
{% endhighlight %}
|
||||
|
||||
<p><code>$icon-font-path</code> defaults to <code>bootstrap/</code>. When not using an asset pipeline, you have to copy fonts and javascripts from the gem.</p>
|
||||
<p><code>$icon-font-path</code> defaults to <code>bootstrap/</code>. When not using an asset pipeline, you have to copy fonts and javascripts from the gem.</p>
|
||||
|
||||
{% highlight bash %}
|
||||
mkdir public/fonts
|
||||
@ -3443,7 +3415,7 @@ mkdir public/javascripts
|
||||
cp -r $(bundle show bootstrap-sass)/vendor/assets/javascripts/ public/javascripts/
|
||||
{% endhighlight %}
|
||||
|
||||
<p>In ruby you can get the assets' location in the filesystem like this:</p>
|
||||
<p>In ruby you can get the assets' location in the filesystem like this:</p>
|
||||
|
||||
{% highlight ruby %}
|
||||
Bootstrap.stylesheets_path
|
||||
@ -3452,23 +3424,23 @@ Bootstrap.javascripts_path
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="sass-usage">Usage</h2>
|
||||
<h2 id="sass-usage">Usage</h2>
|
||||
|
||||
<h3 id="sass-usage-sass">Sass</h3>
|
||||
<h3 id="sass-usage-sass">Sass</h3>
|
||||
|
||||
<p>Import Bootstrap into a Sass file (for example, <code>application.css.scss</code>) to get all of Bootstrap's styles, mixins and variables! We recommend against using <code>//= require</code> directives, since none of your other stylesheets will be <a href="{{ site.sass_repo }}/issues/79#issuecomment-4428595">able to access</a> the Bootstrap mixins or variables.</p>
|
||||
<p>Import Bootstrap into a Sass file (for example, <code>application.css.scss</code>) to get all of Bootstrap's styles, mixins and variables! We recommend against using <code>//= require</code> directives, since none of your other stylesheets will be <a href="{{ site.sass_repo }}/issues/79#issuecomment-4428595">able to access</a> the Bootstrap mixins or variables.</p>
|
||||
|
||||
{% highlight sass %}
|
||||
@import "bootstrap";
|
||||
{% endhighlight %}
|
||||
|
||||
<p>You can also include optional Bootstrap theme:</p>
|
||||
<p>You can also include optional Bootstrap theme:</p>
|
||||
|
||||
{% highlight sass %}
|
||||
@import "bootstrap/theme";
|
||||
{% endhighlight %}
|
||||
|
||||
<p>The full list of Bootstrap variables can be found <a href="../customize/#less-variables">in the Customizer</a>. You can override these by simply redefining the variable before the <code>@import</code> directive, e.g.:</p>
|
||||
<p>The full list of Bootstrap variables can be found <a href="../customize/#less-variables">in the Customizer</a>. You can override these by simply redefining the variable before the <code>@import</code> directive, e.g.:</p>
|
||||
|
||||
{% highlight sass %}
|
||||
$navbar-default-bg: #312312;
|
||||
@ -3478,7 +3450,7 @@ $navbar-default-color: $light-orange;
|
||||
@import "bootstrap";
|
||||
{% endhighlight %}
|
||||
|
||||
<p>You can also import components explicitly. To start with a full list of modules copy this file from the gem:</p>
|
||||
<p>You can also import components explicitly. To start with a full list of modules copy this file from the gem:</p>
|
||||
|
||||
{% highlight bash %}
|
||||
# copy and prepend "bootstrap/" to the @import paths:
|
||||
@ -3487,30 +3459,28 @@ $(bundle show bootstrap-sass)/vendor/assets/stylesheets/bootstrap/bootstrap.scss
|
||||
app/assets/stylesheets/bootstrap-custom.scss
|
||||
{% endhighlight %}
|
||||
|
||||
<p>In your <code>application.sass</code>, replace <code>@import 'bootstrap'</code> with:</p>
|
||||
<p>In your <code>application.sass</code>, replace <code>@import 'bootstrap'</code> with:</p>
|
||||
|
||||
{% highlight sass %}
|
||||
@import 'bootstrap-custom';
|
||||
{% endhighlight %}
|
||||
|
||||
<p>Comment out any components you do not want from <code>bootstrap-custom</code>.</p>
|
||||
<p>Comment out any components you do not want from <code>bootstrap-custom</code>.</p>
|
||||
|
||||
<h3 id="sass-usage-js">JavaScript</h3>
|
||||
<h3 id="sass-usage-js">JavaScript</h3>
|
||||
|
||||
<p>We have a helper that includes all Bootstrap javascripts. If you use Rails (or Sprockets separately), put this in your Javascript manifest (usually in <code>application.js</code>) to load the files in the [correct order](/vendor/assets/javascripts/bootstrap.js):</p>
|
||||
<p>We have a helper that includes all Bootstrap javascripts. If you use Rails (or Sprockets separately), put this in your Javascript manifest (usually in <code>application.js</code>) to load the files in the [correct order](/vendor/assets/javascripts/bootstrap.js):</p>
|
||||
|
||||
{% highlight js %}
|
||||
// Loads all Bootstrap javascripts
|
||||
//= require bootstrap
|
||||
{% endhighlight %}
|
||||
|
||||
<p>You can also load individual modules, provided you also require any dependencies. You can check dependencies in the [Bootstrap JS documentation][jsdocs].</p>
|
||||
<p>You can also load individual modules, provided you also require any dependencies. You can check dependencies in the [Bootstrap JS documentation][jsdocs].</p>
|
||||
|
||||
{% highlight js %}
|
||||
//= require bootstrap/scrollspy
|
||||
//= require bootstrap/modal
|
||||
//= require bootstrap/dropdown
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,34 +6,33 @@ lead: "An overview of Bootstrap, how to download and use, basic templates and ex
|
||||
---
|
||||
|
||||
|
||||
<!-- Getting started
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="download">Download</h1>
|
||||
</div>
|
||||
<p class="lead">Bootstrap has a few easy ways to quickly get started, each one appealing to a different skill level and use case. Read through to see what suits your particular needs.</p>
|
||||
<!-- Getting started
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="download" class="page-header">Download</h1>
|
||||
|
||||
<div class="row bs-downloads">
|
||||
<div class="col-sm-4">
|
||||
<h3 id="download-bootstrap">Bootstrap</h3>
|
||||
<p>Compiled and minified CSS, JavaScript, and fonts. No docs or original source files are included.</p>
|
||||
<a href="{{ site.download.dist }}" class="btn btn-lg btn-outline" role="button" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download compiled']);">Download Bootstrap</a>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3 id="download-source">Source code</h3>
|
||||
<p>Source Less, JavaScript, and font files, along with our docs. <strong>Requires a Less compiler and <a href="{{ site.repo }}#compiling-css-and-javascript">some setup.</a></strong></p>
|
||||
<a href="{{ site.download.source }}" class="btn btn-lg btn-outline" role="button" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download source']);">Download source</a>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3 id="download-sass">Sass</h3>
|
||||
<p><a href="{{ site.sass_repo }}">Bootstrap ported from Less to Sass</a> for easy inclusion in Rails, Compass, or Sass-only projects.</p>
|
||||
<a href="{{ site.download.sass }}" class="btn btn-lg btn-outline" role="button" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download Sass']);">Download Sass</a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="lead">Bootstrap has a few easy ways to quickly get started, each one appealing to a different skill level and use case. Read through to see what suits your particular needs.</p>
|
||||
|
||||
<h3 id="download-cdn">Bootstrap CDN</h3>
|
||||
<p>The folks over at <a href="http://www.maxcdn.com/">MaxCDN</a> graciously provide CDN support for Bootstrap's CSS and JavaScript. Just use these <a href="http://www.bootstrapcdn.com/">Bootstrap CDN</a> links.</p>
|
||||
<div class="row bs-downloads">
|
||||
<div class="col-sm-4">
|
||||
<h3 id="download-bootstrap">Bootstrap</h3>
|
||||
<p>Compiled and minified CSS, JavaScript, and fonts. No docs or original source files are included.</p>
|
||||
<a href="{{ site.download.dist }}" class="btn btn-lg btn-outline" role="button" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download compiled']);">Download Bootstrap</a>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3 id="download-source">Source code</h3>
|
||||
<p>Source Less, JavaScript, and font files, along with our docs. <strong>Requires a Less compiler and <a href="{{ site.repo }}#compiling-css-and-javascript">some setup.</a></strong></p>
|
||||
<a href="{{ site.download.source }}" class="btn btn-lg btn-outline" role="button" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download source']);">Download source</a>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3 id="download-sass">Sass</h3>
|
||||
<p><a href="{{ site.sass_repo }}">Bootstrap ported from Less to Sass</a> for easy inclusion in Rails, Compass, or Sass-only projects.</p>
|
||||
<a href="{{ site.download.sass }}" class="btn btn-lg btn-outline" role="button" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download Sass']);">Download Sass</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 id="download-cdn">Bootstrap CDN</h3>
|
||||
<p>The folks over at <a href="http://www.maxcdn.com/">MaxCDN</a> graciously provide CDN support for Bootstrap's CSS and JavaScript. Just use these <a href="http://www.bootstrapcdn.com/">Bootstrap CDN</a> links.</p>
|
||||
{% highlight html %}
|
||||
<!-- Latest compiled and minified CSS -->
|
||||
<link rel="stylesheet" href="{{ site.cdn.css }}">
|
||||
@ -45,27 +44,27 @@ lead: "An overview of Bootstrap, how to download and use, basic templates and ex
|
||||
<script src="{{ site.cdn.js }}"></script>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="download-bower">Install with Bower</h3>
|
||||
<p>Install and manage Bootstrap's Less, CSS, JavaScript, and fonts using <a href="http://bower.io">Bower</a>.</p>
|
||||
{% highlight bash %}$ bower install bootstrap{% endhighlight %}
|
||||
<h3 id="download-bower">Install with Bower</h3>
|
||||
<p>Install and manage Bootstrap's Less, CSS, JavaScript, and fonts using <a href="http://bower.io">Bower</a>.</p>
|
||||
{% highlight bash %}$ bower install bootstrap{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- File structure
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="whats-included" class="page-header">What's included</h1>
|
||||
|
||||
<p class="lead">Bootstrap is downloadable in two forms, within which you'll find the following directories and files, logically grouping common resources and providing both compiled and minified variations.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-warning" id="jquery-required">
|
||||
<h4>jQuery required</h4>
|
||||
<p>Please note that <strong>all JavaScript plugins require jQuery</strong> to be included, as shown in the <a href="#template">starter template</a>. <a href="{{ site.repo }}/blob/v{{ site.current_version }}/bower.json">Consult our <code>bower.json</code></a> to see which versions of jQuery are supported.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- File structure
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="whats-included">What's included</h1>
|
||||
</div>
|
||||
<p class="lead">Bootstrap is downloadable in two forms, within which you'll find the following directories and files, logically grouping common resources and providing both compiled and minified variations.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-warning" id="jquery-required">
|
||||
<h4>jQuery required</h4>
|
||||
<p>Please note that <strong>all JavaScript plugins require jQuery</strong> to be included, as shown in the <a href="#template">starter template</a>. <a href="{{ site.repo }}/blob/v{{ site.current_version }}/bower.json">Consult our <code>bower.json</code></a> to see which versions of jQuery are supported.</p>
|
||||
</div>
|
||||
|
||||
<h2 id="whats-included-precompiled">Precompiled Bootstrap</h2>
|
||||
<p>Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:</p>
|
||||
<h2 id="whats-included-precompiled">Precompiled Bootstrap</h2>
|
||||
<p>Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:</p>
|
||||
<!-- NOTE: This info is intentionally duplicated in the README.
|
||||
Copy any changes made here over to the README too. -->
|
||||
{% highlight bash %}
|
||||
@ -85,10 +84,10 @@ bootstrap/
|
||||
└── glyphicons-halflings-regular.woff
|
||||
{% endhighlight %}
|
||||
|
||||
<p>This is the most basic form of Bootstrap: precompiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (<code>bootstrap.*</code>), as well as compiled and minified CSS and JS (<code>bootstrap.min.*</code>). Fonts from Glyphicons are included, as is the optional Bootstrap theme.</p>
|
||||
<p>This is the most basic form of Bootstrap: precompiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (<code>bootstrap.*</code>), as well as compiled and minified CSS and JS (<code>bootstrap.min.*</code>). Fonts from Glyphicons are included, as is the optional Bootstrap theme.</p>
|
||||
|
||||
<h2 id="whats-included-source">Bootstrap source code</h2>
|
||||
<p>The Bootstrap source code download includes the precompiled CSS, JavaScript, and font assets, along with source LESS, JavaScript, and documentation. More specifically, it includes the following and more:</p>
|
||||
<h2 id="whats-included-source">Bootstrap source code</h2>
|
||||
<p>The Bootstrap source code download includes the precompiled CSS, JavaScript, and font assets, along with source LESS, JavaScript, and documentation. More specifically, it includes the following and more:</p>
|
||||
{% highlight bash %}
|
||||
bootstrap/
|
||||
├── less/
|
||||
@ -101,19 +100,19 @@ bootstrap/
|
||||
└── docs/
|
||||
└── examples/
|
||||
{% endhighlight %}
|
||||
<p>The <code>less/</code>, <code>js/</code>, and <code>fonts/</code> are the source code for our CSS, JS, and icon fonts (respectively). The <code>dist/</code> folder includes everything listed in the precompiled download section above. The <code>docs/</code> folder includes the source code for our documentation, and <code>examples/</code> of Bootstrap usage. Beyond that, any other included file provides support for packages, license information, and development.</p>
|
||||
</div>
|
||||
<p>The <code>less/</code>, <code>js/</code>, and <code>fonts/</code> are the source code for our CSS, JS, and icon fonts (respectively). The <code>dist/</code> folder includes everything listed in the precompiled download section above. The <code>docs/</code> folder includes the source code for our documentation, and <code>examples/</code> of Bootstrap usage. Beyond that, any other included file provides support for packages, license information, and development.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Template
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="template">Basic template</h1>
|
||||
</div>
|
||||
<p class="lead">Start with this basic HTML template, or modify <a href="#examples">these examples</a>. We hope you'll customize our templates and examples, adapting them to suit your needs.</p>
|
||||
|
||||
<p>Copy the HTML below to begin working with a minimal Bootstrap document.</p>
|
||||
<!-- Template
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="template" class="page-header">Basic template</h1>
|
||||
|
||||
<p class="lead">Start with this basic HTML template, or modify <a href="#examples">these examples</a>. We hope you'll customize our templates and examples, adapting them to suit your needs.</p>
|
||||
|
||||
<p>Copy the HTML below to begin working with a minimal Bootstrap document.</p>
|
||||
{% highlight html %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@ -140,707 +139,704 @@ bootstrap/
|
||||
</body>
|
||||
</html>
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Template
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="examples" class="page-header">Examples</h1>
|
||||
|
||||
<p class="lead">Build on the basic template above with Bootstrap's many components. See also <a href="#customizing">Customizing Bootstrap</a> for tips on maintaining your own Bootstrap variants.</p>
|
||||
|
||||
<h3 id="examples-framework">Using the framework</h3>
|
||||
<div class="row bs-examples">
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/starter-template/">
|
||||
<img src="../examples/screenshots/starter-template.jpg" alt="">
|
||||
</a>
|
||||
<h4>Starter template</h4>
|
||||
<p>Nothing but the basics: compiled CSS and JavaScript along with a container.</p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/theme/">
|
||||
<img src="../examples/screenshots/theme.jpg" alt="">
|
||||
</a>
|
||||
<h4>Bootstrap theme</h4>
|
||||
<p>Load the optional Bootstrap theme for a visually enhanced experience.</p>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/grid/">
|
||||
<img src="../examples/screenshots/grid.jpg" alt="">
|
||||
</a>
|
||||
<h4>Grids</h4>
|
||||
<p>Multiple examples of grid layouts with all four tiers, nesting, and more.</p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/jumbotron/">
|
||||
<img src="../examples/screenshots/jumbotron.jpg" alt="">
|
||||
</a>
|
||||
<h4>Jumbotron</h4>
|
||||
<p>Build around the jumbotron with a navbar and some basic grid columns.</p>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/jumbotron-narrow/">
|
||||
<img src="../examples/screenshots/jumbotron-narrow.jpg" alt="">
|
||||
</a>
|
||||
<h4>Narrow jumbotron</h4>
|
||||
<p>Build a more custom page by narrowing the default container and jumbotron.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Template
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="examples">Examples</h1>
|
||||
<h3 id="examples-navbars">Navbars in action</h3>
|
||||
<div class="row bs-examples">
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/navbar/">
|
||||
<img src="../examples/screenshots/navbar.jpg" alt="">
|
||||
</a>
|
||||
<h4>Navbar</h4>
|
||||
<p>Super basic template that includes the navbar along with some additional content.</p>
|
||||
</div>
|
||||
<p class="lead">Build on the basic template above with Bootstrap's many components. See also <a href="#customizing">Customizing Bootstrap</a> for tips on maintaining your own Bootstrap variants.</p>
|
||||
|
||||
<h3 id="examples-framework">Using the framework</h3>
|
||||
<div class="row bs-examples">
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/starter-template/">
|
||||
<img src="../examples/screenshots/starter-template.jpg" alt="">
|
||||
</a>
|
||||
<h4>Starter template</h4>
|
||||
<p>Nothing but the basics: compiled CSS and JavaScript along with a container.</p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/theme/">
|
||||
<img src="../examples/screenshots/theme.jpg" alt="">
|
||||
</a>
|
||||
<h4>Bootstrap theme</h4>
|
||||
<p>Load the optional Bootstrap theme for a visually enhanced experience.</p>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/grid/">
|
||||
<img src="../examples/screenshots/grid.jpg" alt="">
|
||||
</a>
|
||||
<h4>Grids</h4>
|
||||
<p>Multiple examples of grid layouts with all four tiers, nesting, and more.</p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/jumbotron/">
|
||||
<img src="../examples/screenshots/jumbotron.jpg" alt="">
|
||||
</a>
|
||||
<h4>Jumbotron</h4>
|
||||
<p>Build around the jumbotron with a navbar and some basic grid columns.</p>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/jumbotron-narrow/">
|
||||
<img src="../examples/screenshots/jumbotron-narrow.jpg" alt="">
|
||||
</a>
|
||||
<h4>Narrow jumbotron</h4>
|
||||
<p>Build a more custom page by narrowing the default container and jumbotron.</p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/navbar-static-top/">
|
||||
<img src="../examples/screenshots/navbar-static.jpg" alt="">
|
||||
</a>
|
||||
<h4>Static top navbar</h4>
|
||||
<p>Super basic template with a static top navbar along with some additional content.</p>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
|
||||
<h3 id="examples-navbars">Navbars in action</h3>
|
||||
<div class="row bs-examples">
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/navbar/">
|
||||
<img src="../examples/screenshots/navbar.jpg" alt="">
|
||||
</a>
|
||||
<h4>Navbar</h4>
|
||||
<p>Super basic template that includes the navbar along with some additional content.</p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/navbar-static-top/">
|
||||
<img src="../examples/screenshots/navbar-static.jpg" alt="">
|
||||
</a>
|
||||
<h4>Static top navbar</h4>
|
||||
<p>Super basic template with a static top navbar along with some additional content.</p>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/navbar-fixed-top/">
|
||||
<img src="../examples/screenshots/navbar-fixed.jpg" alt="">
|
||||
</a>
|
||||
<h4>Fixed navbar</h4>
|
||||
<p>Super basic template with a fixed top navbar along with some additional content.</p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/navbar-fixed-top/">
|
||||
<img src="../examples/screenshots/navbar-fixed.jpg" alt="">
|
||||
</a>
|
||||
<h4>Fixed navbar</h4>
|
||||
<p>Super basic template with a fixed top navbar along with some additional content.</p>
|
||||
</div>
|
||||
|
||||
<h3 id="examples-custom">Custom components</h3>
|
||||
<div class="row bs-examples">
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/cover/">
|
||||
<img src="../examples/screenshots/cover.jpg" alt="">
|
||||
</a>
|
||||
<h4>Cover</h4>
|
||||
<p>A one-page template for building simple and beautiful home pages.</p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/carousel/">
|
||||
<img src="../examples/screenshots/carousel.jpg" alt="">
|
||||
</a>
|
||||
<h4>Carousel</h4>
|
||||
<p>Customize the navbar and carousel, then add some new components.</p>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/blog/">
|
||||
<img src="../examples/screenshots/blog.jpg" alt="">
|
||||
</a>
|
||||
<h4>Blog</h4>
|
||||
<p>Simple two-column blog layout with custom navigation, header, and type.</p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/dashboard/">
|
||||
<img src="../examples/screenshots/dashboard.jpg" alt="">
|
||||
</a>
|
||||
<h4>Dashboard</h4>
|
||||
<p>Basic structure for a admin dashboard with fixed sidebar and navbar.</p>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/signin/">
|
||||
<img src="../examples/screenshots/sign-in.jpg" alt="">
|
||||
</a>
|
||||
<h4>Sign-in page</h4>
|
||||
<p>Custom form layout and design for a simple sign in form.</p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/justified-nav/">
|
||||
<img src="../examples/screenshots/justified-nav.jpg" alt="">
|
||||
</a>
|
||||
<h4>Justified nav</h4>
|
||||
<p>Create a custom navbar with justified links. Heads up! <a href="../components/#nav-justified">Not too WebKit friendly.</a></p>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/sticky-footer/">
|
||||
<img src="../examples/screenshots/sticky-footer.jpg" alt="">
|
||||
</a>
|
||||
<h4>Sticky footer</h4>
|
||||
<p>Attach a footer to the bottom of the viewport when the content is shorter than it.</p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/sticky-footer-navbar/">
|
||||
<img src="../examples/screenshots/sticky-footer-navbar.jpg" alt="">
|
||||
</a>
|
||||
<h4>Sticky footer with navbar</h4>
|
||||
<p>Attach a footer to the bottom of the viewport with a fixed navbar at the top.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 id="examples-experiments">Experiments</h3>
|
||||
<div class="row bs-examples">
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/non-responsive/">
|
||||
<img src="../examples/screenshots/non-responsive.jpg" alt="">
|
||||
</a>
|
||||
<h4>Non-responsive Bootstrap</h4>
|
||||
<p>Easily disable the responsiveness of Bootstrap <a href="#disable-responsive">per our docs</a>.</p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/offcanvas/">
|
||||
<img src="../examples/screenshots/offcanvas.jpg" alt="">
|
||||
</a>
|
||||
<h4>Offcanvas</h4>
|
||||
<p>Build a toggleable off-canvas navigation menu for use with Bootstrap.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Template
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="disable-responsive">Disabling responsiveness</h1>
|
||||
<h3 id="examples-custom">Custom components</h3>
|
||||
<div class="row bs-examples">
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/cover/">
|
||||
<img src="../examples/screenshots/cover.jpg" alt="">
|
||||
</a>
|
||||
<h4>Cover</h4>
|
||||
<p>A one-page template for building simple and beautiful home pages.</p>
|
||||
</div>
|
||||
<p class="lead">Bootstrap automatically adapts your pages for various screen sizes.
|
||||
Here's how to disable this feature so your page works like in <a href="../examples/non-responsive/">this non-responsive example</a>.</p>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/carousel/">
|
||||
<img src="../examples/screenshots/carousel.jpg" alt="">
|
||||
</a>
|
||||
<h4>Carousel</h4>
|
||||
<p>Customize the navbar and carousel, then add some new components.</p>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
|
||||
<h3>Steps to disable page responsiveness</h3>
|
||||
<ol>
|
||||
<li>Omit the viewport <code><meta></code> mentioned in <a href="../css/#overview-mobile">the CSS docs</a></li>
|
||||
<li>Override the <code>width</code> on the <code>.container</code> for each grid tier with a single width, for example <code>width: 970px !important;</code> Be sure that this comes after the default Bootstrap CSS. You can optionally avoid the <code>!important</code> with media queries or some selector-fu.</li>
|
||||
<li>If using navbars, remove all navbar collapsing and expanding behavior.</li>
|
||||
<li>For grid layouts, use <code>.col-xs-*</code> classes in addition to, or in place of, the medium/large ones. Don't worry, the extra-small device grid scales to all resolutions.</li>
|
||||
</ol>
|
||||
<p>You'll still need Respond.js for IE8 (since our media queries are still there and need to be processed).
|
||||
This disables the "mobile site" aspects of Bootstrap.</p>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/blog/">
|
||||
<img src="../examples/screenshots/blog.jpg" alt="">
|
||||
</a>
|
||||
<h4>Blog</h4>
|
||||
<p>Simple two-column blog layout with custom navigation, header, and type.</p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/dashboard/">
|
||||
<img src="../examples/screenshots/dashboard.jpg" alt="">
|
||||
</a>
|
||||
<h4>Dashboard</h4>
|
||||
<p>Basic structure for a admin dashboard with fixed sidebar and navbar.</p>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
|
||||
<h3>Bootstrap template with responsiveness disabled</h3>
|
||||
<p>We've applied these steps to an example. Read its source code to see the specific changes implemented.</p>
|
||||
<p>
|
||||
<a href="../examples/non-responsive/" class="btn btn-primary">View non-responsive example</a>
|
||||
</p>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/signin/">
|
||||
<img src="../examples/screenshots/sign-in.jpg" alt="">
|
||||
</a>
|
||||
<h4>Sign-in page</h4>
|
||||
<p>Custom form layout and design for a simple sign in form.</p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/justified-nav/">
|
||||
<img src="../examples/screenshots/justified-nav.jpg" alt="">
|
||||
</a>
|
||||
<h4>Justified nav</h4>
|
||||
<p>Create a custom navbar with justified links. Heads up! <a href="../components/#nav-justified">Not too WebKit friendly.</a></p>
|
||||
</div>
|
||||
<div class="clearfix visible-xs"></div>
|
||||
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/sticky-footer/">
|
||||
<img src="../examples/screenshots/sticky-footer.jpg" alt="">
|
||||
</a>
|
||||
<h4>Sticky footer</h4>
|
||||
<p>Attach a footer to the bottom of the viewport when the content is shorter than it.</p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/sticky-footer-navbar/">
|
||||
<img src="../examples/screenshots/sticky-footer-navbar.jpg" alt="">
|
||||
</a>
|
||||
<h4>Sticky footer with navbar</h4>
|
||||
<p>Attach a footer to the bottom of the viewport with a fixed navbar at the top.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Migration
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="migration">Migrating from 2.x to 3.0</h1>
|
||||
<h3 id="examples-experiments">Experiments</h3>
|
||||
<div class="row bs-examples">
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/non-responsive/">
|
||||
<img src="../examples/screenshots/non-responsive.jpg" alt="">
|
||||
</a>
|
||||
<h4>Non-responsive Bootstrap</h4>
|
||||
<p>Easily disable the responsiveness of Bootstrap <a href="#disable-responsive">per our docs</a>.</p>
|
||||
</div>
|
||||
<p class="lead">Bootstrap 3 is not backwards compatible with v2.x. Use this section as a general guide to upgrading from v2.x to v3.0. For a broader overview, see <a href="http://blog.getbootstrap.com/2013/08/19/bootstrap-3-released/">what's new</a> in the v3.0 release announcement.</p>
|
||||
|
||||
<h2 id="migration-classes">Major class changes</h2>
|
||||
<p>This table shows the style changes between v2.x and v3.0.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Bootstrap 2.x</th>
|
||||
<th>Bootstrap 3.0</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>.row-fluid</code></td>
|
||||
<td><code>.row</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.span*</code></td>
|
||||
<td><code>.col-md-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.offset*</code></td>
|
||||
<td><code>.col-md-offset-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.brand</code></td>
|
||||
<td><code>.navbar-brand</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.nav-collapse</code></td>
|
||||
<td><code>.navbar-collapse</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.nav-toggle</code></td>
|
||||
<td><code>.navbar-toggle</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.btn-navbar</code></td>
|
||||
<td><code>.navbar-btn</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.hero-unit</code></td>
|
||||
<td><code>.jumbotron</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.icon-*</code></td>
|
||||
<td><code>.glyphicon .glyphicon-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.btn</code></td>
|
||||
<td><code>.btn .btn-default</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.btn-mini</code></td>
|
||||
<td><code>.btn-xs</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.btn-small</code></td>
|
||||
<td><code>.btn-sm</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.btn-large</code></td>
|
||||
<td><code>.btn-lg</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.alert-error</code></td>
|
||||
<td><code>.alert-danger</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.visible-phone</code></td>
|
||||
<td><code>.visible-xs</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.visible-tablet</code></td>
|
||||
<td><code>.visible-sm</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.visible-desktop</code></td>
|
||||
<td>Split into <code>.visible-md .visible-lg</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.hidden-phone</code></td>
|
||||
<td><code>.hidden-xs</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.hidden-tablet</code></td>
|
||||
<td><code>.hidden-sm</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.hidden-desktop</code></td>
|
||||
<td>Split into <code>.hidden-md .hidden-lg</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.input-small</code></td>
|
||||
<td><code>.input-sm</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.input-large</code></td>
|
||||
<td><code>.input-lg</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.input-block-level</code></td>
|
||||
<td><code>.form-control</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.control-group</code></td>
|
||||
<td><code>.form-group</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.control-group.warning .control-group.error .control-group.success</code></td>
|
||||
<td><code>.form-group.has-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.checkbox.inline</code> <code>.radio.inline</code></td>
|
||||
<td><code>.checkbox-inline</code> <code>.radio-inline</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.input-prepend</code> <code>.input-append</code></td>
|
||||
<td><code>.input-group</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.add-on</code></td>
|
||||
<td><code>.input-group-addon</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.img-polaroid</code></td>
|
||||
<td><code>.img-thumbnail</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ul.unstyled</code></td>
|
||||
<td><code>.list-unstyled</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ul.inline</code></td>
|
||||
<td><code>.list-inline</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.muted</code></td>
|
||||
<td><code>.text-muted</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.label</code></td>
|
||||
<td><code>.label .label-default</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.label-important</code></td>
|
||||
<td><code>.label-danger</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.text-error</code></td>
|
||||
<td><code>.text-danger</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.table .error</code></td>
|
||||
<td><code>.table .danger</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.bar</code></td>
|
||||
<td><code>.progress-bar</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.bar-*</code></td>
|
||||
<td><code>.progress-bar-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.accordion</code></td>
|
||||
<td><code>.panel-group</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.accordion-group</code></td>
|
||||
<td><code>.panel .panel-default</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.accordion-heading</code></td>
|
||||
<td><code>.panel-heading</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.accordion-body</code></td>
|
||||
<td><code>.panel-collapse</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.accordion-inner</code></td>
|
||||
<td><code>.panel-body</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
|
||||
<h2 id="migration-new">What's new</h2>
|
||||
<p>We've added new elements and changed some existing ones. Here are the new or updated styles.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Element</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Panels</td>
|
||||
<td><code>.panel .panel-default</code> <code>.panel-body</code> <code>.panel-title</code> <code>.panel-heading</code> <code>.panel-footer</code> <code>.panel-collapse</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>List groups</td>
|
||||
<td><code>.list-group</code> <code>.list-group-item</code> <code>.list-group-item-text</code> <code>.list-group-item-heading</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Glyphicons</td>
|
||||
<td><code>.glyphicon</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jumbotron</td>
|
||||
<td><code>.jumbotron</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extra small grid (<768px)</td>
|
||||
<td><code>.col-xs-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Small grid (≥768px)</td>
|
||||
<td><code>.col-sm-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Medium grid (≥992px)</td>
|
||||
<td><code>.col-md-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Large grid (≥1200px)</td>
|
||||
<td><code>.col-lg-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Responsive utility classes (≥1200px)</td>
|
||||
<td><code>.visible-lg</code> <code>.hidden-lg</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Offsets</td>
|
||||
<td><code>.col-sm-offset-*</code> <code>.col-md-offset-*</code> <code>.col-lg-offset-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Push</td>
|
||||
<td><code>.col-sm-push-*</code> <code>.col-md-push-*</code> <code>.col-lg-push-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pull</td>
|
||||
<td><code>.col-sm-pull-*</code> <code>.col-md-pull-*</code> <code>.col-lg-pull-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Input groups</td>
|
||||
<td><code>.input-group</code> <code>.input-group-addon</code> <code>.input-group-btn</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Form controls</td>
|
||||
<td><code>.form-control</code> <code>.form-group</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Button group sizes</td>
|
||||
<td><code>.btn-group-xs</code> <code>.btn-group-sm</code> <code>.btn-group-lg</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Navbar text</td>
|
||||
<td><code>.navbar-text</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Navbar header</td>
|
||||
<td><code>.navbar-header</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Justified tabs / pills</td>
|
||||
<td><code>.nav-justified</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Responsive images</td>
|
||||
<td><code>.img-responsive</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Contextual table rows</td>
|
||||
<td><code>.success</code> <code>.danger</code> <code>.warning</code> <code>.active</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Contextual panels</td>
|
||||
<td><code>.panel-success</code> <code>.panel-danger</code> <code>.panel-warning</code> <code>.panel-info</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Modal</td>
|
||||
<td><code>.modal-dialog</code> <code>.modal-content</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Thumbnail image</td>
|
||||
<td><code>.img-thumbnail</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Well sizes</td>
|
||||
<td><code>.well-sm</code> <code>.well-lg</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Alert links</td>
|
||||
<td><code>.alert-link</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a class="thumbnail" href="../examples/offcanvas/">
|
||||
<img src="../examples/screenshots/offcanvas.jpg" alt="">
|
||||
</a>
|
||||
<h4>Offcanvas</h4>
|
||||
<p>Build a toggleable off-canvas navigation menu for use with Bootstrap.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h2 id="migration-dropped">What's removed</h2>
|
||||
<p>The following elements have been dropped or changed in v3.0.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Element</th>
|
||||
<th>Removed from 2.x</th>
|
||||
<th>3.0 Equivalent</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Form actions</td>
|
||||
<td><code>.form-actions</code></td>
|
||||
<td class="text-muted">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Search form</td>
|
||||
<td><code>.form-search</code></td>
|
||||
<td class="text-muted">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Form group with info</td>
|
||||
<td><code>.control-group.info</code></td>
|
||||
<td class="text-muted">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Block level from input</td>
|
||||
<td><code>.input-block-level</code></td>
|
||||
<td>No direct equivalent, but <a href="../css/#forms-controls">forms controls</a> are similar.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fluid row</td>
|
||||
<td><code>.row-fluid</code></td>
|
||||
<td><code>.row</code> (no more fixed grid)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Controls wrapper</td>
|
||||
<td><code>.controls</code></td>
|
||||
<td class="text-muted">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Controls row</td>
|
||||
<td><code>.controls-row</code></td>
|
||||
<td><code>.row</code> or <code>.form-group</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Navbar inner</td>
|
||||
<td><code>.navbar-inner</code></td>
|
||||
<td class="text-muted">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Navbar vertical dividers</td>
|
||||
<td><code>.navbar .divider-vertical</code></td>
|
||||
<td class="text-muted">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dropdown submenu</td>
|
||||
<td><code>.dropdown-submenu</code></td>
|
||||
<td class="text-muted">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tab alignments</td>
|
||||
<td><code>.tabs-left</code> <code>.tabs-right</code> <code>.tabs-below</code></td>
|
||||
<td class="text-muted">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pill-based tabbable area</td>
|
||||
<td><code>.pill-content</code></td>
|
||||
<td><code>.tab-content</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pill-based tabbable area pane</td>
|
||||
<td><code>.pill-pane</code></td>
|
||||
<td><code>.tab-pane</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Nav lists</td>
|
||||
<td><code>.nav-list</code> <code>.nav-header</code></td>
|
||||
<td>No direct equivalent, but <a href="../components/#list-group">list groups</a> and <a href="../javascript/#collapse"><code>.panel-group</code>s</a> are similar.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
|
||||
<!-- Template
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="disable-responsive" class="page-header">Disabling responsiveness</h1>
|
||||
|
||||
<p class="lead">Bootstrap automatically adapts your pages for various screen sizes.
|
||||
Here's how to disable this feature so your page works like in <a href="../examples/non-responsive/">this non-responsive example</a>.</p>
|
||||
|
||||
<h3>Steps to disable page responsiveness</h3>
|
||||
<ol>
|
||||
<li>Omit the viewport <code><meta></code> mentioned in <a href="../css/#overview-mobile">the CSS docs</a></li>
|
||||
<li>Override the <code>width</code> on the <code>.container</code> for each grid tier with a single width, for example <code>width: 970px !important;</code> Be sure that this comes after the default Bootstrap CSS. You can optionally avoid the <code>!important</code> with media queries or some selector-fu.</li>
|
||||
<li>If using navbars, remove all navbar collapsing and expanding behavior.</li>
|
||||
<li>For grid layouts, use <code>.col-xs-*</code> classes in addition to, or in place of, the medium/large ones. Don't worry, the extra-small device grid scales to all resolutions.</li>
|
||||
</ol>
|
||||
<p>You'll still need Respond.js for IE8 (since our media queries are still there and need to be processed).
|
||||
This disables the "mobile site" aspects of Bootstrap.</p>
|
||||
|
||||
<h3>Bootstrap template with responsiveness disabled</h3>
|
||||
<p>We've applied these steps to an example. Read its source code to see the specific changes implemented.</p>
|
||||
<p>
|
||||
<a href="../examples/non-responsive/" class="btn btn-primary">View non-responsive example</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<h2 id="migration-notes">Additional notes</h2>
|
||||
<p>Other changes in v3.0 are not immediately apparent. Base classes, key styles, and behaviors have been adjusted for flexibility and our <em>mobile first</em> approach. Here's a partial list:</p>
|
||||
<ul>
|
||||
<li>By default, text-based form controls now receive only minimal styling. For focus colors and rounded corners, apply the <code>.form-control</code> class on the element to style.</li>
|
||||
<li>Text-based form controls with the <code>.form-control</code> class applied are now 100% wide by default. Wrap inputs inside <code><div class="col-*"></div></code> to control input widths.</li>
|
||||
<li><code>.badge</code> no longer has contextual (-success,-primary,etc..) classes.</li>
|
||||
<li><code>.btn</code> must also use <code>.btn-default</code> to get the "default" button.</li>
|
||||
<li><code>.row</code> is now fluid.</li>
|
||||
<li>Images are no longer responsive by default. Use <code>.img-responsive</code> for fluid <code><img></code> size.</li>
|
||||
<li>The icons, now <code>.glyphicon</code>, are now font based. Icons also require a base and icon class (e.g. <code>.glyphicon .glyphicon-asterisk</code>).</li>
|
||||
<li>Typeahead has been dropped, in favor of using <a href="http://twitter.github.io/typeahead.js/">Twitter Typeahead</a>.</li>
|
||||
<li>Modal markup has changed significantly. The <code>.modal-header</code>, <code>.modal-body</code>, and <code>.modal-footer</code> sections are now wrapped in <code>.modal-content</code> and <code>.modal-dialog</code> for better mobile styling and behavior.</li>
|
||||
<li>The HTML loaded by the <code>remote</code> modal option is now injected into the <code>.modal</code> instead of into the <code>.modal-body</code>. This allows you to also easily vary the header and footer of the modal, not just the modal body.</li>
|
||||
<li>JavaScript events are namespaced. For example, to handle the modal "show" event, use <code>'show.bs.modal'</code>. For tabs "shown" use <code>'shown.bs.tab'</code>, etc.</li>
|
||||
</ul>
|
||||
<p>For more information on upgrading to v3.0, and code snippets from the community, see <a href="http://bootply.com/">Bootply</a>.</p>
|
||||
|
||||
<!-- Migration
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="migration" class="page-header">Migrating from 2.x to 3.0</h1>
|
||||
<p class="lead">Bootstrap 3 is not backwards compatible with v2.x. Use this section as a general guide to upgrading from v2.x to v3.0. For a broader overview, see <a href="http://blog.getbootstrap.com/2013/08/19/bootstrap-3-released/">what's new</a> in the v3.0 release announcement.</p>
|
||||
|
||||
<h2 id="migration-classes">Major class changes</h2>
|
||||
<p>This table shows the style changes between v2.x and v3.0.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Bootstrap 2.x</th>
|
||||
<th>Bootstrap 3.0</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>.row-fluid</code></td>
|
||||
<td><code>.row</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.span*</code></td>
|
||||
<td><code>.col-md-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.offset*</code></td>
|
||||
<td><code>.col-md-offset-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.brand</code></td>
|
||||
<td><code>.navbar-brand</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.nav-collapse</code></td>
|
||||
<td><code>.navbar-collapse</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.nav-toggle</code></td>
|
||||
<td><code>.navbar-toggle</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.btn-navbar</code></td>
|
||||
<td><code>.navbar-btn</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.hero-unit</code></td>
|
||||
<td><code>.jumbotron</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.icon-*</code></td>
|
||||
<td><code>.glyphicon .glyphicon-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.btn</code></td>
|
||||
<td><code>.btn .btn-default</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.btn-mini</code></td>
|
||||
<td><code>.btn-xs</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.btn-small</code></td>
|
||||
<td><code>.btn-sm</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.btn-large</code></td>
|
||||
<td><code>.btn-lg</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.alert-error</code></td>
|
||||
<td><code>.alert-danger</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.visible-phone</code></td>
|
||||
<td><code>.visible-xs</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.visible-tablet</code></td>
|
||||
<td><code>.visible-sm</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.visible-desktop</code></td>
|
||||
<td>Split into <code>.visible-md .visible-lg</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.hidden-phone</code></td>
|
||||
<td><code>.hidden-xs</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.hidden-tablet</code></td>
|
||||
<td><code>.hidden-sm</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.hidden-desktop</code></td>
|
||||
<td>Split into <code>.hidden-md .hidden-lg</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.input-small</code></td>
|
||||
<td><code>.input-sm</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.input-large</code></td>
|
||||
<td><code>.input-lg</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.input-block-level</code></td>
|
||||
<td><code>.form-control</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.control-group</code></td>
|
||||
<td><code>.form-group</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.control-group.warning .control-group.error .control-group.success</code></td>
|
||||
<td><code>.form-group.has-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.checkbox.inline</code> <code>.radio.inline</code></td>
|
||||
<td><code>.checkbox-inline</code> <code>.radio-inline</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.input-prepend</code> <code>.input-append</code></td>
|
||||
<td><code>.input-group</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.add-on</code></td>
|
||||
<td><code>.input-group-addon</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.img-polaroid</code></td>
|
||||
<td><code>.img-thumbnail</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ul.unstyled</code></td>
|
||||
<td><code>.list-unstyled</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ul.inline</code></td>
|
||||
<td><code>.list-inline</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.muted</code></td>
|
||||
<td><code>.text-muted</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.label</code></td>
|
||||
<td><code>.label .label-default</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.label-important</code></td>
|
||||
<td><code>.label-danger</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.text-error</code></td>
|
||||
<td><code>.text-danger</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.table .error</code></td>
|
||||
<td><code>.table .danger</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.bar</code></td>
|
||||
<td><code>.progress-bar</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.bar-*</code></td>
|
||||
<td><code>.progress-bar-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.accordion</code></td>
|
||||
<td><code>.panel-group</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.accordion-group</code></td>
|
||||
<td><code>.panel .panel-default</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.accordion-heading</code></td>
|
||||
<td><code>.panel-heading</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.accordion-body</code></td>
|
||||
<td><code>.panel-collapse</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.accordion-inner</code></td>
|
||||
<td><code>.panel-body</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
|
||||
<h2 id="migration-new">What's new</h2>
|
||||
<p>We've added new elements and changed some existing ones. Here are the new or updated styles.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Element</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Panels</td>
|
||||
<td><code>.panel .panel-default</code> <code>.panel-body</code> <code>.panel-title</code> <code>.panel-heading</code> <code>.panel-footer</code> <code>.panel-collapse</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>List groups</td>
|
||||
<td><code>.list-group</code> <code>.list-group-item</code> <code>.list-group-item-text</code> <code>.list-group-item-heading</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Glyphicons</td>
|
||||
<td><code>.glyphicon</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jumbotron</td>
|
||||
<td><code>.jumbotron</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extra small grid (<768px)</td>
|
||||
<td><code>.col-xs-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Small grid (≥768px)</td>
|
||||
<td><code>.col-sm-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Medium grid (≥992px)</td>
|
||||
<td><code>.col-md-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Large grid (≥1200px)</td>
|
||||
<td><code>.col-lg-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Responsive utility classes (≥1200px)</td>
|
||||
<td><code>.visible-lg</code> <code>.hidden-lg</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Offsets</td>
|
||||
<td><code>.col-sm-offset-*</code> <code>.col-md-offset-*</code> <code>.col-lg-offset-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Push</td>
|
||||
<td><code>.col-sm-push-*</code> <code>.col-md-push-*</code> <code>.col-lg-push-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pull</td>
|
||||
<td><code>.col-sm-pull-*</code> <code>.col-md-pull-*</code> <code>.col-lg-pull-*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Input groups</td>
|
||||
<td><code>.input-group</code> <code>.input-group-addon</code> <code>.input-group-btn</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Form controls</td>
|
||||
<td><code>.form-control</code> <code>.form-group</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Button group sizes</td>
|
||||
<td><code>.btn-group-xs</code> <code>.btn-group-sm</code> <code>.btn-group-lg</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Navbar text</td>
|
||||
<td><code>.navbar-text</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Navbar header</td>
|
||||
<td><code>.navbar-header</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Justified tabs / pills</td>
|
||||
<td><code>.nav-justified</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Responsive images</td>
|
||||
<td><code>.img-responsive</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Contextual table rows</td>
|
||||
<td><code>.success</code> <code>.danger</code> <code>.warning</code> <code>.active</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Contextual panels</td>
|
||||
<td><code>.panel-success</code> <code>.panel-danger</code> <code>.panel-warning</code> <code>.panel-info</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Modal</td>
|
||||
<td><code>.modal-dialog</code> <code>.modal-content</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Thumbnail image</td>
|
||||
<td><code>.img-thumbnail</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Well sizes</td>
|
||||
<td><code>.well-sm</code> <code>.well-lg</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Alert links</td>
|
||||
<td><code>.alert-link</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
|
||||
|
||||
<h2 id="migration-dropped">What's removed</h2>
|
||||
<p>The following elements have been dropped or changed in v3.0.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Element</th>
|
||||
<th>Removed from 2.x</th>
|
||||
<th>3.0 Equivalent</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Form actions</td>
|
||||
<td><code>.form-actions</code></td>
|
||||
<td class="text-muted">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Search form</td>
|
||||
<td><code>.form-search</code></td>
|
||||
<td class="text-muted">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Form group with info</td>
|
||||
<td><code>.control-group.info</code></td>
|
||||
<td class="text-muted">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Block level from input</td>
|
||||
<td><code>.input-block-level</code></td>
|
||||
<td>No direct equivalent, but <a href="../css/#forms-controls">forms controls</a> are similar.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fluid row</td>
|
||||
<td><code>.row-fluid</code></td>
|
||||
<td><code>.row</code> (no more fixed grid)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Controls wrapper</td>
|
||||
<td><code>.controls</code></td>
|
||||
<td class="text-muted">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Controls row</td>
|
||||
<td><code>.controls-row</code></td>
|
||||
<td><code>.row</code> or <code>.form-group</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Navbar inner</td>
|
||||
<td><code>.navbar-inner</code></td>
|
||||
<td class="text-muted">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Navbar vertical dividers</td>
|
||||
<td><code>.navbar .divider-vertical</code></td>
|
||||
<td class="text-muted">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dropdown submenu</td>
|
||||
<td><code>.dropdown-submenu</code></td>
|
||||
<td class="text-muted">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tab alignments</td>
|
||||
<td><code>.tabs-left</code> <code>.tabs-right</code> <code>.tabs-below</code></td>
|
||||
<td class="text-muted">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pill-based tabbable area</td>
|
||||
<td><code>.pill-content</code></td>
|
||||
<td><code>.tab-content</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pill-based tabbable area pane</td>
|
||||
<td><code>.pill-pane</code></td>
|
||||
<td><code>.tab-pane</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Nav lists</td>
|
||||
<td><code>.nav-list</code> <code>.nav-header</code></td>
|
||||
<td>No direct equivalent, but <a href="../components/#list-group">list groups</a> and <a href="../javascript/#collapse"><code>.panel-group</code>s</a> are similar.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
|
||||
|
||||
<h2 id="migration-notes">Additional notes</h2>
|
||||
<p>Other changes in v3.0 are not immediately apparent. Base classes, key styles, and behaviors have been adjusted for flexibility and our <em>mobile first</em> approach. Here's a partial list:</p>
|
||||
<ul>
|
||||
<li>By default, text-based form controls now receive only minimal styling. For focus colors and rounded corners, apply the <code>.form-control</code> class on the element to style.</li>
|
||||
<li>Text-based form controls with the <code>.form-control</code> class applied are now 100% wide by default. Wrap inputs inside <code><div class="col-*"></div></code> to control input widths.</li>
|
||||
<li><code>.badge</code> no longer has contextual (-success,-primary,etc..) classes.</li>
|
||||
<li><code>.btn</code> must also use <code>.btn-default</code> to get the "default" button.</li>
|
||||
<li><code>.row</code> is now fluid.</li>
|
||||
<li>Images are no longer responsive by default. Use <code>.img-responsive</code> for fluid <code><img></code> size.</li>
|
||||
<li>The icons, now <code>.glyphicon</code>, are now font based. Icons also require a base and icon class (e.g. <code>.glyphicon .glyphicon-asterisk</code>).</li>
|
||||
<li>Typeahead has been dropped, in favor of using <a href="http://twitter.github.io/typeahead.js/">Twitter Typeahead</a>.</li>
|
||||
<li>Modal markup has changed significantly. The <code>.modal-header</code>, <code>.modal-body</code>, and <code>.modal-footer</code> sections are now wrapped in <code>.modal-content</code> and <code>.modal-dialog</code> for better mobile styling and behavior.</li>
|
||||
<li>The HTML loaded by the <code>remote</code> modal option is now injected into the <code>.modal</code> instead of into the <code>.modal-body</code>. This allows you to also easily vary the header and footer of the modal, not just the modal body.</li>
|
||||
<li>JavaScript events are namespaced. For example, to handle the modal "show" event, use <code>'show.bs.modal'</code>. For tabs "shown" use <code>'shown.bs.tab'</code>, etc.</li>
|
||||
</ul>
|
||||
<p>For more information on upgrading to v3.0, and code snippets from the community, see <a href="http://bootply.com/">Bootply</a>.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Browser support
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="support" class="page-header">Browser and device support</h1>
|
||||
<p class="lead">Bootstrap is built to work best in the latest desktop and mobile browsers, meaning older browsers might display differently styled, though fully functional, renderings of certain components.</p>
|
||||
|
||||
<h3 id="support-browsers">Supported browsers</h3>
|
||||
<p>Specifically, we support the latest versions of the following:</p>
|
||||
<ul>
|
||||
<li>Chrome (Mac, Windows, iOS, and Android)</li>
|
||||
<li>Safari (Mac and iOS only, as the Windows version is being abandoned)</li>
|
||||
<li>Firefox (Mac, Windows)</li>
|
||||
<li>Internet Explorer</li>
|
||||
<li>Opera (Mac, Windows)</li>
|
||||
</ul>
|
||||
<p>Unofficially, Bootstrap should look and behave well enough in Chromium and Chrome for Linux, Firefox for Linux, and Internet Explorer 7, though they are not officially supported.</p>
|
||||
|
||||
<h3 id="support-ie8-ie9">Internet Explorer 8 and 9</h3>
|
||||
<p>Internet Explorer 8 and 9 are also supported, however, please be aware that some CSS3 properties and HTML5 elements are not fully supported by these browsers. In addition, <strong>Internet Explorer 8 requires the use of <a href="https://github.com/scottjehl/Respond">Respond.js</a> to enable media query support.</strong></p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="col-xs-4">Feature</th>
|
||||
<th scope="col" class="col-xs-4">Internet Explorer 8</th>
|
||||
<th scope="col" class="col-xs-4">Internet Explorer 9</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><code>border-radius</code></th>
|
||||
<td class="text-danger"><span class="glyphicon glyphicon-remove"></span> Not supported</td>
|
||||
<td class="text-success"><span class="glyphicon glyphicon-ok"></span> Supported</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><code>box-shadow</code></th>
|
||||
<td class="text-danger"><span class="glyphicon glyphicon-remove"></span> Not supported</td>
|
||||
<td class="text-success"><span class="glyphicon glyphicon-ok"></span> Supported</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><code>transform</code></th>
|
||||
<td class="text-danger"><span class="glyphicon glyphicon-remove"></span> Not supported</td>
|
||||
<td class="text-success"><span class="glyphicon glyphicon-ok"></span> Supported, with <code>-ms</code> prefix</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><code>transition</code></th>
|
||||
<td colspan="2" class="text-danger"><span class="glyphicon glyphicon-remove"></span> Not supported</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><code>placeholder</code></th>
|
||||
<td colspan="2" class="text-danger"><span class="glyphicon glyphicon-remove"></span> Not supported</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p>Visit <a href="http://caniuse.com/">Can I use...</a> for details on browser support of CSS3 and HTML5 features.</p>
|
||||
|
||||
<!-- Browser support
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="support">Browser and device support</h1>
|
||||
</div>
|
||||
<p class="lead">Bootstrap is built to work best in the latest desktop and mobile browsers, meaning older browsers might display differently styled, though fully functional, renderings of certain components.</p>
|
||||
<h3 id="support-ie8-respondjs">Internet Explorer 8 and Respond.js</h3>
|
||||
<p>Beware of the following caveats when using Respond.js in your development and production environments for Internet Explorer 8.</p>
|
||||
<h4 id="respond-js-x-domain">Respond.js and cross-domain CSS</h4>
|
||||
<p>Using Respond.js with CSS hosted on a different (sub)domain (for example, on a CDN) requires some additional setup. <a href="https://github.com/scottjehl/Respond/blob/master/README.md#cdnx-domain-setup">See the Respond.js docs</a> for details.</p>
|
||||
<h4 id="respond-file-proto">Respond.js and <code>file://</code></h4>
|
||||
<p>Due to browser security rules, Respond.js doesn't work with pages viewed via the <code>file://</code> protocol (like when opening a local HTML file). To test responsive features in IE8, view your pages over HTTP(S). <a href="https://github.com/scottjehl/Respond/blob/master/README.md#support--caveats">See the Respond.js docs</a> for details.</p>
|
||||
<h4 id="respond-import">Respond.js and <code>@import</code></h4>
|
||||
<p>Respond.js doesn't work with CSS that's referenced via <code>@import</code>. In particular, some Drupal configurations are known to use <code>@import</code>. <a href="https://github.com/scottjehl/Respond/blob/master/README.md#support--caveats">See the Respond.js docs</a> for details.</p>
|
||||
|
||||
<h3 id="support-browsers">Supported browsers</h3>
|
||||
<p>Specifically, we support the latest versions of the following:</p>
|
||||
<ul>
|
||||
<li>Chrome (Mac, Windows, iOS, and Android)</li>
|
||||
<li>Safari (Mac and iOS only, as the Windows version is being abandoned)</li>
|
||||
<li>Firefox (Mac, Windows)</li>
|
||||
<li>Internet Explorer</li>
|
||||
<li>Opera (Mac, Windows)</li>
|
||||
</ul>
|
||||
<p>Unofficially, Bootstrap should look and behave well enough in Chromium and Chrome for Linux, Firefox for Linux, and Internet Explorer 7, though they are not officially supported.</p>
|
||||
<h3 id="support-ie8-box-sizing">Internet Explorer 8 and box-sizing</h3>
|
||||
<p>IE8 does not fully support <code>box-sizing: border-box;</code> when combined with <code>min-width</code>, <code>max-width</code>, <code>min-height</code>, or <code>max-height</code>. For that reason, as of v3.0.1, we no longer use <code>max-width</code> on <code>.container</code>s.</p>
|
||||
|
||||
<h3 id="support-ie8-ie9">Internet Explorer 8 and 9</h3>
|
||||
<p>Internet Explorer 8 and 9 are also supported, however, please be aware that some CSS3 properties and HTML5 elements are not fully supported by these browsers. In addition, <strong>Internet Explorer 8 requires the use of <a href="https://github.com/scottjehl/Respond">Respond.js</a> to enable media query support.</strong></p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="col-xs-4">Feature</th>
|
||||
<th scope="col" class="col-xs-4">Internet Explorer 8</th>
|
||||
<th scope="col" class="col-xs-4">Internet Explorer 9</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><code>border-radius</code></th>
|
||||
<td class="text-danger"><span class="glyphicon glyphicon-remove"></span> Not supported</td>
|
||||
<td class="text-success"><span class="glyphicon glyphicon-ok"></span> Supported</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><code>box-shadow</code></th>
|
||||
<td class="text-danger"><span class="glyphicon glyphicon-remove"></span> Not supported</td>
|
||||
<td class="text-success"><span class="glyphicon glyphicon-ok"></span> Supported</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><code>transform</code></th>
|
||||
<td class="text-danger"><span class="glyphicon glyphicon-remove"></span> Not supported</td>
|
||||
<td class="text-success"><span class="glyphicon glyphicon-ok"></span> Supported, with <code>-ms</code> prefix</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><code>transition</code></th>
|
||||
<td colspan="2" class="text-danger"><span class="glyphicon glyphicon-remove"></span> Not supported</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><code>placeholder</code></th>
|
||||
<td colspan="2" class="text-danger"><span class="glyphicon glyphicon-remove"></span> Not supported</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p>Visit <a href="http://caniuse.com/">Can I use...</a> for details on browser support of CSS3 and HTML5 features.</p>
|
||||
|
||||
<h3 id="support-ie8-respondjs">Internet Explorer 8 and Respond.js</h3>
|
||||
<p>Beware of the following caveats when using Respond.js in your development and production environments for Internet Explorer 8.</p>
|
||||
<h4 id="respond-js-x-domain">Respond.js and cross-domain CSS</h4>
|
||||
<p>Using Respond.js with CSS hosted on a different (sub)domain (for example, on a CDN) requires some additional setup. <a href="https://github.com/scottjehl/Respond/blob/master/README.md#cdnx-domain-setup">See the Respond.js docs</a> for details.</p>
|
||||
<h4 id="respond-file-proto">Respond.js and <code>file://</code></h4>
|
||||
<p>Due to browser security rules, Respond.js doesn't work with pages viewed via the <code>file://</code> protocol (like when opening a local HTML file). To test responsive features in IE8, view your pages over HTTP(S). <a href="https://github.com/scottjehl/Respond/blob/master/README.md#support--caveats">See the Respond.js docs</a> for details.</p>
|
||||
<h4 id="respond-import">Respond.js and <code>@import</code></h4>
|
||||
<p>Respond.js doesn't work with CSS that's referenced via <code>@import</code>. In particular, some Drupal configurations are known to use <code>@import</code>. <a href="https://github.com/scottjehl/Respond/blob/master/README.md#support--caveats">See the Respond.js docs</a> for details.</p>
|
||||
|
||||
<h3 id="support-ie8-box-sizing">Internet Explorer 8 and box-sizing</h3>
|
||||
<p>IE8 does not fully support <code>box-sizing: border-box;</code> when combined with <code>min-width</code>, <code>max-width</code>, <code>min-height</code>, or <code>max-height</code>. For that reason, as of v3.0.1, we no longer use <code>max-width</code> on <code>.container</code>s.</p>
|
||||
|
||||
<h3 id="support-ie-compatibility-modes">IE Compatibility modes</h3>
|
||||
<p>Bootstrap is not supported in the old Internet Explorer compatibility modes. To be sure you're using the latest rendering mode for IE, consider including the appropriate <code><meta></code> tag in your pages:</p>
|
||||
<h3 id="support-ie-compatibility-modes">IE Compatibility modes</h3>
|
||||
<p>Bootstrap is not supported in the old Internet Explorer compatibility modes. To be sure you're using the latest rendering mode for IE, consider including the appropriate <code><meta></code> tag in your pages:</p>
|
||||
{% highlight html %}
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
{% endhighlight %}
|
||||
<p>Confirm the document mode by opening the debugging tools: press <kbd>F12</kbd> and check the "Document Mode".</p>
|
||||
<p>This tag is included in all Bootstrap's documentation and examples to ensure the best rendering possible in each supported version of Internet Explorer.</p>
|
||||
<p>See <a href="http://stackoverflow.com/questions/6771258/whats-the-difference-if-meta-http-equiv-x-ua-compatible-content-ie-edge">this StackOverflow question</a> for more information.</p>
|
||||
<p>Confirm the document mode by opening the debugging tools: press <kbd>F12</kbd> and check the "Document Mode".</p>
|
||||
<p>This tag is included in all Bootstrap's documentation and examples to ensure the best rendering possible in each supported version of Internet Explorer.</p>
|
||||
<p>See <a href="http://stackoverflow.com/questions/6771258/whats-the-difference-if-meta-http-equiv-x-ua-compatible-content-ie-edge">this StackOverflow question</a> for more information.</p>
|
||||
|
||||
<h3 id="support-ie10-width">Internet Explorer 10 in Windows 8 and Windows Phone 8</h3>
|
||||
<p>Internet Explorer 10 doesn't differentiate <strong>device width</strong> from <strong>viewport width</strong>, and thus doesn't properly apply the media queries in Bootstrap's CSS. Normally you'd just add a quick snippet of CSS to fix this:</p>
|
||||
<h3 id="support-ie10-width">Internet Explorer 10 in Windows 8 and Windows Phone 8</h3>
|
||||
<p>Internet Explorer 10 doesn't differentiate <strong>device width</strong> from <strong>viewport width</strong>, and thus doesn't properly apply the media queries in Bootstrap's CSS. Normally you'd just add a quick snippet of CSS to fix this:</p>
|
||||
{% highlight css %}
|
||||
@-ms-viewport { width: device-width; }
|
||||
{% endhighlight %}
|
||||
<p>However, this doesn't work as it causes Windows Phone 8 devices to show a mostly desktop view instead of narrow "phone" view. To address this, you'll need to <strong>include the following CSS and JavaScript to work around the bug until Microsoft issues a fix</strong>.</p>
|
||||
<p>However, this doesn't work as it causes Windows Phone 8 devices to show a mostly desktop view instead of narrow "phone" view. To address this, you'll need to <strong>include the following CSS and JavaScript to work around the bug until Microsoft issues a fix</strong>.</p>
|
||||
{% highlight css %}
|
||||
@-webkit-viewport { width: device-width; }
|
||||
@-moz-viewport { width: device-width; }
|
||||
@ -860,32 +856,32 @@ if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
|
||||
document.querySelector("head").appendChild(msViewportStyle)
|
||||
}
|
||||
{% endhighlight %}
|
||||
<p>For more information and usage guidelines, read <a href="http://timkadlec.com/2013/01/windows-phone-8-and-device-width/">Windows Phone 8 and Device-Width</a>.</p>
|
||||
<p>As a heads up, we include this in the Bootstrap docs as an example.</p>
|
||||
<p>For more information and usage guidelines, read <a href="http://timkadlec.com/2013/01/windows-phone-8-and-device-width/">Windows Phone 8 and Device-Width</a>.</p>
|
||||
<p>As a heads up, we include this in the Bootstrap docs as an example.</p>
|
||||
|
||||
<h3 id="support-safari-percentages">Safari percent rounding</h3>
|
||||
<p>As of Safari v6.1 for OS X and Safari for iOS v7.0.1, Safari's rendering engine has some trouble with the number of decimal places used in our <code>.col-*-1</code> grid classes. So if you have 12 individual grid columns, you'll notice that they come up short compared to other rows of columns. We can't do much here (<a href="https://github.com/twbs/bootstrap/issues/9282">see #9282</a>) but you do have some options:</p>
|
||||
<ul>
|
||||
<li>Add <code>.pull-right</code> to your last grid column to get the hard-right alignment</li>
|
||||
<li>Tweak your percentages manually to get the perfect rounding for Safari (more difficult than the first option)</li>
|
||||
</ul>
|
||||
<p>We'll keep an eye on this though and update our code if we have an easy solution.</p>
|
||||
<h3 id="support-safari-percentages">Safari percent rounding</h3>
|
||||
<p>As of Safari v6.1 for OS X and Safari for iOS v7.0.1, Safari's rendering engine has some trouble with the number of decimal places used in our <code>.col-*-1</code> grid classes. So if you have 12 individual grid columns, you'll notice that they come up short compared to other rows of columns. We can't do much here (<a href="https://github.com/twbs/bootstrap/issues/9282">see #9282</a>) but you do have some options:</p>
|
||||
<ul>
|
||||
<li>Add <code>.pull-right</code> to your last grid column to get the hard-right alignment</li>
|
||||
<li>Tweak your percentages manually to get the perfect rounding for Safari (more difficult than the first option)</li>
|
||||
</ul>
|
||||
<p>We'll keep an eye on this though and update our code if we have an easy solution.</p>
|
||||
|
||||
<h3 id="support-fixed-position-keyboards">Modals, navbars, and virtual keyboards</h3>
|
||||
<h4>Overflow and scrolling</h4>
|
||||
<p>Support for <code>overflow: hidden</code> on the <code><body></code> element is quite limited in iOS and Android. To that end, when you scroll past the top or bottom of a modal in either of those devices' browsers, the <code><body></code> content will begin to scroll.</p>
|
||||
<h4>Virtual keyboards</h4>
|
||||
<p>Also, note that if you're using inputs in your modal or navbar, iOS has a rendering bug that doesn't update the position of fixed elements when the virtual keyboard is triggered. A few workarounds for this include transforming your elements to <code>position: absolute</code> or invoking a timer on focus to try to correct the positioning manually. This is not handled by Bootstrap, so it is up to you to decide which solution is best for your application.</p>
|
||||
<h4>Navbar Dropdowns</h4>
|
||||
<p>The <code>.dropdown-backdrop</code> element isn't used on iOS in the nav because of the complexity of z-indexing. Thus, to close dropdowns in navbars, you must directly click the dropdown element (or any other element which will fire a click event in iOS).</p>
|
||||
<h3 id="support-fixed-position-keyboards">Modals, navbars, and virtual keyboards</h3>
|
||||
<h4>Overflow and scrolling</h4>
|
||||
<p>Support for <code>overflow: hidden</code> on the <code><body></code> element is quite limited in iOS and Android. To that end, when you scroll past the top or bottom of a modal in either of those devices' browsers, the <code><body></code> content will begin to scroll.</p>
|
||||
<h4>Virtual keyboards</h4>
|
||||
<p>Also, note that if you're using inputs in your modal or navbar, iOS has a rendering bug that doesn't update the position of fixed elements when the virtual keyboard is triggered. A few workarounds for this include transforming your elements to <code>position: absolute</code> or invoking a timer on focus to try to correct the positioning manually. This is not handled by Bootstrap, so it is up to you to decide which solution is best for your application.</p>
|
||||
<h4>Navbar Dropdowns</h4>
|
||||
<p>The <code>.dropdown-backdrop</code> element isn't used on iOS in the nav because of the complexity of z-indexing. Thus, to close dropdowns in navbars, you must directly click the dropdown element (or any other element which will fire a click event in iOS).</p>
|
||||
|
||||
<h3 id="support-browser-zoom">Browser zooming</h3>
|
||||
<p>Page zooming inevitably presents rendering artifacts in some components, both in Bootstrap and the rest of the web. Depending on the issue, we may be able to fix it (search first and then open an issue if need be). However, we tend to ignore these as they often have no direct solution other than hacky workarounds.</p>
|
||||
<h3 id="support-browser-zoom">Browser zooming</h3>
|
||||
<p>Page zooming inevitably presents rendering artifacts in some components, both in Bootstrap and the rest of the web. Depending on the issue, we may be able to fix it (search first and then open an issue if need be). However, we tend to ignore these as they often have no direct solution other than hacky workarounds.</p>
|
||||
|
||||
<h3 id="support-android-stock-browser">Android stock browser</h3>
|
||||
<p>Out of the box, Android 4.1 (and even some newer releases apparently) ship with the Browser app as the default web browser of choice (as opposed to Chrome). Unfortunately, the Browser app has lots of bugs and inconsistencies with CSS in general.</p>
|
||||
<h4>Select menus</h4>
|
||||
<p>On <code><select></code> elements, the Android stock browser will not display the side controls if there is a <code>border-radius</code> and/or <code>border</code> applied. Use the snippet of code below to remove the offending CSS and render the <code><select></code> as an unstyled element on the Android stock broswer. The useragent sniffing avoids interference with Chrome, Safari, and Mozilla browsers.</p>
|
||||
<h3 id="support-android-stock-browser">Android stock browser</h3>
|
||||
<p>Out of the box, Android 4.1 (and even some newer releases apparently) ship with the Browser app as the default web browser of choice (as opposed to Chrome). Unfortunately, the Browser app has lots of bugs and inconsistencies with CSS in general.</p>
|
||||
<h4>Select menus</h4>
|
||||
<p>On <code><select></code> elements, the Android stock browser will not display the side controls if there is a <code>border-radius</code> and/or <code>border</code> applied. Use the snippet of code below to remove the offending CSS and render the <code><select></code> as an unstyled element on the Android stock broswer. The useragent sniffing avoids interference with Chrome, Safari, and Mozilla browsers.</p>
|
||||
{% highlight html %}
|
||||
<script>
|
||||
var nua = navigator.userAgent;
|
||||
@ -895,22 +891,20 @@ if (isAndroid) {
|
||||
}
|
||||
</script>
|
||||
{% endhighlight %}
|
||||
<p>Want to see an example? <a href="http://jsbin.com/OyaqoDO/2">Check out this JS Bin demo.</a></p>
|
||||
|
||||
</div>
|
||||
<p>Want to see an example? <a href="http://jsbin.com/OyaqoDO/2">Check out this JS Bin demo.</a></p>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Third party support
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="third-parties">Third party support</h1>
|
||||
</div>
|
||||
<p class="lead">While we don't officially support any third party plugins or add-ons, we do offer some useful advice to help avoid potential issues in your projects.</p>
|
||||
|
||||
<h3>Box-sizing</h3>
|
||||
<p>Some third party software, including Google Maps and Google Custom Search Engine, conflict with Bootstrap due to <code>* { box-sizing: border-box; }</code>, a rule which makes it so <code>padding</code> does not affect the final computed width of an element. Learn more about <a href="http://css-tricks.com/box-sizing/">box model and sizing at CSS Tricks</a>.</p>
|
||||
<p>Depending on the context, you may override as-needed (Option 1) or reset the box-sizing for entire regions (Option 2).</p>
|
||||
<!-- Third party support
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="third-parties" class="page-header">Third party support</h1>
|
||||
<p class="lead">While we don't officially support any third party plugins or add-ons, we do offer some useful advice to help avoid potential issues in your projects.</p>
|
||||
|
||||
<h3>Box-sizing</h3>
|
||||
<p>Some third party software, including Google Maps and Google Custom Search Engine, conflict with Bootstrap due to <code>* { box-sizing: border-box; }</code>, a rule which makes it so <code>padding</code> does not affect the final computed width of an element. Learn more about <a href="http://css-tricks.com/box-sizing/">box model and sizing at CSS Tricks</a>.</p>
|
||||
<p>Depending on the context, you may override as-needed (Option 1) or reset the box-sizing for entire regions (Option 2).</p>
|
||||
{% highlight css %}
|
||||
/* Box-sizing resets
|
||||
*
|
||||
@ -954,19 +948,18 @@ if (isAndroid) {
|
||||
.reset-box-sizing();
|
||||
}
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Accessibility
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="accessibility">Accessibility</h1>
|
||||
</div>
|
||||
<p class="lead">Bootstrap follows common web standards, and with minimal extra effort, can be used to create sites that are accessible to those using <abbr title="Assistive Technology" class="initialism">AT</abbr>.</p>
|
||||
|
||||
<h3>Skip navigation</h3>
|
||||
<p>If your navigation contains many links and comes before the main content in the DOM, add a <code>Skip to main content</code> link immediately after your opening <code><body></code> tag. <a href="http://a11yproject.com/posts/skip-nav-links/">(read why)</a></p>
|
||||
<!-- Accessibility
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="accessibility" class="page-header">Accessibility</h1>
|
||||
<p class="lead">Bootstrap follows common web standards, and with minimal extra effort, can be used to create sites that are accessible to those using <abbr title="Assistive Technology" class="initialism">AT</abbr>.</p>
|
||||
|
||||
<h3>Skip navigation</h3>
|
||||
<p>If your navigation contains many links and comes before the main content in the DOM, add a <code>Skip to main content</code> link immediately after your opening <code><body></code> tag. <a href="http://a11yproject.com/posts/skip-nav-links/">(read why)</a></p>
|
||||
{% highlight html %}
|
||||
<body>
|
||||
<a href="#content" class="sr-only">Skip to main content</a>
|
||||
@ -976,85 +969,82 @@ if (isAndroid) {
|
||||
</body>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>Nested headings</h3>
|
||||
<p>When nesting headings (<code><h1></code> - <code><h6></code>), your primary document header should be an <code><h1></code>. Subsequent headings should make logical use of <code><h2></code> - <code><h6></code> such that screen readers can construct a table of contents for your pages.</p>
|
||||
<p>Learn more at <a href="http://squizlabs.github.io/HTML_CodeSniffer/Standards/Section508/">HTML CodeSniffer</a> and <a href="http://accessibility.psu.edu/headings">Penn State's AccessAbility</a>.</p>
|
||||
<h3>Nested headings</h3>
|
||||
<p>When nesting headings (<code><h1></code> - <code><h6></code>), your primary document header should be an <code><h1></code>. Subsequent headings should make logical use of <code><h2></code> - <code><h6></code> such that screen readers can construct a table of contents for your pages.</p>
|
||||
<p>Learn more at <a href="http://squizlabs.github.io/HTML_CodeSniffer/Standards/Section508/">HTML CodeSniffer</a> and <a href="http://accessibility.psu.edu/headings">Penn State's AccessAbility</a>.</p>
|
||||
|
||||
<h3>Additional resources</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/squizlabs/HTML_CodeSniffer">"HTML Codesniffer" bookmarklet for identifying accessibility issues</a></li>
|
||||
<li><a href="http://a11yproject.com/">The A11Y Project</a></li>
|
||||
<li><a href="https://developer.mozilla.org/en-US/docs/Accessibility">MDN accessibility documentation</a></li>
|
||||
</ul>
|
||||
<h3>Additional resources</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/squizlabs/HTML_CodeSniffer">"HTML Codesniffer" bookmarklet for identifying accessibility issues</a></li>
|
||||
<li><a href="http://a11yproject.com/">The A11Y Project</a></li>
|
||||
<li><a href="https://developer.mozilla.org/en-US/docs/Accessibility">MDN accessibility documentation</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- License FAQs
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="license-faqs" class="page-header">License FAQs</h1>
|
||||
<p class="lead">Bootstrap is released under the MIT license and is copyright {{ site.time | date: "%Y" }} Twitter. Boiled down to smaller chunks, it can be described with the following conditions.</p>
|
||||
|
||||
<h4>It requires you to:</h4>
|
||||
<ul>
|
||||
<li>Include the license and copyright notice in your works</li>
|
||||
</ul>
|
||||
|
||||
<h4>It permits you to:</h4>
|
||||
<ul>
|
||||
<li>Freely download and use Bootstrap, in whole or in part, for personal, private, company internal, or commercial purposes</li>
|
||||
<li>Use Bootstrap in packages or distributions that you create</li>
|
||||
<li>Modify the source code</li>
|
||||
<li>Grant a sublicense to modify and distribute Bootstrap to third parties not included in the license</li>
|
||||
</ul>
|
||||
|
||||
<h4>It forbids you to:</h4>
|
||||
<ul>
|
||||
<li>Hold the authors and license owners liable for damages as Bootstrap is provided without warranty</li>
|
||||
<li>Hold the creators or copyright holders of Bootstrap liable</li>
|
||||
<li>Redistribute any piece of Bootstrap without proper attribution</li>
|
||||
<li>Use any marks owned by Twitter in any way that might state or imply that Twitter endorses your distribution</li>
|
||||
<li>Use any marks owned by Twitter in any way that might state or imply that you created the Twitter software in question</li>
|
||||
</ul>
|
||||
|
||||
<h4>It does not require you to:</h4>
|
||||
<ul>
|
||||
<li>Include the source of Bootstrap itself, or of any modifications you may have made to it, in any redistribution you may assemble that includes it</li>
|
||||
<li>Submit changes that you make to Bootstrap back to the Bootstrap project (though such feedback is encouraged)</li>
|
||||
</ul>
|
||||
|
||||
<p>The full Bootstrap license is located <a href="{{ site.repo }}/blob/master/LICENSE">in the project repository</a> for more information.</p>
|
||||
</div><!-- /.bs-docs-section -->
|
||||
|
||||
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="customizing" class="page-header">Customizing Bootstrap</h1>
|
||||
<p class="lead">Bootstrap is best maintained when you treat it as a separate and independently-versioned dependency in your development environment. Doing this makes upgrading Bootstrap easier in the future.</p>
|
||||
|
||||
<p>Once you've downloaded and included Bootstrap's styles and scripts, you can customize its components. Just create a new stylesheet (LESS, if you like, or just plain CSS) to house your customizations.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Compiled or minified?</h4>
|
||||
<p>Unless you plan on reading the CSS, go with minified stylesheets. It's the same code, just compacted. Minified styles use less bandwidth, which is good, especially in production environments.</p>
|
||||
</div>
|
||||
|
||||
<p>From there, include whatever Bootstrap components and HTML content you need to create templates for your site's pages.</p>
|
||||
|
||||
<!-- License FAQs
|
||||
================================================== -->
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="license-faqs">License FAQs</h1>
|
||||
</div>
|
||||
<p class="lead">Bootstrap is released under the MIT license and is copyright {{ site.time | date: "%Y" }} Twitter. Boiled down to smaller chunks, it can be described with the following conditions.</p>
|
||||
|
||||
<h4>It requires you to:</h4>
|
||||
<ul>
|
||||
<li>Include the license and copyright notice in your works</li>
|
||||
</ul>
|
||||
|
||||
<h4>It permits you to:</h4>
|
||||
<ul>
|
||||
<li>Freely download and use Bootstrap, in whole or in part, for personal, private, company internal, or commercial purposes</li>
|
||||
<li>Use Bootstrap in packages or distributions that you create</li>
|
||||
<li>Modify the source code</li>
|
||||
<li>Grant a sublicense to modify and distribute Bootstrap to third parties not included in the license</li>
|
||||
</ul>
|
||||
|
||||
<h4>It forbids you to:</h4>
|
||||
<ul>
|
||||
<li>Hold the authors and license owners liable for damages as Bootstrap is provided without warranty</li>
|
||||
<li>Hold the creators or copyright holders of Bootstrap liable</li>
|
||||
<li>Redistribute any piece of Bootstrap without proper attribution</li>
|
||||
<li>Use any marks owned by Twitter in any way that might state or imply that Twitter endorses your distribution</li>
|
||||
<li>Use any marks owned by Twitter in any way that might state or imply that you created the Twitter software in question</li>
|
||||
</ul>
|
||||
|
||||
<h4>It does not require you to:</h4>
|
||||
<ul>
|
||||
<li>Include the source of Bootstrap itself, or of any modifications you may have made to it, in any redistribution you may assemble that includes it</li>
|
||||
<li>Submit changes that you make to Bootstrap back to the Bootstrap project (though such feedback is encouraged)</li>
|
||||
</ul>
|
||||
|
||||
<p>The full Bootstrap license is located <a href="{{ site.repo }}/blob/master/LICENSE">in the project repository</a> for more information.</p>
|
||||
</div><!-- /.bs-docs-section -->
|
||||
|
||||
|
||||
<div class="bs-docs-section">
|
||||
<div class="page-header">
|
||||
<h1 id="customizing">Customizing Bootstrap</h1>
|
||||
</div>
|
||||
<p class="lead">Bootstrap is best maintained when you treat it as a separate and independently-versioned dependency in your development environment. Doing this makes upgrading Bootstrap easier in the future.</p>
|
||||
|
||||
<p>Once you've downloaded and included Bootstrap's styles and scripts, you can customize its components. Just create a new stylesheet (LESS, if you like, or just plain CSS) to house your customizations.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Compiled or minified?</h4>
|
||||
<p>Unless you plan on reading the CSS, go with minified stylesheets. It's the same code, just compacted. Minified styles use less bandwidth, which is good, especially in production environments.</p>
|
||||
</div>
|
||||
|
||||
<p>From there, include whatever Bootstrap components and HTML content you need to create templates for your site's pages.</p>
|
||||
|
||||
<h3>Customizing components</h3>
|
||||
<p>You can customize components to varying degrees, but most fall into two camps: <em>light customizations</em> and <em>overhauls</em>. Plenty examples of both are available from third parties.</p>
|
||||
<p>We define <em>light customizations</em> as superficial changes, for example, color and font changes to existing Bootstrap components. A light customization example is the <a href="http://translate.twitter.com">Twitter Translation Center</a> (coded by <a href="https://twitter.com/mdo">@mdo</a>). Let's look at how to implement the custom button we wrote for this site, <code>.btn-ttc</code>.</p>
|
||||
<p>The stock Bootstrap buttons require just one class, <code>.btn</code>, to start. Here we extend the <code>.btn</code> style with a new modifier class, <code>.btn-ttc</code>, that we will create. This gives us a distinct custom look with minimal effort.</p>
|
||||
<p>Our customized button will be coded like this:</p>
|
||||
<h3>Customizing components</h3>
|
||||
<p>You can customize components to varying degrees, but most fall into two camps: <em>light customizations</em> and <em>overhauls</em>. Plenty examples of both are available from third parties.</p>
|
||||
<p>We define <em>light customizations</em> as superficial changes, for example, color and font changes to existing Bootstrap components. A light customization example is the <a href="http://translate.twitter.com">Twitter Translation Center</a> (coded by <a href="https://twitter.com/mdo">@mdo</a>). Let's look at how to implement the custom button we wrote for this site, <code>.btn-ttc</code>.</p>
|
||||
<p>The stock Bootstrap buttons require just one class, <code>.btn</code>, to start. Here we extend the <code>.btn</code> style with a new modifier class, <code>.btn-ttc</code>, that we will create. This gives us a distinct custom look with minimal effort.</p>
|
||||
<p>Our customized button will be coded like this:</p>
|
||||
{% highlight html %}
|
||||
<button type="button" class="btn btn-ttc">Save changes</button>
|
||||
{% endhighlight %}
|
||||
<p>Note how <code>.btn-ttc</code> is added to the standard <code>.btn</code> class.</p>
|
||||
<p>Note how <code>.btn-ttc</code> is added to the standard <code>.btn</code> class.</p>
|
||||
|
||||
<p>To implement this, in the custom stylesheet, add the following CSS:</p>
|
||||
<p>To implement this, in the custom stylesheet, add the following CSS:</p>
|
||||
|
||||
{% highlight css %}
|
||||
/* Custom button
|
||||
@ -1085,23 +1075,22 @@ if (isAndroid) {
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
<p>In short: Look to the style source and duplicate the selectors you need for your modifications.</p>
|
||||
<p><strong>In summary, here's the basic workflow:</strong></p>
|
||||
<ul>
|
||||
<li>For each element you want to customize, find its code in the compiled Bootstrap CSS.</li>
|
||||
<li>Copy the component's selector and styles and paste them in your custom stylesheet. For instance, to customize the navbar background, just copy the <code>.navbar</code> style specification.</li>
|
||||
<li>In your custom stylesheet, edit the CSS you just copied from the Bootstrap source. No need for prepending additional classes, or appending <code>!important</code> here. Keep it simple.</li>
|
||||
<li>Rinse and repeat until you're happy with your customizations.</li>
|
||||
</ul>
|
||||
<p>Once you are comfortable performing light customizations, visual overhauls are just as straightforward. For a site like <a href="http://yourkarma.com">Karma</a>, which uses Bootstrap as a CSS reset with heavy modifications, more extensive work is involved. But the same principle applies: include Bootstrap's default stylesheet first, then apply your custom stylesheet.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Alternate customization methods</h4>
|
||||
<p>While not recommended for folks new to Bootstrap, you may use one of two alternate methods for customization. The first is modifying the source <code>.less</code> files (making upgrades super difficult), and the second is mapping source LESS code to <a href="http://ruby.bvision.com/blog/please-stop-embedding-bootstrap-classes-in-your-html">your own classes via mixins</a>. For the time being, neither of those options are documented here.</p>
|
||||
</div>
|
||||
|
||||
<h3>Removing potential bloat</h3>
|
||||
<p>Not all sites and applications need to make use of everything Bootstrap has to offer, especially in production environments where optimizing bandwidth is an issue. We encourage you to remove whatever is unused with our <a href="../customize/">Customizer</a>.</p>
|
||||
<p>Using the Customizer, simply uncheck any component, feature, or asset you don't need. Hit download and swap out the default Bootstrap files with these newly customized ones. You'll get vanilla Bootstrap, but without the features *you* deem unnecessary. All custom builds include compiled and minified versions, so use whichever works for you.</p>
|
||||
<p>In short: Look to the style source and duplicate the selectors you need for your modifications.</p>
|
||||
<p><strong>In summary, here's the basic workflow:</strong></p>
|
||||
<ul>
|
||||
<li>For each element you want to customize, find its code in the compiled Bootstrap CSS.</li>
|
||||
<li>Copy the component's selector and styles and paste them in your custom stylesheet. For instance, to customize the navbar background, just copy the <code>.navbar</code> style specification.</li>
|
||||
<li>In your custom stylesheet, edit the CSS you just copied from the Bootstrap source. No need for prepending additional classes, or appending <code>!important</code> here. Keep it simple.</li>
|
||||
<li>Rinse and repeat until you're happy with your customizations.</li>
|
||||
</ul>
|
||||
<p>Once you are comfortable performing light customizations, visual overhauls are just as straightforward. For a site like <a href="http://yourkarma.com">Karma</a>, which uses Bootstrap as a CSS reset with heavy modifications, more extensive work is involved. But the same principle applies: include Bootstrap's default stylesheet first, then apply your custom stylesheet.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Alternate customization methods</h4>
|
||||
<p>While not recommended for folks new to Bootstrap, you may use one of two alternate methods for customization. The first is modifying the source <code>.less</code> files (making upgrades super difficult), and the second is mapping source LESS code to <a href="http://ruby.bvision.com/blog/please-stop-embedding-bootstrap-classes-in-your-html">your own classes via mixins</a>. For the time being, neither of those options are documented here.</p>
|
||||
</div>
|
||||
|
||||
<h3>Removing potential bloat</h3>
|
||||
<p>Not all sites and applications need to make use of everything Bootstrap has to offer, especially in production environments where optimizing bandwidth is an issue. We encourage you to remove whatever is unused with our <a href="../customize/">Customizer</a>.</p>
|
||||
<p>Using the Customizer, simply uncheck any component, feature, or asset you don't need. Hit download and swap out the default Bootstrap files with these newly customized ones. You'll get vanilla Bootstrap, but without the features *you* deem unnecessary. All custom builds include compiled and minified versions, so use whichever works for you.</p>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user