mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-20 04:11:39 +02:00
fix indenting and remove hidden subnav on Scaffolding
This commit is contained in:
@@ -68,26 +68,17 @@
|
|||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<!-- Masthead
|
<!-- Subhead
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<header class="jumbotron subhead" id="overview">
|
<header class="jumbotron subhead" id="overview">
|
||||||
<h1>Scaffolding</h1>
|
<h1>Scaffolding</h1>
|
||||||
<p class="lead">Bootstrap is built on a responsive 12-column grid. We've also included fixed- and fluid-width layouts based on that system.</p>
|
<p class="lead">Bootstrap is built on a responsive 12-column grid. We've also included fixed- and fluid-width layouts based on that system.</p>
|
||||||
<div class="navbar navbar-subnav">
|
|
||||||
<div class="navbar-inner">
|
|
||||||
<ul class="nav">
|
|
||||||
<li><a href="#global">Global styles</a></li>
|
|
||||||
<li><a href="#gridSystem">Grid system</a></li>
|
|
||||||
<li><a href="#fluidGridSystem">Fluid grid system</a></li>
|
|
||||||
<li><a href="#gridCustomization">Customizing</a></li>
|
|
||||||
<li><a href="#layouts">Layouts</a></li>
|
|
||||||
<li><a href="#responsive">Responsive design</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Docs nav
|
||||||
|
================================================== -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span3 bs-docs-sidebar">
|
<div class="span3 bs-docs-sidebar">
|
||||||
<ul class="nav nav-list bs-docs-sidenav">
|
<ul class="nav nav-list bs-docs-sidenav">
|
||||||
@@ -103,15 +94,15 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Global Bootstrap settings
|
<!-- Global Bootstrap settings
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<section id="global">
|
<section id="global">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>Global styles <small>for CSS reset, typography, and links</small></h1>
|
<h1>Global styles <small>for CSS reset, typography, and links</small></h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Requires HTML5 doctype</h2>
|
<h2>Requires HTML5 doctype</h2>
|
||||||
<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>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>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
@@ -119,89 +110,89 @@
|
|||||||
</html>
|
</html>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2>Typography and links</h2>
|
<h2>Typography and links</h2>
|
||||||
<p>Bootstrap sets basic global display, typography, and link styles. Specifically, we:</p>
|
<p>Bootstrap sets basic global display, typography, and link styles. Specifically, we:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Remove <code>margin</code> on the body</li>
|
<li>Remove <code>margin</code> on the body</li>
|
||||||
<li>Set <code>background-color: white;</code> on the <code>body</code></li>
|
<li>Set <code>background-color: white;</code> on the <code>body</code></li>
|
||||||
<li>Use the <code>@baseFontFamily</code>, <code>@baseFontSize</code>, and <code>@baseLineHeight</code> attributes as our typographyic base</li>
|
<li>Use the <code>@baseFontFamily</code>, <code>@baseFontSize</code>, and <code>@baseLineHeight</code> attributes as our typographyic base</li>
|
||||||
<li>Set the global link color via <code>@linkColor</code> and apply link underlines only on <code>:hover</code></li>
|
<li>Set the global link color via <code>@linkColor</code> and apply link underlines only on <code>:hover</code></li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>These styles can be found within <strong>scaffolding.less</strong>.</p>
|
<p>These styles can be found within <strong>scaffolding.less</strong>.</p>
|
||||||
|
|
||||||
<h2>Reset via Normalize</h2>
|
<h2>Reset via Normalize</h2>
|
||||||
<p>With Bootstrap 2, the old reset block has been dropped in favor of <a href="http://necolas.github.com/normalize.css/" target="_blank">Normalize.css</a>, a project by <a href="http://twitter.com/necolas" target="_blank">Nicolas Gallagher</a> that also powers the <a href="http://html5boilerplate.com" target="_blank">HTML5 Boilerplate</a>. While we use much of Normalize within our <strong>reset.less</strong>, we have removed some elements specifically for Bootstrap.</p>
|
<p>With Bootstrap 2, the old reset block has been dropped in favor of <a href="http://necolas.github.com/normalize.css/" target="_blank">Normalize.css</a>, a project by <a href="http://twitter.com/necolas" target="_blank">Nicolas Gallagher</a> that also powers the <a href="http://html5boilerplate.com" target="_blank">HTML5 Boilerplate</a>. While we use much of Normalize within our <strong>reset.less</strong>, we have removed some elements specifically for Bootstrap.</p>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Grid system
|
<!-- Grid system
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<section id="gridSystem">
|
<section id="gridSystem">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>Default grid system <small>12 columns with a responsive twist</small></h1>
|
<h1>Default grid system <small>12 columns with a responsive twist</small></h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Live grid example</h2>
|
<h2>Live grid example</h2>
|
||||||
<p>The default Bootstrap grid system utilizes <strong>12 columns</strong>, making for a 940px wide container without <a href="#responsive">responsive features</a> enabled. With the responsive CSS file added, the grid adapts to be 724px and 1170px wide depending on your viewport. Below 767px viewports, the columns become fluid and stack vertically.</p>
|
<p>The default Bootstrap grid system utilizes <strong>12 columns</strong>, making for a 940px wide container without <a href="#responsive">responsive features</a> enabled. With the responsive CSS file added, the grid adapts to be 724px and 1170px wide depending on your viewport. Below 767px viewports, the columns become fluid and stack vertically.</p>
|
||||||
<div class="bs-docs-grid">
|
<div class="bs-docs-grid">
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span2">2</div>
|
<div class="span2">2</div>
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
<div class="span6">6</div>
|
<div class="span6">6</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span5">5</div>
|
<div class="span5">5</div>
|
||||||
<div class="span5">5</div>
|
<div class="span5">5</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span10">10</div>
|
<div class="span10">10</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3>Basic grid HTML</h3>
|
<h3>Basic grid HTML</h3>
|
||||||
<p>For a simple two column layout, create a <code>.row</code> and add the appropriate number of <code>.span*</code> columns. As this is a 12-column grid, each <code>.span*</code> spans a number of those 12 columns, and should always add up to 12 for each row.</p>
|
<p>For a simple two column layout, create a <code>.row</code> and add the appropriate number of <code>.span*</code> columns. As this is a 12-column grid, each <code>.span*</code> spans a number of those 12 columns, and should always add up to 12 for each row.</p>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span4">...</div>
|
<div class="span4">...</div>
|
||||||
<div class="span8">...</div>
|
<div class="span8">...</div>
|
||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
<p>Given this example, we have <code>.span4</code> and <code>.span8</code>, making for 12 total columns and a complete row.</p>
|
<p>Given this example, we have <code>.span4</code> and <code>.span8</code>, making for 12 total columns and a complete row.</p>
|
||||||
|
|
||||||
<h2>Offsetting columns</h2>
|
<h2>Offsetting columns</h2>
|
||||||
<p>Move columns to the left using <code>.offset*</code> classes. Each class increases the left margin of a column by a whole column. For example, <code>.offset4</code> moves <code>.span4</code> over four columns.</p>
|
<p>Move columns to the left using <code>.offset*</code> classes. Each class increases the left margin of a column by a whole column. For example, <code>.offset4</code> moves <code>.span4</code> over four columns.</p>
|
||||||
<div class="bs-docs-grid">
|
<div class="bs-docs-grid">
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
<div class="span4 offset2">4 offset 2</div>
|
<div class="span4 offset2">4 offset 2</div>
|
||||||
</div><!-- /row -->
|
</div><!-- /row -->
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span3 offset2">3 offset 2</div>
|
<div class="span3 offset2">3 offset 2</div>
|
||||||
<div class="span3 offset2">3 offset 2</div>
|
<div class="span3 offset2">3 offset 2</div>
|
||||||
</div><!-- /row -->
|
</div><!-- /row -->
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span6 offset4">6 offset 4</div>
|
<div class="span6 offset4">6 offset 4</div>
|
||||||
</div><!-- /row -->
|
</div><!-- /row -->
|
||||||
</div>
|
</div>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span4">...</div>
|
<div class="span4">...</div>
|
||||||
@@ -209,23 +200,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2>Nesting columns</h2>
|
<h2>Nesting columns</h2>
|
||||||
<p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.span*</code> columns within an existing <code>.span*</code> column. Nested rows should include a set of columns that add up to the number of columns of its parent.</p>
|
<p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.span*</code> columns within an existing <code>.span*</code> column. Nested rows should include a set of columns that add up to the number of columns of its parent.</p>
|
||||||
<h3>Example</h3>
|
<h3>Example</h3>
|
||||||
<p>Here two nested <code>.span4</code> columns are placed within a <code>.span8</code>.</p>
|
<p>Here two nested <code>.span4</code> columns are placed within a <code>.span8</code>.</p>
|
||||||
<div class="row show-grid">
|
|
||||||
<div class="span10">
|
|
||||||
Level 1 of column
|
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span5">
|
<div class="span10">
|
||||||
Level 2
|
Level 1 of column
|
||||||
</div>
|
<div class="row show-grid">
|
||||||
<div class="span5">
|
<div class="span5">
|
||||||
Level 2
|
Level 2
|
||||||
|
</div>
|
||||||
|
<div class="span5">
|
||||||
|
Level 2
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span10">
|
<div class="span10">
|
||||||
@@ -237,54 +228,54 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Fluid grid system
|
<!-- Fluid grid system
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<section id="fluidGridSystem">
|
<section id="fluidGridSystem">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>Fluid grid system <small>12 responsive, percent-based columns</small></h1>
|
<h1>Fluid grid system <small>12 responsive, percent-based columns</small></h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Live fluid grid example</h2>
|
<h2>Live fluid grid example</h2>
|
||||||
<p>The fluid grid system uses percents instead of pixels for column widths. It has the same responsive capabilities as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.</p>
|
<p>The fluid grid system uses percents instead of pixels for column widths. It has the same responsive capabilities as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.</p>
|
||||||
<div class="bs-docs-grid">
|
<div class="bs-docs-grid">
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
<div class="span8">8</div>
|
<div class="span8">8</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span6">6</div>
|
<div class="span6">6</div>
|
||||||
<div class="span6">6</div>
|
<div class="span6">6</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span12">12</div>
|
<div class="span12">12</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3>Basic fluid grid HTML</h3>
|
<h3>Basic fluid grid HTML</h3>
|
||||||
<p>Make any row "fluid" by changing <code>.row</code> to <code>.row-fluid</code>. The column classes stay the exact same, making it easy to flip between fixed and fluid grids.</p>
|
<p>Make any row "fluid" by changing <code>.row</code> to <code>.row-fluid</code>. The column classes stay the exact same, making it easy to flip between fixed and fluid grids.</p>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span4">...</div>
|
<div class="span4">...</div>
|
||||||
@@ -292,21 +283,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2>Fluid offsetting</h2>
|
<h2>Fluid offsetting</h2>
|
||||||
<p>Operates the same way as the fixed grid system offsetting: add <code>.offset*</code> to any column to offset by that many columns.</p>
|
<p>Operates the same way as the fixed grid system offsetting: add <code>.offset*</code> to any column to offset by that many columns.</p>
|
||||||
<div class="bs-docs-grid">
|
<div class="bs-docs-grid">
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
<div class="span4 offset4">4 offset 4</div>
|
<div class="span4 offset4">4 offset 4</div>
|
||||||
</div><!-- /row -->
|
</div><!-- /row -->
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span3 offset3">3 offset 3</div>
|
<div class="span3 offset3">3 offset 3</div>
|
||||||
<div class="span3 offset3">3 offset 3</div>
|
<div class="span3 offset3">3 offset 3</div>
|
||||||
</div><!-- /row -->
|
</div><!-- /row -->
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span6 offset6">6 offset 6</div>
|
<div class="span6 offset6">6 offset 6</div>
|
||||||
</div><!-- /row -->
|
</div><!-- /row -->
|
||||||
</div>
|
</div>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span4">...</div>
|
<div class="span4">...</div>
|
||||||
@@ -314,21 +305,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2>Fluid nesting</h2>
|
<h2>Fluid nesting</h2>
|
||||||
<p>Nesting with fluid grids is a bit different: the number of nested columns should not match the parent's number of columns. Instead, each level of nested columns are reset because each row takes up 100% of the parent column.</p>
|
<p>Nesting with fluid grids is a bit different: the number of nested columns should not match the parent's number of columns. Instead, each level of nested columns are reset because each row takes up 100% of the parent column.</p>
|
||||||
<div class="row-fluid show-grid">
|
|
||||||
<div class="span12">
|
|
||||||
Fluid 12
|
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span6">
|
<div class="span12">
|
||||||
Fluid 6
|
Fluid 12
|
||||||
</div>
|
<div class="row-fluid show-grid">
|
||||||
<div class="span6">
|
<div class="span6">
|
||||||
Fluid 6
|
Fluid 6
|
||||||
|
</div>
|
||||||
|
<div class="span6">
|
||||||
|
Fluid 6
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
@@ -341,78 +332,78 @@
|
|||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Customizaton
|
<!-- Customizaton
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<section id="gridCustomization">
|
<section id="gridCustomization">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>Grid customization</h1>
|
<h1>Grid customization</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Variables in LESS</h2>
|
<h2>Variables in LESS</h2>
|
||||||
<p>The default grid is built on a few variables for easy customization via LESS. All variables can be found in <strong>variables.less</strong>.</p>
|
<p>The default grid is built on a few variables for easy customization via LESS. All variables can be found in <strong>variables.less</strong>.</p>
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Variable</th>
|
<th>Variable</th>
|
||||||
<th>Default value</th>
|
<th>Default value</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>@gridColumns</code></td>
|
<td><code>@gridColumns</code></td>
|
||||||
<td>12</td>
|
<td>12</td>
|
||||||
<td>Number of columns</td>
|
<td>Number of columns</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>@gridColumnWidth</code></td>
|
<td><code>@gridColumnWidth</code></td>
|
||||||
<td>60px</td>
|
<td>60px</td>
|
||||||
<td>Width of each column</td>
|
<td>Width of each column</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>@gridGutterWidth</code></td>
|
<td><code>@gridGutterWidth</code></td>
|
||||||
<td>20px</td>
|
<td>20px</td>
|
||||||
<td>Negative space between columns</td>
|
<td>Negative space between columns</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>@fluidGridColumnWidth</code></td>
|
<td><code>@fluidGridColumnWidth</code></td>
|
||||||
<td>6.382978723%</td>
|
<td>6.382978723%</td>
|
||||||
<td>Width of each fluid column</td>
|
<td>Width of each fluid column</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>@fluidGridGutterWidth</code></td>
|
<td><code>@fluidGridGutterWidth</code></td>
|
||||||
<td>2.127659574%</td>
|
<td>2.127659574%</td>
|
||||||
<td>Negative space between fluid columns</td>
|
<td>Negative space between fluid columns</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3>How to customize</h3>
|
<h3>How to customize</h3>
|
||||||
<p>Modifying the grid means changing the three <code>@grid*</code> variables and recompiling Bootstrap. Change the grid variables in <strong>variables.less</strong> and use one of the <a href="less.html#compiling">four ways documented to recompile</a>. If you're adding more columns, be sure to add the CSS for those in <strong>grid.less</strong>.</p>
|
<p>Modifying the grid means changing the three <code>@grid*</code> variables and recompiling Bootstrap. Change the grid variables in <strong>variables.less</strong> and use one of the <a href="less.html#compiling">four ways documented to recompile</a>. If you're adding more columns, be sure to add the CSS for those in <strong>grid.less</strong>.</p>
|
||||||
|
|
||||||
<h2>Staying responsive</h2>
|
<h2>Staying responsive</h2>
|
||||||
<p>Customization of the grid only works at the default level, the 940px grid. To maintain the responsive aspects of Bootstrap, you'll also have to manually customize the grids in <strong>responsive.less</strong> until a future update improves this.</p>
|
<p>Customization of the grid only works at the default level, the 940px grid. To maintain the responsive aspects of Bootstrap, you'll also have to manually customize the grids in <strong>responsive.less</strong> until a future update improves this.</p>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Layouts (Default and fluid)
|
<!-- Layouts (Default and fluid)
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<section id="layouts">
|
<section id="layouts">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>Layouts <small>Basic templates to create webpages</small></h1>
|
<h1>Layouts <small>Basic templates to create webpages</small></h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Fixed layout</h2>
|
<h2>Fixed layout</h2>
|
||||||
<p>Provides a common fixed-width (and optionally responsive) layout with only <code><div class="container"></code> required.</p>
|
<p>Provides a common fixed-width (and optionally responsive) layout with only <code><div class="container"></code> required.</p>
|
||||||
<div class="mini-layout">
|
<div class="mini-layout">
|
||||||
<div class="mini-layout-body"></div>
|
<div class="mini-layout-body"></div>
|
||||||
</div>
|
</div>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@@ -421,12 +412,12 @@
|
|||||||
</body>
|
</body>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2>Fluid layout</h2>
|
<h2>Fluid layout</h2>
|
||||||
<p>Create a fluid, two-column page with <code><div class="container-fluid"></code>—great for applications and docs.</p>
|
<p>Create a fluid, two-column page with <code><div class="container-fluid"></code>—great for applications and docs.</p>
|
||||||
<div class="mini-layout fluid">
|
<div class="mini-layout fluid">
|
||||||
<div class="mini-layout-sidebar"></div>
|
<div class="mini-layout-sidebar"></div>
|
||||||
<div class="mini-layout-body"></div>
|
<div class="mini-layout-body"></div>
|
||||||
</div>
|
</div>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
@@ -439,78 +430,78 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Responsive design
|
<!-- Responsive design
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<section id="responsive">
|
<section id="responsive">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>Responsive design <small>Media queries for various devices and resolutions</small></h1>
|
<h1>Responsive design <small>Media queries for various devices and resolutions</small></h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Enabling responsive features</h2>
|
<h2>Enabling responsive features</h2>
|
||||||
<p>Turn on responsive CSS in your project by including the proper meta tag and additional stylesheet within the <code><head></code> of your document. If you've compiled Bootstrap from the Customize page, you need only include the meta tag.</p>
|
<p>Turn on responsive CSS in your project by including the proper meta tag and additional stylesheet within the <code><head></code> of your document. If you've compiled Bootstrap from the Customize page, you need only include the meta tag.</p>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
</pre>
|
</pre>
|
||||||
<p><span class="label label-info">Heads up!</span> Bootstrap doesn't include responsive features by default at this time as not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it as needed.</p>
|
<p><span class="label label-info">Heads up!</span> Bootstrap doesn't include responsive features by default at this time as not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it as needed.</p>
|
||||||
|
|
||||||
<h2>About responsive Bootstrap</h2>
|
<h2>About responsive Bootstrap</h2>
|
||||||
<img src="assets/img/responsive-illustrations.png" alt="Responsive devices" style="float: right; margin: 0 0 20px 20px;">
|
<img src="assets/img/responsive-illustrations.png" alt="Responsive devices" style="float: right; margin: 0 0 20px 20px;">
|
||||||
<p>Media queries allow for custom CSS based on a number of conditions—ratios, widths, display type, etc—but usually focuses around <code>min-width</code> and <code>max-width</code>.</p>
|
<p>Media queries allow for custom CSS based on a number of conditions—ratios, widths, display type, etc—but usually focuses around <code>min-width</code> and <code>max-width</code>.</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Modify the width of column in our grid</li>
|
<li>Modify the width of column in our grid</li>
|
||||||
<li>Stack elements instead of float wherever necessary</li>
|
<li>Stack elements instead of float wherever necessary</li>
|
||||||
<li>Resize headings and text to be more appropriate for devices</li>
|
<li>Resize headings and text to be more appropriate for devices</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Use media queries responsibly and only as a start to your mobile audiences. For larger projects, do consider dedicated code bases and not layers of media queries.</p>
|
<p>Use media queries responsibly and only as a start to your mobile audiences. For larger projects, do consider dedicated code bases and not layers of media queries.</p>
|
||||||
|
|
||||||
<h2>Supported devices</h2>
|
<h2>Supported devices</h2>
|
||||||
<p>Bootstrap supports a handful of media queries in a single file to help make your projects more appropriate on different devices and screen resolutions. Here's what's included:</p>
|
<p>Bootstrap supports a handful of media queries in a single file to help make your projects more appropriate on different devices and screen resolutions. Here's what's included:</p>
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Label</th>
|
<th>Label</th>
|
||||||
<th>Layout width</th>
|
<th>Layout width</th>
|
||||||
<th>Column width</th>
|
<th>Column width</th>
|
||||||
<th>Gutter width</th>
|
<th>Gutter width</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Phones</td>
|
<td>Phones</td>
|
||||||
<td>480px and below</td>
|
<td>480px and below</td>
|
||||||
<td class="muted" colspan="2">Fluid columns, no fixed widths</td>
|
<td class="muted" colspan="2">Fluid columns, no fixed widths</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Phones to tablets</td>
|
<td>Phones to tablets</td>
|
||||||
<td>767px and below</td>
|
<td>767px and below</td>
|
||||||
<td class="muted" colspan="2">Fluid columns, no fixed widths</td>
|
<td class="muted" colspan="2">Fluid columns, no fixed widths</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Portrait tablets</td>
|
<td>Portrait tablets</td>
|
||||||
<td>768px and above</td>
|
<td>768px and above</td>
|
||||||
<td>42px</td>
|
<td>42px</td>
|
||||||
<td>20px</td>
|
<td>20px</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Default</td>
|
<td>Default</td>
|
||||||
<td>980px and up</td>
|
<td>980px and up</td>
|
||||||
<td>60px</td>
|
<td>60px</td>
|
||||||
<td>20px</td>
|
<td>20px</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Large display</td>
|
<td>Large display</td>
|
||||||
<td>1200px and up</td>
|
<td>1200px and up</td>
|
||||||
<td>70px</td>
|
<td>70px</td>
|
||||||
<td>30px</td>
|
<td>30px</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
/* Landscape phones and down */
|
/* Landscape phones and down */
|
||||||
@media (max-width: 480px) { ... }
|
@media (max-width: 480px) { ... }
|
||||||
@@ -526,81 +517,84 @@
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
<h2>Responsive utility classes</h2>
|
<h2>Responsive utility classes</h2>
|
||||||
<p>For faster mobile-friendly development, use these utility classes for showing and hiding content by device. Below is a table of the available classes and their effect on a given media query layout (labeled by device). They can be found in <code>responsive.less</code>.</p>
|
<p>For faster mobile-friendly development, use these utility classes for showing and hiding content by device. Below is a table of the available classes and their effect on a given media query layout (labeled by device). They can be found in <code>responsive.less</code>.</p>
|
||||||
<table class="table table-bordered table-striped responsive-utilities">
|
<table class="table table-bordered table-striped responsive-utilities">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Class</th>
|
<th>Class</th>
|
||||||
<th>Phones <small>767px and below</small></th>
|
<th>Phones <small>767px and below</small></th>
|
||||||
<th>Tablets <small>979px to 768px</small></th>
|
<th>Tablets <small>979px to 768px</small></th>
|
||||||
<th>Desktops <small>Default</small></th>
|
<th>Desktops <small>Default</small></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th><code>.visible-phone</code></th>
|
<th><code>.visible-phone</code></th>
|
||||||
<td class="is-visible">Visible</td>
|
<td class="is-visible">Visible</td>
|
||||||
<td class="is-hidden">Hidden</td>
|
<td class="is-hidden">Hidden</td>
|
||||||
<td class="is-hidden">Hidden</td>
|
<td class="is-hidden">Hidden</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><code>.visible-tablet</code></th>
|
<th><code>.visible-tablet</code></th>
|
||||||
<td class="is-hidden">Hidden</td>
|
<td class="is-hidden">Hidden</td>
|
||||||
<td class="is-visible">Visible</td>
|
<td class="is-visible">Visible</td>
|
||||||
<td class="is-hidden">Hidden</td>
|
<td class="is-hidden">Hidden</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><code>.visible-desktop</code></th>
|
<th><code>.visible-desktop</code></th>
|
||||||
<td class="is-hidden">Hidden</td>
|
<td class="is-hidden">Hidden</td>
|
||||||
<td class="is-hidden">Hidden</td>
|
<td class="is-hidden">Hidden</td>
|
||||||
<td class="is-visible">Visible</td>
|
<td class="is-visible">Visible</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><code>.hidden-phone</code></th>
|
<th><code>.hidden-phone</code></th>
|
||||||
<td class="is-hidden">Hidden</td>
|
<td class="is-hidden">Hidden</td>
|
||||||
<td class="is-visible">Visible</td>
|
<td class="is-visible">Visible</td>
|
||||||
<td class="is-visible">Visible</td>
|
<td class="is-visible">Visible</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><code>.hidden-tablet</code></th>
|
<th><code>.hidden-tablet</code></th>
|
||||||
<td class="is-visible">Visible</td>
|
<td class="is-visible">Visible</td>
|
||||||
<td class="is-hidden">Hidden</td>
|
<td class="is-hidden">Hidden</td>
|
||||||
<td class="is-visible">Visible</td>
|
<td class="is-visible">Visible</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><code>.hidden-desktop</code></th>
|
<th><code>.hidden-desktop</code></th>
|
||||||
<td class="is-visible">Visible</td>
|
<td class="is-visible">Visible</td>
|
||||||
<td class="is-visible">Visible</td>
|
<td class="is-visible">Visible</td>
|
||||||
<td class="is-hidden">Hidden</td>
|
<td class="is-hidden">Hidden</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3>When to use</h3>
|
<h3>When to use</h3>
|
||||||
<p>Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.</p>
|
<p>Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.</p>
|
||||||
|
|
||||||
<h3>Responsive utilities test case</h3>
|
<h3>Responsive utilities test case</h3>
|
||||||
<p>Resize your browser or load on different devices to test the above classes.</p>
|
<p>Resize your browser or load on different devices to test the above classes.</p>
|
||||||
<h4>Visible on...</h4>
|
<h4>Visible on...</h4>
|
||||||
<p>Green checkmarks indicate that class is visible in your current viewport.</p>
|
<p>Green checkmarks indicate that class is visible in your current viewport.</p>
|
||||||
<ul class="responsive-utilities-test">
|
<ul class="responsive-utilities-test">
|
||||||
<li>Phone<span class="visible-phone">✔ Phone</span></li>
|
<li>Phone<span class="visible-phone">✔ Phone</span></li>
|
||||||
<li>Tablet<span class="visible-tablet">✔ Tablet</span></li>
|
<li>Tablet<span class="visible-tablet">✔ Tablet</span></li>
|
||||||
<li>Desktop<span class="visible-desktop">✔ Desktop</span></li>
|
<li>Desktop<span class="visible-desktop">✔ Desktop</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h4>Hidden on...</h4>
|
<h4>Hidden on...</h4>
|
||||||
<p>Here, green checkmarks indicate that class is hidden in your current viewport.</p>
|
<p>Here, green checkmarks indicate that class is hidden in your current viewport.</p>
|
||||||
<ul class="responsive-utilities-test hidden-on">
|
<ul class="responsive-utilities-test hidden-on">
|
||||||
<li>Phone<span class="hidden-phone">✔ Phone</span></li>
|
<li>Phone<span class="hidden-phone">✔ Phone</span></li>
|
||||||
<li>Tablet<span class="hidden-tablet">✔ Tablet</span></li>
|
<li>Tablet<span class="hidden-tablet">✔ Tablet</span></li>
|
||||||
<li>Desktop<span class="hidden-desktop">✔ Desktop</span></li>
|
<li>Desktop<span class="hidden-desktop">✔ Desktop</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Footer
|
<!-- Footer
|
||||||
================================================== -->
|
================================================== -->
|
||||||
|
745
docs/templates/pages/scaffolding.mustache
vendored
745
docs/templates/pages/scaffolding.mustache
vendored
@@ -1,23 +1,14 @@
|
|||||||
<!-- Masthead
|
<!-- Subhead
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<header class="jumbotron subhead" id="overview">
|
<header class="jumbotron subhead" id="overview">
|
||||||
<h1>{{_i}}Scaffolding{{/i}}</h1>
|
<h1>{{_i}}Scaffolding{{/i}}</h1>
|
||||||
<p class="lead">{{_i}}Bootstrap is built on a responsive 12-column grid. We've also included fixed- and fluid-width layouts based on that system.{{/i}}</p>
|
<p class="lead">{{_i}}Bootstrap is built on a responsive 12-column grid. We've also included fixed- and fluid-width layouts based on that system.{{/i}}</p>
|
||||||
<div class="navbar navbar-subnav">
|
|
||||||
<div class="navbar-inner">
|
|
||||||
<ul class="nav">
|
|
||||||
<li><a href="#global">{{_i}}Global styles{{/i}}</a></li>
|
|
||||||
<li><a href="#gridSystem">{{_i}}Grid system{{/i}}</a></li>
|
|
||||||
<li><a href="#fluidGridSystem">{{_i}}Fluid grid system{{/i}}</a></li>
|
|
||||||
<li><a href="#gridCustomization">{{_i}}Customizing{{/i}}</a></li>
|
|
||||||
<li><a href="#layouts">{{_i}}Layouts{{/i}}</a></li>
|
|
||||||
<li><a href="#responsive">{{_i}}Responsive design{{/i}}</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Docs nav
|
||||||
|
================================================== -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span3 bs-docs-sidebar">
|
<div class="span3 bs-docs-sidebar">
|
||||||
<ul class="nav nav-list bs-docs-sidenav">
|
<ul class="nav nav-list bs-docs-sidenav">
|
||||||
@@ -33,15 +24,15 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Global Bootstrap settings
|
<!-- Global Bootstrap settings
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<section id="global">
|
<section id="global">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>{{_i}}Global styles <small>for CSS reset, typography, and links</small>{{/i}}</h1>
|
<h1>{{_i}}Global styles <small>for CSS reset, typography, and links</small>{{/i}}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>{{_i}}Requires HTML5 doctype{{/i}}</h2>
|
<h2>{{_i}}Requires HTML5 doctype{{/i}}</h2>
|
||||||
<p>{{_i}}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.{{/i}}</p>
|
<p>{{_i}}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.{{/i}}</p>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
@@ -49,89 +40,89 @@
|
|||||||
</html>
|
</html>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2>{{_i}}Typography and links{{/i}}</h2>
|
<h2>{{_i}}Typography and links{{/i}}</h2>
|
||||||
<p>{{_i}}Bootstrap sets basic global display, typography, and link styles. Specifically, we:{{/i}}</p>
|
<p>{{_i}}Bootstrap sets basic global display, typography, and link styles. Specifically, we:{{/i}}</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>{{_i}}Remove <code>margin</code> on the body{{/i}}</li>
|
<li>{{_i}}Remove <code>margin</code> on the body{{/i}}</li>
|
||||||
<li>{{_i}}Set <code>background-color: white;</code> on the <code>body</code>{{/i}}</li>
|
<li>{{_i}}Set <code>background-color: white;</code> on the <code>body</code>{{/i}}</li>
|
||||||
<li>{{_i}}Use the <code>@baseFontFamily</code>, <code>@baseFontSize</code>, and <code>@baseLineHeight</code> attributes as our typographyic base{{/i}}</li>
|
<li>{{_i}}Use the <code>@baseFontFamily</code>, <code>@baseFontSize</code>, and <code>@baseLineHeight</code> attributes as our typographyic base{{/i}}</li>
|
||||||
<li>{{_i}}Set the global link color via <code>@linkColor</code> and apply link underlines only on <code>:hover</code>{{/i}}</li>
|
<li>{{_i}}Set the global link color via <code>@linkColor</code> and apply link underlines only on <code>:hover</code>{{/i}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>{{_i}}These styles can be found within <strong>scaffolding.less</strong>.{{/i}}</p>
|
<p>{{_i}}These styles can be found within <strong>scaffolding.less</strong>.{{/i}}</p>
|
||||||
|
|
||||||
<h2>{{_i}}Reset via Normalize{{/i}}</h2>
|
<h2>{{_i}}Reset via Normalize{{/i}}</h2>
|
||||||
<p>{{_i}}With Bootstrap 2, the old reset block has been dropped in favor of <a href="http://necolas.github.com/normalize.css/" target="_blank">Normalize.css</a>, a project by <a href="http://twitter.com/necolas" target="_blank">Nicolas Gallagher</a> that also powers the <a href="http://html5boilerplate.com" target="_blank">HTML5 Boilerplate</a>. While we use much of Normalize within our <strong>reset.less</strong>, we have removed some elements specifically for Bootstrap.{{/i}}</p>
|
<p>{{_i}}With Bootstrap 2, the old reset block has been dropped in favor of <a href="http://necolas.github.com/normalize.css/" target="_blank">Normalize.css</a>, a project by <a href="http://twitter.com/necolas" target="_blank">Nicolas Gallagher</a> that also powers the <a href="http://html5boilerplate.com" target="_blank">HTML5 Boilerplate</a>. While we use much of Normalize within our <strong>reset.less</strong>, we have removed some elements specifically for Bootstrap.{{/i}}</p>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Grid system
|
<!-- Grid system
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<section id="gridSystem">
|
<section id="gridSystem">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>{{_i}}Default grid system <small>12 columns with a responsive twist</small>{{/i}}</h1>
|
<h1>{{_i}}Default grid system <small>12 columns with a responsive twist</small>{{/i}}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>{{_i}}Live grid example{{/i}}</h2>
|
<h2>{{_i}}Live grid example{{/i}}</h2>
|
||||||
<p>{{_i}}The default Bootstrap grid system utilizes <strong>12 columns</strong>, making for a 940px wide container without <a href="#responsive">responsive features</a> enabled. With the responsive CSS file added, the grid adapts to be 724px and 1170px wide depending on your viewport. Below 767px viewports, the columns become fluid and stack vertically.{{/i}}</p>
|
<p>{{_i}}The default Bootstrap grid system utilizes <strong>12 columns</strong>, making for a 940px wide container without <a href="#responsive">responsive features</a> enabled. With the responsive CSS file added, the grid adapts to be 724px and 1170px wide depending on your viewport. Below 767px viewports, the columns become fluid and stack vertically.{{/i}}</p>
|
||||||
<div class="bs-docs-grid">
|
<div class="bs-docs-grid">
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span2">2</div>
|
<div class="span2">2</div>
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
<div class="span6">6</div>
|
<div class="span6">6</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span5">5</div>
|
<div class="span5">5</div>
|
||||||
<div class="span5">5</div>
|
<div class="span5">5</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span10">10</div>
|
<div class="span10">10</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3>{{_i}}Basic grid HTML{{/i}}</h3>
|
<h3>{{_i}}Basic grid HTML{{/i}}</h3>
|
||||||
<p>{{_i}}For a simple two column layout, create a <code>.row</code> and add the appropriate number of <code>.span*</code> columns. As this is a 12-column grid, each <code>.span*</code> spans a number of those 12 columns, and should always add up to 12 for each row.{{/i}}</p>
|
<p>{{_i}}For a simple two column layout, create a <code>.row</code> and add the appropriate number of <code>.span*</code> columns. As this is a 12-column grid, each <code>.span*</code> spans a number of those 12 columns, and should always add up to 12 for each row.{{/i}}</p>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span4">...</div>
|
<div class="span4">...</div>
|
||||||
<div class="span8">...</div>
|
<div class="span8">...</div>
|
||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
<p>{{_i}}Given this example, we have <code>.span4</code> and <code>.span8</code>, making for 12 total columns and a complete row.{{/i}}</p>
|
<p>{{_i}}Given this example, we have <code>.span4</code> and <code>.span8</code>, making for 12 total columns and a complete row.{{/i}}</p>
|
||||||
|
|
||||||
<h2>{{_i}}Offsetting columns{{/i}}</h2>
|
<h2>{{_i}}Offsetting columns{{/i}}</h2>
|
||||||
<p>{{_i}}Move columns to the left using <code>.offset*</code> classes. Each class increases the left margin of a column by a whole column. For example, <code>.offset4</code> moves <code>.span4</code> over four columns.{{/i}}</p>
|
<p>{{_i}}Move columns to the left using <code>.offset*</code> classes. Each class increases the left margin of a column by a whole column. For example, <code>.offset4</code> moves <code>.span4</code> over four columns.{{/i}}</p>
|
||||||
<div class="bs-docs-grid">
|
<div class="bs-docs-grid">
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
<div class="span4 offset2">4 offset 2</div>
|
<div class="span4 offset2">4 offset 2</div>
|
||||||
</div><!-- /row -->
|
</div><!-- /row -->
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span3 offset2">3 offset 2</div>
|
<div class="span3 offset2">3 offset 2</div>
|
||||||
<div class="span3 offset2">3 offset 2</div>
|
<div class="span3 offset2">3 offset 2</div>
|
||||||
</div><!-- /row -->
|
</div><!-- /row -->
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span6 offset4">6 offset 4</div>
|
<div class="span6 offset4">6 offset 4</div>
|
||||||
</div><!-- /row -->
|
</div><!-- /row -->
|
||||||
</div>
|
</div>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span4">...</div>
|
<div class="span4">...</div>
|
||||||
@@ -139,23 +130,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2>{{_i}}Nesting columns{{/i}}</h2>
|
<h2>{{_i}}Nesting columns{{/i}}</h2>
|
||||||
<p>{{_i}}To nest your content with the default grid, add a new <code>.row</code> and set of <code>.span*</code> columns within an existing <code>.span*</code> column. Nested rows should include a set of columns that add up to the number of columns of its parent.{{/i}}</p>
|
<p>{{_i}}To nest your content with the default grid, add a new <code>.row</code> and set of <code>.span*</code> columns within an existing <code>.span*</code> column. Nested rows should include a set of columns that add up to the number of columns of its parent.{{/i}}</p>
|
||||||
<h3>{{_i}}Example{{/i}}</h3>
|
<h3>{{_i}}Example{{/i}}</h3>
|
||||||
<p>{{_i}}Here two nested <code>.span4</code> columns are placed within a <code>.span8</code>.{{/i}}</p>
|
<p>{{_i}}Here two nested <code>.span4</code> columns are placed within a <code>.span8</code>.{{/i}}</p>
|
||||||
<div class="row show-grid">
|
|
||||||
<div class="span10">
|
|
||||||
{{_i}}Level 1 of column{{/i}}
|
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span5">
|
<div class="span10">
|
||||||
{{_i}}Level 2{{/i}}
|
{{_i}}Level 1 of column{{/i}}
|
||||||
</div>
|
<div class="row show-grid">
|
||||||
<div class="span5">
|
<div class="span5">
|
||||||
{{_i}}Level 2{{/i}}
|
{{_i}}Level 2{{/i}}
|
||||||
|
</div>
|
||||||
|
<div class="span5">
|
||||||
|
{{_i}}Level 2{{/i}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span10">
|
<div class="span10">
|
||||||
@@ -167,54 +158,54 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Fluid grid system
|
<!-- Fluid grid system
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<section id="fluidGridSystem">
|
<section id="fluidGridSystem">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>{{_i}}Fluid grid system <small>12 responsive, percent-based columns</small>{{/i}}</h1>
|
<h1>{{_i}}Fluid grid system <small>12 responsive, percent-based columns</small>{{/i}}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>{{_i}}Live fluid grid example{{/i}}</h2>
|
<h2>{{_i}}Live fluid grid example{{/i}}</h2>
|
||||||
<p>{{_i}}The fluid grid system uses percents instead of pixels for column widths. It has the same responsive capabilities as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.{{/i}}</p>
|
<p>{{_i}}The fluid grid system uses percents instead of pixels for column widths. It has the same responsive capabilities as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.{{/i}}</p>
|
||||||
<div class="bs-docs-grid">
|
<div class="bs-docs-grid">
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
<div class="span1">1</div>
|
<div class="span1">1</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
<div class="span8">8</div>
|
<div class="span8">8</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span6">6</div>
|
<div class="span6">6</div>
|
||||||
<div class="span6">6</div>
|
<div class="span6">6</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span12">12</div>
|
<div class="span12">12</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3>{{_i}}Basic fluid grid HTML{{/i}}</h3>
|
<h3>{{_i}}Basic fluid grid HTML{{/i}}</h3>
|
||||||
<p>{{_i}}Make any row "fluid" by changing <code>.row</code> to <code>.row-fluid</code>. The column classes stay the exact same, making it easy to flip between fixed and fluid grids.{{/i}}</p>
|
<p>{{_i}}Make any row "fluid" by changing <code>.row</code> to <code>.row-fluid</code>. The column classes stay the exact same, making it easy to flip between fixed and fluid grids.{{/i}}</p>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span4">...</div>
|
<div class="span4">...</div>
|
||||||
@@ -222,21 +213,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2>{{_i}}Fluid offsetting{{/i}}</h2>
|
<h2>{{_i}}Fluid offsetting{{/i}}</h2>
|
||||||
<p>{{_i}}Operates the same way as the fixed grid system offsetting: add <code>.offset*</code> to any column to offset by that many columns.{{/i}}</p>
|
<p>{{_i}}Operates the same way as the fixed grid system offsetting: add <code>.offset*</code> to any column to offset by that many columns.{{/i}}</p>
|
||||||
<div class="bs-docs-grid">
|
<div class="bs-docs-grid">
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span4">4</div>
|
<div class="span4">4</div>
|
||||||
<div class="span4 offset4">4 offset 4</div>
|
<div class="span4 offset4">4 offset 4</div>
|
||||||
</div><!-- /row -->
|
</div><!-- /row -->
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span3 offset3">3 offset 3</div>
|
<div class="span3 offset3">3 offset 3</div>
|
||||||
<div class="span3 offset3">3 offset 3</div>
|
<div class="span3 offset3">3 offset 3</div>
|
||||||
</div><!-- /row -->
|
</div><!-- /row -->
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span6 offset6">6 offset 6</div>
|
<div class="span6 offset6">6 offset 6</div>
|
||||||
</div><!-- /row -->
|
</div><!-- /row -->
|
||||||
</div>
|
</div>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span4">...</div>
|
<div class="span4">...</div>
|
||||||
@@ -244,21 +235,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2>{{_i}}Fluid nesting{{/i}}</h2>
|
<h2>{{_i}}Fluid nesting{{/i}}</h2>
|
||||||
<p>{{_i}}Nesting with fluid grids is a bit different: the number of nested columns should not match the parent's number of columns. Instead, each level of nested columns are reset because each row takes up 100% of the parent column.{{/i}}</p>
|
<p>{{_i}}Nesting with fluid grids is a bit different: the number of nested columns should not match the parent's number of columns. Instead, each level of nested columns are reset because each row takes up 100% of the parent column.{{/i}}</p>
|
||||||
<div class="row-fluid show-grid">
|
|
||||||
<div class="span12">
|
|
||||||
{{_i}}Fluid 12{{/i}}
|
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span6">
|
<div class="span12">
|
||||||
{{_i}}Fluid 6{{/i}}
|
{{_i}}Fluid 12{{/i}}
|
||||||
</div>
|
<div class="row-fluid show-grid">
|
||||||
<div class="span6">
|
<div class="span6">
|
||||||
{{_i}}Fluid 6{{/i}}
|
{{_i}}Fluid 6{{/i}}
|
||||||
|
</div>
|
||||||
|
<div class="span6">
|
||||||
|
{{_i}}Fluid 6{{/i}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
@@ -271,78 +262,78 @@
|
|||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Customizaton
|
<!-- Customizaton
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<section id="gridCustomization">
|
<section id="gridCustomization">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>{{_i}}Grid customization{{/i}}</h1>
|
<h1>{{_i}}Grid customization{{/i}}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>{{_i}}Variables in LESS{{/i}}</h2>
|
<h2>{{_i}}Variables in LESS{{/i}}</h2>
|
||||||
<p>{{_i}}The default grid is built on a few variables for easy customization via LESS. All variables can be found in <strong>variables.less</strong>.{{/i}}</p>
|
<p>{{_i}}The default grid is built on a few variables for easy customization via LESS. All variables can be found in <strong>variables.less</strong>.{{/i}}</p>
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{_i}}Variable{{/i}}</th>
|
<th>{{_i}}Variable{{/i}}</th>
|
||||||
<th>{{_i}}Default value{{/i}}</th>
|
<th>{{_i}}Default value{{/i}}</th>
|
||||||
<th>{{_i}}Description{{/i}}</th>
|
<th>{{_i}}Description{{/i}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>@gridColumns</code></td>
|
<td><code>@gridColumns</code></td>
|
||||||
<td>12</td>
|
<td>12</td>
|
||||||
<td>{{_i}}Number of columns{{/i}}</td>
|
<td>{{_i}}Number of columns{{/i}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>@gridColumnWidth</code></td>
|
<td><code>@gridColumnWidth</code></td>
|
||||||
<td>60px</td>
|
<td>60px</td>
|
||||||
<td>{{_i}}Width of each column{{/i}}</td>
|
<td>{{_i}}Width of each column{{/i}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>@gridGutterWidth</code></td>
|
<td><code>@gridGutterWidth</code></td>
|
||||||
<td>20px</td>
|
<td>20px</td>
|
||||||
<td>{{_i}}Negative space between columns{{/i}}</td>
|
<td>{{_i}}Negative space between columns{{/i}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>@fluidGridColumnWidth</code></td>
|
<td><code>@fluidGridColumnWidth</code></td>
|
||||||
<td>6.382978723%</td>
|
<td>6.382978723%</td>
|
||||||
<td>{{_i}}Width of each fluid column{{/i}}</td>
|
<td>{{_i}}Width of each fluid column{{/i}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>@fluidGridGutterWidth</code></td>
|
<td><code>@fluidGridGutterWidth</code></td>
|
||||||
<td>2.127659574%</td>
|
<td>2.127659574%</td>
|
||||||
<td>{{_i}}Negative space between fluid columns{{/i}}</td>
|
<td>{{_i}}Negative space between fluid columns{{/i}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3>{{_i}}How to customize{{/i}}</h3>
|
<h3>{{_i}}How to customize{{/i}}</h3>
|
||||||
<p>{{_i}}Modifying the grid means changing the three <code>@grid*</code> variables and recompiling Bootstrap. Change the grid variables in <strong>variables.less</strong> and use one of the <a href="less.html#compiling">four ways documented to recompile</a>. If you're adding more columns, be sure to add the CSS for those in <strong>grid.less</strong>.{{/i}}</p>
|
<p>{{_i}}Modifying the grid means changing the three <code>@grid*</code> variables and recompiling Bootstrap. Change the grid variables in <strong>variables.less</strong> and use one of the <a href="less.html#compiling">four ways documented to recompile</a>. If you're adding more columns, be sure to add the CSS for those in <strong>grid.less</strong>.{{/i}}</p>
|
||||||
|
|
||||||
<h2>{{_i}}Staying responsive{{/i}}</h2>
|
<h2>{{_i}}Staying responsive{{/i}}</h2>
|
||||||
<p>{{_i}}Customization of the grid only works at the default level, the 940px grid. To maintain the responsive aspects of Bootstrap, you'll also have to manually customize the grids in <strong>responsive.less</strong> until a future update improves this.{{/i}}</p>
|
<p>{{_i}}Customization of the grid only works at the default level, the 940px grid. To maintain the responsive aspects of Bootstrap, you'll also have to manually customize the grids in <strong>responsive.less</strong> until a future update improves this.{{/i}}</p>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Layouts (Default and fluid)
|
<!-- Layouts (Default and fluid)
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<section id="layouts">
|
<section id="layouts">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>{{_i}}Layouts <small>Basic templates to create webpages</small>{{/i}}</h1>
|
<h1>{{_i}}Layouts <small>Basic templates to create webpages</small>{{/i}}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>{{_i}}Fixed layout{{/i}}</h2>
|
<h2>{{_i}}Fixed layout{{/i}}</h2>
|
||||||
<p>{{_i}}Provides a common fixed-width (and optionally responsive) layout with only <code><div class="container"></code> required.{{/i}}</p>
|
<p>{{_i}}Provides a common fixed-width (and optionally responsive) layout with only <code><div class="container"></code> required.{{/i}}</p>
|
||||||
<div class="mini-layout">
|
<div class="mini-layout">
|
||||||
<div class="mini-layout-body"></div>
|
<div class="mini-layout-body"></div>
|
||||||
</div>
|
</div>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@@ -351,12 +342,12 @@
|
|||||||
</body>
|
</body>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2>{{_i}}Fluid layout{{/i}}</h2>
|
<h2>{{_i}}Fluid layout{{/i}}</h2>
|
||||||
<p>{{_i}}Create a fluid, two-column page with <code><div class="container-fluid"></code>—great for applications and docs.{{/i}}</p>
|
<p>{{_i}}Create a fluid, two-column page with <code><div class="container-fluid"></code>—great for applications and docs.{{/i}}</p>
|
||||||
<div class="mini-layout fluid">
|
<div class="mini-layout fluid">
|
||||||
<div class="mini-layout-sidebar"></div>
|
<div class="mini-layout-sidebar"></div>
|
||||||
<div class="mini-layout-body"></div>
|
<div class="mini-layout-body"></div>
|
||||||
</div>
|
</div>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
@@ -369,81 +360,81 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Responsive design
|
<!-- Responsive design
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<section id="responsive">
|
<section id="responsive">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>{{_i}}Responsive design <small>Media queries for various devices and resolutions</small>{{/i}}</h1>
|
<h1>{{_i}}Responsive design <small>Media queries for various devices and resolutions</small>{{/i}}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{! Enabling }}
|
{{! Enabling }}
|
||||||
<h2>{{_i}}Enabling responsive features{{/i}}</h2>
|
<h2>{{_i}}Enabling responsive features{{/i}}</h2>
|
||||||
<p>{{_i}}Turn on responsive CSS in your project by including the proper meta tag and additional stylesheet within the <code><head></code> of your document. If you've compiled Bootstrap from the Customize page, you need only include the meta tag.{{/i}}</p>
|
<p>{{_i}}Turn on responsive CSS in your project by including the proper meta tag and additional stylesheet within the <code><head></code> of your document. If you've compiled Bootstrap from the Customize page, you need only include the meta tag.{{/i}}</p>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
</pre>
|
</pre>
|
||||||
<p><span class="label label-info">{{_i}}Heads up!{{/i}}</span> {{_i}} Bootstrap doesn't include responsive features by default at this time as not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it as needed.{{/i}}</p>
|
<p><span class="label label-info">{{_i}}Heads up!{{/i}}</span> {{_i}} Bootstrap doesn't include responsive features by default at this time as not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it as needed.{{/i}}</p>
|
||||||
|
|
||||||
{{! About }}
|
{{! About }}
|
||||||
<h2>{{_i}}About responsive Bootstrap{{/i}}</h2>
|
<h2>{{_i}}About responsive Bootstrap{{/i}}</h2>
|
||||||
<img src="assets/img/responsive-illustrations.png" alt="Responsive devices" style="float: right; margin: 0 0 20px 20px;">
|
<img src="assets/img/responsive-illustrations.png" alt="Responsive devices" style="float: right; margin: 0 0 20px 20px;">
|
||||||
<p>{{_i}}Media queries allow for custom CSS based on a number of conditions—ratios, widths, display type, etc—but usually focuses around <code>min-width</code> and <code>max-width</code>.{{/i}}</p>
|
<p>{{_i}}Media queries allow for custom CSS based on a number of conditions—ratios, widths, display type, etc—but usually focuses around <code>min-width</code> and <code>max-width</code>.{{/i}}</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>{{_i}}Modify the width of column in our grid{{/i}}</li>
|
<li>{{_i}}Modify the width of column in our grid{{/i}}</li>
|
||||||
<li>{{_i}}Stack elements instead of float wherever necessary{{/i}}</li>
|
<li>{{_i}}Stack elements instead of float wherever necessary{{/i}}</li>
|
||||||
<li>{{_i}}Resize headings and text to be more appropriate for devices{{/i}}</li>
|
<li>{{_i}}Resize headings and text to be more appropriate for devices{{/i}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>{{_i}}Use media queries responsibly and only as a start to your mobile audiences. For larger projects, do consider dedicated code bases and not layers of media queries.{{/i}}</p>
|
<p>{{_i}}Use media queries responsibly and only as a start to your mobile audiences. For larger projects, do consider dedicated code bases and not layers of media queries.{{/i}}</p>
|
||||||
|
|
||||||
{{! Supported }}
|
{{! Supported }}
|
||||||
<h2>{{_i}}Supported devices{{/i}}</h2>
|
<h2>{{_i}}Supported devices{{/i}}</h2>
|
||||||
<p>{{_i}}Bootstrap supports a handful of media queries in a single file to help make your projects more appropriate on different devices and screen resolutions. Here's what's included:{{/i}}</p>
|
<p>{{_i}}Bootstrap supports a handful of media queries in a single file to help make your projects more appropriate on different devices and screen resolutions. Here's what's included:{{/i}}</p>
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{_i}}Label{{/i}}</th>
|
<th>{{_i}}Label{{/i}}</th>
|
||||||
<th>{{_i}}Layout width{{/i}}</th>
|
<th>{{_i}}Layout width{{/i}}</th>
|
||||||
<th>{{_i}}Column width{{/i}}</th>
|
<th>{{_i}}Column width{{/i}}</th>
|
||||||
<th>{{_i}}Gutter width{{/i}}</th>
|
<th>{{_i}}Gutter width{{/i}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{_i}}Phones{{/i}}</td>
|
<td>{{_i}}Phones{{/i}}</td>
|
||||||
<td>480px and below</td>
|
<td>480px and below</td>
|
||||||
<td class="muted" colspan="2">{{_i}}Fluid columns, no fixed widths{{/i}}</td>
|
<td class="muted" colspan="2">{{_i}}Fluid columns, no fixed widths{{/i}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{_i}}Phones to tablets{{/i}}</td>
|
<td>{{_i}}Phones to tablets{{/i}}</td>
|
||||||
<td>767px and below</td>
|
<td>767px and below</td>
|
||||||
<td class="muted" colspan="2">{{_i}}Fluid columns, no fixed widths{{/i}}</td>
|
<td class="muted" colspan="2">{{_i}}Fluid columns, no fixed widths{{/i}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{_i}}Portrait tablets{{/i}}</td>
|
<td>{{_i}}Portrait tablets{{/i}}</td>
|
||||||
<td>768px and above</td>
|
<td>768px and above</td>
|
||||||
<td>42px</td>
|
<td>42px</td>
|
||||||
<td>20px</td>
|
<td>20px</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{_i}}Default{{/i}}</td>
|
<td>{{_i}}Default{{/i}}</td>
|
||||||
<td>980px and up</td>
|
<td>980px and up</td>
|
||||||
<td>60px</td>
|
<td>60px</td>
|
||||||
<td>20px</td>
|
<td>20px</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{_i}}Large display{{/i}}</td>
|
<td>{{_i}}Large display{{/i}}</td>
|
||||||
<td>1200px and up</td>
|
<td>1200px and up</td>
|
||||||
<td>70px</td>
|
<td>70px</td>
|
||||||
<td>30px</td>
|
<td>30px</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
/* {{_i}}Landscape phones and down{{/i}} */
|
/* {{_i}}Landscape phones and down{{/i}} */
|
||||||
@media (max-width: 480px) { ... }
|
@media (max-width: 480px) { ... }
|
||||||
@@ -459,79 +450,81 @@
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
{{! Responsive utility classes }}
|
{{! Responsive utility classes }}
|
||||||
<h2>{{_i}}Responsive utility classes{{/i}}</h2>
|
<h2>{{_i}}Responsive utility classes{{/i}}</h2>
|
||||||
<p>{{_i}}For faster mobile-friendly development, use these utility classes for showing and hiding content by device. Below is a table of the available classes and their effect on a given media query layout (labeled by device). They can be found in <code>responsive.less</code>.{{/i}}</p>
|
<p>{{_i}}For faster mobile-friendly development, use these utility classes for showing and hiding content by device. Below is a table of the available classes and their effect on a given media query layout (labeled by device). They can be found in <code>responsive.less</code>.{{/i}}</p>
|
||||||
<table class="table table-bordered table-striped responsive-utilities">
|
<table class="table table-bordered table-striped responsive-utilities">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{_i}}Class{{/i}}</th>
|
<th>{{_i}}Class{{/i}}</th>
|
||||||
<th>{{_i}}Phones <small>767px and below</small>{{/i}}</th>
|
<th>{{_i}}Phones <small>767px and below</small>{{/i}}</th>
|
||||||
<th>{{_i}}Tablets <small>979px to 768px</small>{{/i}}</th>
|
<th>{{_i}}Tablets <small>979px to 768px</small>{{/i}}</th>
|
||||||
<th>{{_i}}Desktops <small>Default</small>{{/i}}</th>
|
<th>{{_i}}Desktops <small>Default</small>{{/i}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th><code>.visible-phone</code></th>
|
<th><code>.visible-phone</code></th>
|
||||||
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
||||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
||||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><code>.visible-tablet</code></th>
|
<th><code>.visible-tablet</code></th>
|
||||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
||||||
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
||||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><code>.visible-desktop</code></th>
|
<th><code>.visible-desktop</code></th>
|
||||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
||||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
||||||
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><code>.hidden-phone</code></th>
|
<th><code>.hidden-phone</code></th>
|
||||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
||||||
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
||||||
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><code>.hidden-tablet</code></th>
|
<th><code>.hidden-tablet</code></th>
|
||||||
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
||||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
||||||
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><code>.hidden-desktop</code></th>
|
<th><code>.hidden-desktop</code></th>
|
||||||
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
||||||
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
<td class="is-visible">{{_i}}Visible{{/i}}</td>
|
||||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
<td class="is-hidden">{{_i}}Hidden{{/i}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3>{{_i}}When to use{{/i}}</h3>
|
<h3>{{_i}}When to use{{/i}}</h3>
|
||||||
<p>{{_i}}Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.{{/i}}</p>
|
<p>{{_i}}Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.{{/i}}</p>
|
||||||
|
|
||||||
<h3>{{_i}}Responsive utilities test case{{/i}}</h3>
|
<h3>{{_i}}Responsive utilities test case{{/i}}</h3>
|
||||||
<p>{{_i}}Resize your browser or load on different devices to test the above classes.{{/i}}</p>
|
<p>{{_i}}Resize your browser or load on different devices to test the above classes.{{/i}}</p>
|
||||||
<h4>{{_i}}Visible on...{{/i}}</h4>
|
<h4>{{_i}}Visible on...{{/i}}</h4>
|
||||||
<p>{{_i}}Green checkmarks indicate that class is visible in your current viewport.{{/i}}</p>
|
<p>{{_i}}Green checkmarks indicate that class is visible in your current viewport.{{/i}}</p>
|
||||||
<ul class="responsive-utilities-test">
|
<ul class="responsive-utilities-test">
|
||||||
<li>{{_i}}Phone{{/i}}<span class="visible-phone">✔ {{_i}}Phone{{/i}}</span></li>
|
<li>{{_i}}Phone{{/i}}<span class="visible-phone">✔ {{_i}}Phone{{/i}}</span></li>
|
||||||
<li>{{_i}}Tablet{{/i}}<span class="visible-tablet">✔ {{_i}}Tablet{{/i}}</span></li>
|
<li>{{_i}}Tablet{{/i}}<span class="visible-tablet">✔ {{_i}}Tablet{{/i}}</span></li>
|
||||||
<li>{{_i}}Desktop{{/i}}<span class="visible-desktop">✔ {{_i}}Desktop{{/i}}</span></li>
|
<li>{{_i}}Desktop{{/i}}<span class="visible-desktop">✔ {{_i}}Desktop{{/i}}</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h4>{{_i}}Hidden on...{{/i}}</h4>
|
<h4>{{_i}}Hidden on...{{/i}}</h4>
|
||||||
<p>{{_i}}Here, green checkmarks indicate that class is hidden in your current viewport.{{/i}}</p>
|
<p>{{_i}}Here, green checkmarks indicate that class is hidden in your current viewport.{{/i}}</p>
|
||||||
<ul class="responsive-utilities-test hidden-on">
|
<ul class="responsive-utilities-test hidden-on">
|
||||||
<li>{{_i}}Phone{{/i}}<span class="hidden-phone">✔ {{_i}}Phone{{/i}}</span></li>
|
<li>{{_i}}Phone{{/i}}<span class="hidden-phone">✔ {{_i}}Phone{{/i}}</span></li>
|
||||||
<li>{{_i}}Tablet{{/i}}<span class="hidden-tablet">✔ {{_i}}Tablet{{/i}}</span></li>
|
<li>{{_i}}Tablet{{/i}}<span class="hidden-tablet">✔ {{_i}}Tablet{{/i}}</span></li>
|
||||||
<li>{{_i}}Desktop{{/i}}<span class="hidden-desktop">✔ {{_i}}Desktop{{/i}}</span></li>
|
<li>{{_i}}Desktop{{/i}}<span class="hidden-desktop">✔ {{_i}}Desktop{{/i}}</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
</div>{{! /span9 }}
|
||||||
|
</div>{{! row}}
|
||||||
|
Reference in New Issue
Block a user