<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>
<divclass="row">
<divclass="span4">
<h2>Requires HTML5 doctype</h2>
<h2>Requires HTML5 doctype</h2>
<p>Bootstrap makes use of HTML elements and CSS properties that require the use of the HTML5 doctype. Be sure to include it at the beginning of every Bootstrapped page in your project.</p>
<p>Bootstrap makes use of HTML elements and CSS properties that require the use of the HTML5 doctype. Be sure to include it at the beginning of every Bootstrapped page in your project.</p>
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<html lang="en">
...
...
</html>
</html>
</pre>
</pre>
</div><!-- /.span -->
<divclass="span4">
<h2>Typography and links</h2>
<h2>Typography and links</h2>
<p>Within the <strong>scaffolding.less</strong> file, we set basic global display, typography, and link styles. Specifically, we:</p>
<p>Within the <strong>scaffolding.less</strong> file, we set basic global display, typography, and link styles. Specifically, we:</p>
<ul>
<ul>
<li>Remove margin on the body</li>
<li>Remove margin 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>
</div><!-- /.span -->
<h2>Reset via Normalize</h2>
<divclass="span4">
<p>As of Bootstrap 2, the traditional CSS reset has evolved to make use of elements from <ahref="http://necolas.github.com/normalize.css/"target="_blank">Normalize.css</a>, a project by <ahref="http://twitter.com/necolas"target="_blank">Nicolas Gallagher</a> that also powers the <ahref="http://html5boilerplate.com"target="_blank">HTML5 Boilerplate</a>.</p>
<h2>Reset via Normalize</h2>
<p>The new reset can still be found in <strong>reset.less</strong>, but with many elements removed for brevity and accuracy.</p>
<p>As of Bootstrap 2, the traditional CSS reset has evolved to make use of elements from <ahref="http://necolas.github.com/normalize.css/"target="_blank">Normalize.css</a>, a project by <ahref="http://twitter.com/necolas"target="_blank">Nicolas Gallagher</a> that also powers the <ahref="http://html5boilerplate.com"target="_blank">HTML5 Boilerplate</a>.</p>
<p>The new reset can still be found in <strong>reset.less</strong>, but with many elements removed for brevity and accuracy.</p>
</div><!-- /.span -->
</div><!-- /.row -->
</section>
</section>
...
@@ -141,36 +137,39 @@
...
@@ -141,36 +137,39 @@
<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>
<divclass="row show-grid">
<divclass="bs-docs-grid">
<divclass="span1">1</div>
<divclass="row show-grid">
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
</div>
<divclass="span1">1</div>
<divclass="row show-grid">
</div>
<divclass="span4">4</div>
<divclass="row show-grid">
<divclass="span4">4</div>
<divclass="span4">4</div>
<divclass="span4">4</div>
<divclass="span4">4</div>
</div>
<divclass="span4">4</div>
<divclass="row show-grid">
</div>
<divclass="span4">4</div>
<divclass="row show-grid">
<divclass="span8">8</div>
<divclass="span4">4</div>
</div>
<divclass="span8">8</div>
<divclass="row show-grid">
</div>
<divclass="span6">6</div>
<divclass="row show-grid">
<divclass="span6">6</div>
<divclass="span6">6</div>
</div>
<divclass="span6">6</div>
<divclass="row show-grid">
</div>
<divclass="span12">12</div>
<divclass="row show-grid">
<divclass="span12">12</div>
</div>
</div>
</div>
<divclass="row">
<divclass="row">
<divclass="span4">
<divclass="span4">
<p>The default grid system provided in Bootstrap utilizes <strong>12 columns</strong> that render out at widths of 724px, 940px (default without responsive CSS included), and 1170px. Below 767px viewports, the columns become fluid and stack vertically. </p>
<p>The default grid system provided in Bootstrap utilizes <strong>12 columns</strong> that render out at widths of 724px, 940px (default without responsive CSS included), and 1170px. Below 767px viewports, the columns become fluid and stack vertically. </p>
...
@@ -191,17 +190,19 @@
...
@@ -191,17 +190,19 @@
<br>
<br>
<h2>Offsetting columns</h2>
<h2>Offsetting columns</h2>
<divclass="row show-grid">
<divclass="bs-docs-grid">
<divclass="span4">4</div>
<divclass="row show-grid">
<divclass="span4 offset4">4 offset 4</div>
<divclass="span4">4</div>
</div><!-- /row -->
<divclass="span4 offset4">4 offset 4</div>
<divclass="row show-grid">
</div><!-- /row -->
<divclass="span3 offset3">3 offset 3</div>
<divclass="row show-grid">
<divclass="span3 offset3">3 offset 3</div>
<divclass="span3 offset3">3 offset 3</div>
</div><!-- /row -->
<divclass="span3 offset3">3 offset 3</div>
<divclass="row show-grid">
</div><!-- /row -->
<divclass="span8 offset4">8 offset 4</div>
<divclass="row show-grid">
</div><!-- /row -->
<divclass="span8 offset4">8 offset 4</div>
</div><!-- /row -->
</div>
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
<div class="row">
<div class="row">
<div class="span4">...</div>
<div class="span4">...</div>
...
@@ -257,76 +258,69 @@
...
@@ -257,76 +258,69 @@
</div>
</div>
<h2>Fluid columns</h2>
<h2>Fluid columns</h2>
<divclass="row-fluid show-grid">
<divclass="bs-docs-grid">
<divclass="span1">1</div>
<divclass="row-fluid show-grid">
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
</div>
<divclass="span1">1</div>
<divclass="row-fluid show-grid">
</div>
<divclass="span4">4</div>
<divclass="row-fluid show-grid">
<divclass="span4">4</div>
<divclass="span4">4</div>
<divclass="span4">4</div>
<divclass="span4">4</div>
</div>
<divclass="span4">4</div>
<divclass="row-fluid show-grid">
</div>
<divclass="span4">4</div>
<divclass="row-fluid show-grid">
<divclass="span8">8</div>
<divclass="span4">4</div>
</div>
<divclass="span8">8</div>
<divclass="row-fluid show-grid">
</div>
<divclass="span6">6</div>
<divclass="row-fluid show-grid">
<divclass="span6">6</div>
<divclass="span6">6</div>
</div>
<divclass="span6">6</div>
<divclass="row-fluid show-grid">
</div>
<divclass="span12">12</div>
<divclass="row-fluid show-grid">
<divclass="span12">12</div>
</div>
</div>
</div>
<divclass="row">
<h3>Percents, not pixels</h3>
<divclass="span4">
<p>The fluid grid system uses percents for column widths instead of fixed pixels. It also has the same responsive variations as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.</p>
<h3>Percents, not pixels</h3>
<p>The fluid grid system uses percents for column widths instead of fixed pixels. It also has the same responsive variations as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.</p>
<h3>Fluid rows</h3>
</div><!-- /.span -->
<p>Make any row fluid simply by changing <code>.row</code> to <code>.row-fluid</code>. The columns stay the exact same, making it super straightforward to flip between fixed and fluid layouts.</p>
<divclass="span4">
<h3>Fluid rows</h3>
<h3>Markup</h3>
<p>Make any row fluid simply by changing <code>.row</code> to <code>.row-fluid</code>. The columns stay the exact same, making it super straightforward to flip between fixed and fluid layouts.</p>
</div><!-- /.span -->
<divclass="span4">
<h3>Markup</h3>
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
<div class="row-fluid">
<div class="row-fluid">
<div class="span4">...</div>
<div class="span4">...</div>
<div class="span8">...</div>
<div class="span8">...</div>
</div>
</div>
</pre>
</pre>
</div><!-- /.span -->
</div><!-- /.row -->
<h2>Fluid nesting</h2>
<h2>Fluid nesting</h2>
<divclass="row">
<p>Nesting with fluid grids is a bit different: the number of nested columns doesn't need to match the parent. Instead, your columns are reset at each level because each row takes up 100% of the parent column.</p>
<divclass="span6">
<divclass="row-fluid show-grid">
<p>Nesting with fluid grids is a bit different: the number of nested columns doesn't need to match the parent. Instead, your columns are reset at each level because each row takes up 100% of the parent column.</p>
<divclass="span12">
Fluid 12
<divclass="row-fluid show-grid">
<divclass="row-fluid show-grid">
<divclass="span12">
<divclass="span6">
Fluid 12
Fluid 6
<divclass="row-fluid show-grid">
</div>
<divclass="span6">
<divclass="span6">
Fluid 6
Fluid 6
</div>
<divclass="span6">
Fluid 6
</div>
</div>
</div>
</div>
</div>
</div>
</div><!-- /.span -->
</div>
<divclass="span6">
</div>
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
<div class="row-fluid">
<div class="row-fluid">
<div class="span12">
<div class="span12">
...
@@ -338,8 +332,6 @@
...
@@ -338,8 +332,6 @@
</div>
</div>
</div>
</div>
</pre>
</pre>
</div><!-- /.span -->
</div><!-- /.row -->
</section>
</section>
...
@@ -377,20 +369,15 @@
...
@@ -377,20 +369,15 @@
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<divclass="row">
<divclass="span4">
<h3>Variables in LESS</h3>
<h3>Variables in LESS</h3>
<p>Built into Bootstrap are a handful of variables for customizing the default 940px grid system, documented above. All variables for the grid are stored in variables.less.</p>
<p>Built into Bootstrap are a handful of variables for customizing the default 940px grid system, documented above. All variables for the grid are stored in variables.less.</p>
</div><!-- /.span -->
<h3>How to customize</h3>
<divclass="span4">
<p>Modifying the grid means changing the three <code>@grid*</code> variables and recompiling Bootstrap. Change the grid variables in variables.less and use one of the <ahref="less.html#compiling">four ways documented to recompile</a>. If you're adding more columns, be sure to add the CSS for those in grid.less.</p>
<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 variables.less and use one of the <ahref="less.html#compiling">four ways documented to recompile</a>. If you're adding more columns, be sure to add the CSS for those in grid.less.</p>
<h3>Staying responsive</h3>
</div><!-- /.span -->
<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 customize the grids in responsive.less.</p>
<divclass="span4">
<h3>Staying responsive</h3>
<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 customize the grids in responsive.less.</p>
</div><!-- /.span -->
</div><!-- /.row -->
</section>
</section>
...
@@ -403,13 +390,11 @@
...
@@ -403,13 +390,11 @@
<h1>Layouts <small>Basic templates to create webpages</small></h1>
<h1>Layouts <small>Basic templates to create webpages</small></h1>
</div>
</div>
<divclass="row">
<h2>Fixed layout</h2>
<divclass="span6">
<p>The default and simple 940px-wide, centered layout for just about any website or page provided by a single <code><div class="container"></code>.</p>
<h2>Fixed layout</h2>
<divclass="mini-layout">
<p>The default and simple 940px-wide, centered layout for just about any website or page provided by a single <code><div class="container"></code>.</p>
<divclass="mini-layout-body"></div>
<divclass="mini-layout">
</div>
<divclass="mini-layout-body"></div>
</div>
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
<body>
<body>
<div class="container">
<div class="container">
...
@@ -417,14 +402,13 @@
...
@@ -417,14 +402,13 @@
</div>
</div>
</body>
</body>
</pre>
</pre>
</div><!-- /.span -->
<divclass="span6">
<h2>Fluid layout</h2>
<h2>Fluid layout</h2>
<p><code><div class="container-fluid"></code> gives flexible page structure, min- and max-widths, and a left-hand sidebar. It's great for apps and docs.</p>
<p><code><div class="container-fluid"></code> gives flexible page structure, min- and max-widths, and a left-hand sidebar. It's great for apps and docs.</p>
<divclass="mini-layout fluid">
<divclass="mini-layout fluid">
<divclass="mini-layout-sidebar"></div>
<divclass="mini-layout-sidebar"></div>
<divclass="mini-layout-body"></div>
<divclass="mini-layout-body"></div>
</div>
</div>
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
<div class="container-fluid">
<div class="container-fluid">
<div class="row-fluid">
<div class="row-fluid">
...
@@ -437,8 +421,6 @@
...
@@ -437,8 +421,6 @@
</div>
</div>
</div>
</div>
</pre>
</pre>
</div><!-- /.span -->
</div><!-- /.row -->
</section>
</section>
...
@@ -450,84 +432,78 @@
...
@@ -450,84 +432,78 @@
<divclass="page-header">
<divclass="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>
<!-- Supported devices -->
<!-- Supported devices -->
<divclass="row">
<p><imgsrc="assets/img/responsive-illustrations.png"alt="Responsive devices"style="float: right; margin: 0 0 20px 20px;"></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>
<h3>What they do</h3>
<ul>
<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>
<li>Modify the width of column in our grid</li>
<ul>
<li>Stack elements instead of float wherever necessary</li>
<li>Modify the width of column in our grid</li>
<li>Resize headings and text to be more appropriate for devices</li>
<li>Stack elements instead of float wherever necessary</li>
</ul>
<li>Resize headings and text to be more appropriate for devices</li>
<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>
</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>
<h2>Supported devices</h2>
</div><!-- /.span -->
<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>
<divclass="span8">
<tableclass="table table-bordered table-striped">
<h2>Supported devices</h2>
<thead>
<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>
<tr>
<tableclass="table table-bordered table-striped">
<th>Label</th>
<thead>
<th>Layout width</th>
<tr>
<th>Column width</th>
<th>Label</th>
<th>Gutter width</th>
<th>Layout width</th>
</tr>
<th>Column width</th>
</thead>
<th>Gutter width</th>
<tbody>
</tr>
<tr>
</thead>
<td>Smartphones</td>
<tbody>
<td>480px and below</td>
<tr>
<tdclass="muted"colspan="2">Fluid columns, no fixed widths</td>
<td>Smartphones</td>
</tr>
<td>480px and below</td>
<tr>
<tdclass="muted"colspan="2">Fluid columns, no fixed widths</td>
<td>Smartphones to tablets</td>
</tr>
<td>767px and below</td>
<tr>
<tdclass="muted"colspan="2">Fluid columns, no fixed widths</td>
<td>Smartphones to tablets</td>
</tr>
<td>767px and below</td>
<tr>
<tdclass="muted"colspan="2">Fluid columns, no fixed widths</td>
<td>Portrait tablets</td>
</tr>
<td>768px and above</td>
<tr>
<td>42px</td>
<td>Portrait tablets</td>
<td>20px</td>
<td>768px and above</td>
</tr>
<td>42px</td>
<tr>
<td>20px</td>
<td>Default</td>
</tr>
<td>980px and up</td>
<tr>
<td>60px</td>
<td>Default</td>
<td>20px</td>
<td>980px and up</td>
</tr>
<td>60px</td>
<tr>
<td>20px</td>
<td>Large display</td>
</tr>
<td>1200px and up</td>
<tr>
<td>70px</td>
<td>Large display</td>
<td>30px</td>
<td>1200px and up</td>
</tr>
<td>70px</td>
</tbody>
<td>30px</td>
</table>
</tr>
</tbody>
<h3>Requires meta tag</h3>
</table>
<p>To ensure devices display responsive pages properly, include the viewport meta tag.</p>
<p>Bootstrap doesn't automatically include these media queries, but understanding and adding them is very easy and requires minimal setup. You have a few options for including the responsive features of Bootstrap:</p>
<divclass="span4">
<ol>
<p>Bootstrap doesn't automatically include these media queries, but understanding and adding them is very easy and requires minimal setup. You have a few options for including the responsive features of Bootstrap:</p>
<li>Use the compiled responsive version, bootstrap-responsive.css</li>
<ol>
<li>Add @import "responsive.less" and recompile Bootstrap</li>
<li>Use the compiled responsive version, bootstrap-responsive.css</li>
<li>Modify and recompile responsive.less as a separate file</li>
<li>Add @import "responsive.less" and recompile Bootstrap</li>
</ol>
<li>Modify and recompile responsive.less as a separate file</li>
<p><strong>Why not just include it?</strong> Truth be told, not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it.</p>
</ol>
<p><strong>Why not just include it?</strong> Truth be told, not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it.</p>
</div><!-- /.span -->
<divclass="span8">
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
/* Landscape phones and down */
/* Landscape phones and down */
@media (max-width: 480px) { ... }
@media (max-width: 480px) { ... }
...
@@ -541,95 +517,85 @@
...
@@ -541,95 +517,85 @@
/* Large desktop */
/* Large desktop */
@media (min-width: 1200px) { ... }
@media (min-width: 1200px) { ... }
</pre>
</pre>
</div><!-- /.span -->
</div><!-- /.row -->
<br>
<br>
<!-- Responsive utility classes -->
<!-- Responsive utility classes -->
<h2>Responsive utility classes</h2>
<h2>Responsive utility classes</h2>
<divclass="row">
<divclass="span4">
<h3>What are they</h2>
<p>For faster mobile-friendly development, use these basic utility classes for showing and hiding content by device.</p>
<h3>When to use</h2>
<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>For example, you might show a <code><select></code> element for nav on mobile layouts, but not on tablets or desktops.</p>
</div><!-- /.span -->
<divclass="span8">
<h3>Support classes</h3>
<p>Shown here is a table of the classes we support 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 basic utility classes for showing and hiding content by device.</p>
<h3>When to use</h2>
<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>For example, you might show a <code><select></code> element for nav on mobile layouts, but not on tablets or desktops.</p>
<h3>Support classes</h3>
<p>Shown here is a table of the classes we support and their effect on a given media query layout (labeled by device). They can be found in <code>responsive.less</code>.</p>
<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>
<divclass="row">
<divclass="span4">
<h2>{{_i}}Requires HTML5 doctype{{/i}}</h2>
<h2>{{_i}}Requires HTML5 doctype{{/i}}</h2>
<p>{{_i}}Bootstrap makes use of HTML elements and CSS properties that require the use of the HTML5 doctype. Be sure to include it at the beginning of every Bootstrapped page in your project.{{/i}}</p>
<p>{{_i}}Bootstrap makes use of HTML elements and CSS properties that require the use of the HTML5 doctype. Be sure to include it at the beginning of every Bootstrapped page in your project.{{/i}}</p>
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<html lang="en">
...
...
</html>
</html>
</pre>
</pre>
</div><!-- /.span -->
<divclass="span4">
<h2>{{_i}}Typography and links{{/i}}</h2>
<h2>{{_i}}Typography and links{{/i}}</h2>
<p>{{_i}}Within the <strong>scaffolding.less</strong> file, we set basic global display, typography, and link styles. Specifically, we:{{/i}}</p>
<p>{{_i}}Within the <strong>scaffolding.less</strong> file, we set basic global display, typography, and link styles. Specifically, we:{{/i}}</p>
<ul>
<ul>
<li>{{_i}}Remove margin on the body{{/i}}</li>
<li>{{_i}}Remove margin 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>
</div><!-- /.span -->
<h2>{{_i}}Reset via Normalize{{/i}}</h2>
<divclass="span4">
<p>{{_i}}As of Bootstrap 2, the traditional CSS reset has evolved to make use of elements from <ahref="http://necolas.github.com/normalize.css/"target="_blank">Normalize.css</a>, a project by <ahref="http://twitter.com/necolas"target="_blank">Nicolas Gallagher</a> that also powers the <ahref="http://html5boilerplate.com"target="_blank">HTML5 Boilerplate</a>.{{/i}}</p>
<h2>{{_i}}Reset via Normalize{{/i}}</h2>
<p>{{_i}}The new reset can still be found in <strong>reset.less</strong>, but with many elements removed for brevity and accuracy.{{/i}}</p>
<p>{{_i}}As of Bootstrap 2, the traditional CSS reset has evolved to make use of elements from <ahref="http://necolas.github.com/normalize.css/"target="_blank">Normalize.css</a>, a project by <ahref="http://twitter.com/necolas"target="_blank">Nicolas Gallagher</a> that also powers the <ahref="http://html5boilerplate.com"target="_blank">HTML5 Boilerplate</a>.{{/i}}</p>
<p>{{_i}}The new reset can still be found in <strong>reset.less</strong>, but with many elements removed for brevity and accuracy.{{/i}}</p>
</div><!-- /.span -->
</div><!-- /.row -->
</section>
</section>
...
@@ -63,36 +59,39 @@
...
@@ -63,36 +59,39 @@
<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>
<divclass="row show-grid">
<divclass="bs-docs-grid">
<divclass="span1">1</div>
<divclass="row show-grid">
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
</div>
<divclass="span1">1</div>
<divclass="row show-grid">
</div>
<divclass="span4">4</div>
<divclass="row show-grid">
<divclass="span4">4</div>
<divclass="span4">4</div>
<divclass="span4">4</div>
<divclass="span4">4</div>
</div>
<divclass="span4">4</div>
<divclass="row show-grid">
</div>
<divclass="span4">4</div>
<divclass="row show-grid">
<divclass="span8">8</div>
<divclass="span4">4</div>
</div>
<divclass="span8">8</div>
<divclass="row show-grid">
</div>
<divclass="span6">6</div>
<divclass="row show-grid">
<divclass="span6">6</div>
<divclass="span6">6</div>
</div>
<divclass="span6">6</div>
<divclass="row show-grid">
</div>
<divclass="span12">12</div>
<divclass="row show-grid">
<divclass="span12">12</div>
</div>
</div>
</div>
<divclass="row">
<divclass="row">
<divclass="span4">
<divclass="span4">
<p>{{_i}}The default grid system provided in Bootstrap utilizes <strong>12 columns</strong> that render out at widths of 724px, 940px (default without responsive CSS included), and 1170px. Below 767px viewports, the columns become fluid and stack vertically. {{/i}}</p>
<p>{{_i}}The default grid system provided in Bootstrap utilizes <strong>12 columns</strong> that render out at widths of 724px, 940px (default without responsive CSS included), and 1170px. Below 767px viewports, the columns become fluid and stack vertically. {{/i}}</p>
...
@@ -113,17 +112,19 @@
...
@@ -113,17 +112,19 @@
<br>
<br>
<h2>{{_i}}Offsetting columns{{/i}}</h2>
<h2>{{_i}}Offsetting columns{{/i}}</h2>
<divclass="row show-grid">
<divclass="bs-docs-grid">
<divclass="span4">4</div>
<divclass="row show-grid">
<divclass="span4 offset4">4 offset 4</div>
<divclass="span4">4</div>
</div><!-- /row -->
<divclass="span4 offset4">4 offset 4</div>
<divclass="row show-grid">
</div><!-- /row -->
<divclass="span3 offset3">3 offset 3</div>
<divclass="row show-grid">
<divclass="span3 offset3">3 offset 3</div>
<divclass="span3 offset3">3 offset 3</div>
</div><!-- /row -->
<divclass="span3 offset3">3 offset 3</div>
<divclass="row show-grid">
</div><!-- /row -->
<divclass="span8 offset4">8 offset 4</div>
<divclass="row show-grid">
</div><!-- /row -->
<divclass="span8 offset4">8 offset 4</div>
</div><!-- /row -->
</div>
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
<div class="row">
<div class="row">
<div class="span4">...</div>
<div class="span4">...</div>
...
@@ -179,76 +180,69 @@
...
@@ -179,76 +180,69 @@
</div>
</div>
<h2>{{_i}}Fluid columns{{/i}}</h2>
<h2>{{_i}}Fluid columns{{/i}}</h2>
<divclass="row-fluid show-grid">
<divclass="bs-docs-grid">
<divclass="span1">1</div>
<divclass="row-fluid show-grid">
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
<divclass="span1">1</div>
</div>
<divclass="span1">1</div>
<divclass="row-fluid show-grid">
</div>
<divclass="span4">4</div>
<divclass="row-fluid show-grid">
<divclass="span4">4</div>
<divclass="span4">4</div>
<divclass="span4">4</div>
<divclass="span4">4</div>
</div>
<divclass="span4">4</div>
<divclass="row-fluid show-grid">
</div>
<divclass="span4">4</div>
<divclass="row-fluid show-grid">
<divclass="span8">8</div>
<divclass="span4">4</div>
</div>
<divclass="span8">8</div>
<divclass="row-fluid show-grid">
</div>
<divclass="span6">6</div>
<divclass="row-fluid show-grid">
<divclass="span6">6</div>
<divclass="span6">6</div>
</div>
<divclass="span6">6</div>
<divclass="row-fluid show-grid">
</div>
<divclass="span12">12</div>
<divclass="row-fluid show-grid">
<divclass="span12">12</div>
</div>
</div>
</div>
<divclass="row">
<h3>{{_i}}Percents, not pixels{{/i}}</h3>
<divclass="span4">
<p>{{_i}}The fluid grid system uses percents for column widths instead of fixed pixels. It also has the same responsive variations as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.{{/i}}</p>
<h3>{{_i}}Percents, not pixels{{/i}}</h3>
<p>{{_i}}The fluid grid system uses percents for column widths instead of fixed pixels. It also has the same responsive variations as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.{{/i}}</p>
<h3>{{_i}}Fluid rows{{/i}}</h3>
</div><!-- /.span -->
<p>{{_i}}Make any row fluid simply by changing <code>.row</code> to <code>.row-fluid</code>. The columns stay the exact same, making it super straightforward to flip between fixed and fluid layouts.{{/i}}</p>
<divclass="span4">
<h3>{{_i}}Fluid rows{{/i}}</h3>
<h3>{{_i}}Markup{{/i}}</h3>
<p>{{_i}}Make any row fluid simply by changing <code>.row</code> to <code>.row-fluid</code>. The columns stay the exact same, making it super straightforward to flip between fixed and fluid layouts.{{/i}}</p>
</div><!-- /.span -->
<divclass="span4">
<h3>{{_i}}Markup{{/i}}</h3>
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
<div class="row-fluid">
<div class="row-fluid">
<div class="span4">...</div>
<div class="span4">...</div>
<div class="span8">...</div>
<div class="span8">...</div>
</div>
</div>
</pre>
</pre>
</div><!-- /.span -->
</div><!-- /.row -->
<h2>{{_i}}Fluid nesting{{/i}}</h2>
<h2>{{_i}}Fluid nesting{{/i}}</h2>
<divclass="row">
<p>{{_i}}Nesting with fluid grids is a bit different: the number of nested columns doesn't need to match the parent. Instead, your columns are reset at each level because each row takes up 100% of the parent column.{{/i}}</p>
<divclass="span6">
<divclass="row-fluid show-grid">
<p>{{_i}}Nesting with fluid grids is a bit different: the number of nested columns doesn't need to match the parent. Instead, your columns are reset at each level because each row takes up 100% of the parent column.{{/i}}</p>
<divclass="span12">
{{_i}}Fluid 12{{/i}}
<divclass="row-fluid show-grid">
<divclass="row-fluid show-grid">
<divclass="span12">
<divclass="span6">
{{_i}}Fluid 12{{/i}}
{{_i}}Fluid 6{{/i}}
<divclass="row-fluid show-grid">
</div>
<divclass="span6">
<divclass="span6">
{{_i}}Fluid 6{{/i}}
{{_i}}Fluid 6{{/i}}
</div>
<divclass="span6">
{{_i}}Fluid 6{{/i}}
</div>
</div>
</div>
</div>
</div>
</div>
</div><!-- /.span -->
</div>
<divclass="span6">
</div>
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
<div class="row-fluid">
<div class="row-fluid">
<div class="span12">
<div class="span12">
...
@@ -260,8 +254,6 @@
...
@@ -260,8 +254,6 @@
</div>
</div>
</div>
</div>
</pre>
</pre>
</div><!-- /.span -->
</div><!-- /.row -->
</section>
</section>
...
@@ -299,20 +291,15 @@
...
@@ -299,20 +291,15 @@
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<divclass="row">
<divclass="span4">
<h3>{{_i}}Variables in LESS{{/i}}</h3>
<h3>{{_i}}Variables in LESS{{/i}}</h3>
<p>{{_i}}Built into Bootstrap are a handful of variables for customizing the default 940px grid system, documented above. All variables for the grid are stored in variables.less.{{/i}}</p>
<p>{{_i}}Built into Bootstrap are a handful of variables for customizing the default 940px grid system, documented above. All variables for the grid are stored in variables.less.{{/i}}</p>
</div><!-- /.span -->
<h3>{{_i}}How to customize{{/i}}</h3>
<divclass="span4">
<p>{{_i}}Modifying the grid means changing the three <code>@grid*</code> variables and recompiling Bootstrap. Change the grid variables in variables.less and use one of the <ahref="less.html#compiling">four ways documented to recompile</a>. If you're adding more columns, be sure to add the CSS for those in grid.less.{{/i}}</p>
<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 variables.less and use one of the <ahref="less.html#compiling">four ways documented to recompile</a>. If you're adding more columns, be sure to add the CSS for those in grid.less.{{/i}}</p>
<h3>{{_i}}Staying responsive{{/i}}</h3>
</div><!-- /.span -->
<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 customize the grids in responsive.less.{{/i}}</p>
<divclass="span4">
<h3>{{_i}}Staying responsive{{/i}}</h3>
<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 customize the grids in responsive.less.{{/i}}</p>
</div><!-- /.span -->
</div><!-- /.row -->
</section>
</section>
...
@@ -325,13 +312,11 @@
...
@@ -325,13 +312,11 @@
<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>
<divclass="row">
<h2>{{_i}}Fixed layout{{/i}}</h2>
<divclass="span6">
<p>{{_i}}The default and simple 940px-wide, centered layout for just about any website or page provided by a single <code><div class="container"></code>.{{/i}}</p>
<h2>{{_i}}Fixed layout{{/i}}</h2>
<divclass="mini-layout">
<p>{{_i}}The default and simple 940px-wide, centered layout for just about any website or page provided by a single <code><div class="container"></code>.{{/i}}</p>
<divclass="mini-layout-body"></div>
<divclass="mini-layout">
</div>
<divclass="mini-layout-body"></div>
</div>
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
<body>
<body>
<div class="container">
<div class="container">
...
@@ -339,14 +324,13 @@
...
@@ -339,14 +324,13 @@
</div>
</div>
</body>
</body>
</pre>
</pre>
</div><!-- /.span -->
<divclass="span6">
<h2>{{_i}}Fluid layout{{/i}}</h2>
<h2>{{_i}}Fluid layout{{/i}}</h2>
<p>{{_i}}<code><div class="container-fluid"></code> gives flexible page structure, min- and max-widths, and a left-hand sidebar. It's great for apps and docs.{{/i}}</p>
<p>{{_i}}<code><div class="container-fluid"></code> gives flexible page structure, min- and max-widths, and a left-hand sidebar. It's great for apps and docs.{{/i}}</p>
<divclass="mini-layout fluid">
<divclass="mini-layout fluid">
<divclass="mini-layout-sidebar"></div>
<divclass="mini-layout-sidebar"></div>
<divclass="mini-layout-body"></div>
<divclass="mini-layout-body"></div>
</div>
</div>
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
<div class="container-fluid">
<div class="container-fluid">
<div class="row-fluid">
<div class="row-fluid">
...
@@ -359,8 +343,6 @@
...
@@ -359,8 +343,6 @@
</div>
</div>
</div>
</div>
</pre>
</pre>
</div><!-- /.span -->
</div><!-- /.row -->
</section>
</section>
...
@@ -372,84 +354,78 @@
...
@@ -372,84 +354,78 @@
<divclass="page-header">
<divclass="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>
<!-- Supported devices -->
<!-- Supported devices -->
<divclass="row">
<p><imgsrc="assets/img/responsive-illustrations.png"alt="Responsive devices"style="float: right; margin: 0 0 20px 20px;"></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>
<h3>{{_i}}What they do{{/i}}</h3>
<ul>
<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>
<li>{{_i}}Modify the width of column in our grid{{/i}}</li>
<ul>
<li>{{_i}}Stack elements instead of float wherever necessary{{/i}}</li>
<li>{{_i}}Modify the width of column in our grid{{/i}}</li>
<li>{{_i}}Resize headings and text to be more appropriate for devices{{/i}}</li>
<li>{{_i}}Stack elements instead of float wherever necessary{{/i}}</li>
</ul>
<li>{{_i}}Resize headings and text to be more appropriate for devices{{/i}}</li>
<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>
</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>
<h2>{{_i}}Supported devices{{/i}}</h2>
</div><!-- /.span -->
<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>
<divclass="span8">
<tableclass="table table-bordered table-striped">
<h2>{{_i}}Supported devices{{/i}}</h2>
<thead>
<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>
<tr>
<tableclass="table table-bordered table-striped">
<th>{{_i}}Label{{/i}}</th>
<thead>
<th>{{_i}}Layout width{{/i}}</th>
<tr>
<th>{{_i}}Column width{{/i}}</th>
<th>{{_i}}Label{{/i}}</th>
<th>{{_i}}Gutter width{{/i}}</th>
<th>{{_i}}Layout width{{/i}}</th>
</tr>
<th>{{_i}}Column width{{/i}}</th>
</thead>
<th>{{_i}}Gutter width{{/i}}</th>
<tbody>
</tr>
<tr>
</thead>
<td>{{_i}}Smartphones{{/i}}</td>
<tbody>
<td>480px and below</td>
<tr>
<tdclass="muted"colspan="2">{{_i}}Fluid columns, no fixed widths{{/i}}</td>
<td>{{_i}}Smartphones{{/i}}</td>
</tr>
<td>480px and below</td>
<tr>
<tdclass="muted"colspan="2">{{_i}}Fluid columns, no fixed widths{{/i}}</td>
<td>{{_i}}Smartphones to tablets{{/i}}</td>
</tr>
<td>767px and below</td>
<tr>
<tdclass="muted"colspan="2">{{_i}}Fluid columns, no fixed widths{{/i}}</td>
<td>{{_i}}Smartphones to tablets{{/i}}</td>
</tr>
<td>767px and below</td>
<tr>
<tdclass="muted"colspan="2">{{_i}}Fluid columns, no fixed widths{{/i}}</td>
<td>{{_i}}Portrait tablets{{/i}}</td>
</tr>
<td>768px and above</td>
<tr>
<td>42px</td>
<td>{{_i}}Portrait tablets{{/i}}</td>
<td>20px</td>
<td>768px and above</td>
</tr>
<td>42px</td>
<tr>
<td>20px</td>
<td>{{_i}}Default{{/i}}</td>
</tr>
<td>980px and up</td>
<tr>
<td>60px</td>
<td>{{_i}}Default{{/i}}</td>
<td>20px</td>
<td>980px and up</td>
</tr>
<td>60px</td>
<tr>
<td>20px</td>
<td>{{_i}}Large display{{/i}}</td>
</tr>
<td>1200px and up</td>
<tr>
<td>70px</td>
<td>{{_i}}Large display{{/i}}</td>
<td>30px</td>
<td>1200px and up</td>
</tr>
<td>70px</td>
</tbody>
<td>30px</td>
</table>
</tr>
</tbody>
<h3>{{_i}}Requires meta tag{{/i}}</h3>
</table>
<p>{{_i}}To ensure devices display responsive pages properly, include the viewport meta tag.{{/i}}</p>
<p>{{_i}}Bootstrap doesn't automatically include these media queries, but understanding and adding them is very easy and requires minimal setup. You have a few options for including the responsive features of Bootstrap:{{/i}}</p>
<divclass="span4">
<ol>
<p>{{_i}}Bootstrap doesn't automatically include these media queries, but understanding and adding them is very easy and requires minimal setup. You have a few options for including the responsive features of Bootstrap:{{/i}}</p>
<li>{{_i}}Use the compiled responsive version, bootstrap-responsive.css{{/i}}</li>
<ol>
<li>{{_i}}Add @import "responsive.less" and recompile Bootstrap{{/i}}</li>
<li>{{_i}}Use the compiled responsive version, bootstrap-responsive.css{{/i}}</li>
<li>{{_i}}Modify and recompile responsive.less as a separate file{{/i}}</li>
<li>{{_i}}Add @import "responsive.less" and recompile Bootstrap{{/i}}</li>
</ol>
<li>{{_i}}Modify and recompile responsive.less as a separate file{{/i}}</li>
<p>{{_i}}<strong>Why not just include it?</strong> Truth be told, not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it.{{/i}}</p>
</ol>
<p>{{_i}}<strong>Why not just include it?</strong> Truth be told, not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it.{{/i}}</p>
</div><!-- /.span -->
<divclass="span8">
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
/* {{_i}}Landscape phones and down{{/i}} */
/* {{_i}}Landscape phones and down{{/i}} */
@media (max-width: 480px) { ... }
@media (max-width: 480px) { ... }
...
@@ -463,93 +439,83 @@
...
@@ -463,93 +439,83 @@
/* {{_i}}Large desktop{{/i}} */
/* {{_i}}Large desktop{{/i}} */
@media (min-width: 1200px) { ... }
@media (min-width: 1200px) { ... }
</pre>
</pre>
</div><!-- /.span -->
</div><!-- /.row -->
<br>
<br>
<!-- Responsive utility classes -->
<!-- Responsive utility classes -->
<h2>{{_i}}Responsive utility classes{{/i}}</h2>
<h2>{{_i}}Responsive utility classes{{/i}}</h2>
<divclass="row">
<divclass="span4">
<h3>{{_i}}What are they{{/i}}</h2>
<p>{{_i}}For faster mobile-friendly development, use these basic utility classes for showing and hiding content by device.{{/i}}</p>
<h3>{{_i}}When to use{{/i}}</h2>
<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}}For example, you might show a <code><select></code> element for nav on mobile layouts, but not on tablets or desktops.{{/i}}</p>
</div><!-- /.span -->
<divclass="span8">
<h3>{{_i}}Support classes{{/i}}</h3>
<p>{{_i}}Shown here is a table of the classes we support 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 basic utility classes for showing and hiding content by device.{{/i}}</p>
<h3>{{_i}}When to use{{/i}}</h2>
<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}}For example, you might show a <code><select></code> element for nav on mobile layouts, but not on tablets or desktops.{{/i}}</p>
<h3>{{_i}}Support classes{{/i}}</h3>
<p>{{_i}}Shown here is a table of the classes we support and their effect on a given media query layout (labeled by device). They can be found in <code>responsive.less</code>.{{/i}}</p>