<h1>Global styles <small>for CSS reset, typography, and links</small></h1>
</div>
<divclass="row">
<divclass="span4">
<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>
<preclass="prettyprint linenums">
...
...
@@ -112,8 +111,7 @@
...
</html>
</pre>
</div><!-- /.span -->
<divclass="span4">
<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>
<ul>
...
...
@@ -122,13 +120,11 @@
<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>
</ul>
</div><!-- /.span -->
<divclass="span4">
<h2>Reset via Normalize</h2>
<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>
...
...
@@ -141,6 +137,7 @@
<h1>Default grid system <small>12 columns with a responsive twist</small></h1>
</div>
<divclass="bs-docs-grid">
<divclass="row show-grid">
<divclass="span1">1</div>
<divclass="span1">1</div>
...
...
@@ -171,6 +168,8 @@
<divclass="row show-grid">
<divclass="span12">12</div>
</div>
</div>
<divclass="row">
<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>
...
...
@@ -191,6 +190,7 @@
<br>
<h2>Offsetting columns</h2>
<divclass="bs-docs-grid">
<divclass="row show-grid">
<divclass="span4">4</div>
<divclass="span4 offset4">4 offset 4</div>
...
...
@@ -202,6 +202,7 @@
<divclass="row show-grid">
<divclass="span8 offset4">8 offset 4</div>
</div><!-- /row -->
</div>
<preclass="prettyprint linenums">
<div class="row">
<div class="span4">...</div>
...
...
@@ -257,6 +258,7 @@
</div>
<h2>Fluid columns</h2>
<divclass="bs-docs-grid">
<divclass="row-fluid show-grid">
<divclass="span1">1</div>
<divclass="span1">1</div>
...
...
@@ -287,17 +289,14 @@
<divclass="row-fluid show-grid">
<divclass="span12">12</div>
</div>
</div>
<divclass="row">
<divclass="span4">
<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>
</div><!-- /.span -->
<divclass="span4">
<h3>Fluid rows</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">
<div class="row-fluid">
...
...
@@ -305,12 +304,8 @@
<div class="span8">...</div>
</div>
</pre>
</div><!-- /.span -->
</div><!-- /.row -->
<h2>Fluid nesting</h2>
<divclass="row">
<divclass="span6">
<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="row-fluid show-grid">
<divclass="span12">
...
...
@@ -325,8 +320,7 @@
</div>
</div>
</div>
</div><!-- /.span -->
<divclass="span6">
<preclass="prettyprint linenums">
<div class="row-fluid">
<div class="span12">
...
...
@@ -338,8 +332,6 @@
</div>
</div>
</pre>
</div><!-- /.span -->
</div><!-- /.row -->
</section>
...
...
@@ -377,20 +369,15 @@
</tr>
</tbody>
</table>
<divclass="row">
<divclass="span4">
<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>
</div><!-- /.span -->
<divclass="span4">
<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>
</div><!-- /.span -->
<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>
...
...
@@ -403,8 +390,6 @@
<h1>Layouts <small>Basic templates to create webpages</small></h1>
</div>
<divclass="row">
<divclass="span6">
<h2>Fixed layout</h2>
<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">
...
...
@@ -417,8 +402,7 @@
</div>
</body>
</pre>
</div><!-- /.span -->
<divclass="span6">
<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>
<divclass="mini-layout fluid">
...
...
@@ -437,8 +421,6 @@
</div>
</div>
</pre>
</div><!-- /.span -->
</div><!-- /.row -->
</section>
...
...
@@ -450,10 +432,9 @@
<divclass="page-header">
<h1>Responsive design <small>Media queries for various devices and resolutions</small></h1>
<p><imgsrc="assets/img/responsive-illustrations.png"alt="Responsive devices"style="float: right; margin: 0 0 20px 20px;"></p>
<h3>What they do</h3>
<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>
...
...
@@ -462,8 +443,7 @@
<li>Resize headings and text to be more appropriate for devices</li>
</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>
</div><!-- /.span -->
<divclass="span8">
<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>
<tableclass="table table-bordered table-striped">
...
...
@@ -510,15 +490,12 @@
<h3>Requires meta tag</h3>
<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>
<ol>
<li>Use the compiled responsive version, bootstrap-responsive.css</li>
...
...
@@ -526,8 +503,7 @@
<li>Modify and recompile responsive.less as a separate file</li>
</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">
/* Landscape phones and down */
@media (max-width: 480px) { ... }
...
...
@@ -541,21 +517,18 @@
/* Large desktop */
@media (min-width: 1200px) { ... }
</pre>
</div><!-- /.span -->
</div><!-- /.row -->
<br>
<!-- Responsive utility classes -->
<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>
<h1>{{_i}}Global styles <small>for CSS reset, typography, and links</small>{{/i}}</h1>
</div>
<divclass="row">
<divclass="span4">
<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>
<preclass="prettyprint linenums">
...
...
@@ -34,8 +33,7 @@
...
</html>
</pre>
</div><!-- /.span -->
<divclass="span4">
<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>
<ul>
...
...
@@ -44,13 +42,11 @@
<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>
</ul>
</div><!-- /.span -->
<divclass="span4">
<h2>{{_i}}Reset via Normalize{{/i}}</h2>
<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>
...
...
@@ -63,6 +59,7 @@
<h1>{{_i}}Default grid system <small>12 columns with a responsive twist</small>{{/i}}</h1>
</div>
<divclass="bs-docs-grid">
<divclass="row show-grid">
<divclass="span1">1</div>
<divclass="span1">1</div>
...
...
@@ -93,6 +90,8 @@
<divclass="row show-grid">
<divclass="span12">12</div>
</div>
</div>
<divclass="row">
<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>
...
...
@@ -113,6 +112,7 @@
<br>
<h2>{{_i}}Offsetting columns{{/i}}</h2>
<divclass="bs-docs-grid">
<divclass="row show-grid">
<divclass="span4">4</div>
<divclass="span4 offset4">4 offset 4</div>
...
...
@@ -124,6 +124,7 @@
<divclass="row show-grid">
<divclass="span8 offset4">8 offset 4</div>
</div><!-- /row -->
</div>
<preclass="prettyprint linenums">
<div class="row">
<div class="span4">...</div>
...
...
@@ -179,6 +180,7 @@
</div>
<h2>{{_i}}Fluid columns{{/i}}</h2>
<divclass="bs-docs-grid">
<divclass="row-fluid show-grid">
<divclass="span1">1</div>
<divclass="span1">1</div>
...
...
@@ -209,17 +211,14 @@
<divclass="row-fluid show-grid">
<divclass="span12">12</div>
</div>
</div>
<divclass="row">
<divclass="span4">
<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>
</div><!-- /.span -->
<divclass="span4">
<h3>{{_i}}Fluid rows{{/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">
<div class="row-fluid">
...
...
@@ -227,12 +226,8 @@
<div class="span8">...</div>
</div>
</pre>
</div><!-- /.span -->
</div><!-- /.row -->
<h2>{{_i}}Fluid nesting{{/i}}</h2>
<divclass="row">
<divclass="span6">
<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="row-fluid show-grid">
<divclass="span12">
...
...
@@ -247,8 +242,7 @@
</div>
</div>
</div>
</div><!-- /.span -->
<divclass="span6">
<preclass="prettyprint linenums">
<div class="row-fluid">
<div class="span12">
...
...
@@ -260,8 +254,6 @@
</div>
</div>
</pre>
</div><!-- /.span -->
</div><!-- /.row -->
</section>
...
...
@@ -299,20 +291,15 @@
</tr>
</tbody>
</table>
<divclass="row">
<divclass="span4">
<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>
</div><!-- /.span -->
<divclass="span4">
<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>
</div><!-- /.span -->
<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>
...
...
@@ -325,8 +312,6 @@
<h1>{{_i}}Layouts <small>Basic templates to create webpages</small>{{/i}}</h1>
</div>
<divclass="row">
<divclass="span6">
<h2>{{_i}}Fixed layout{{/i}}</h2>
<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">
...
...
@@ -339,8 +324,7 @@
</div>
</body>
</pre>
</div><!-- /.span -->
<divclass="span6">
<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>
<divclass="mini-layout fluid">
...
...
@@ -359,8 +343,6 @@
</div>
</div>
</pre>
</div><!-- /.span -->
</div><!-- /.row -->
</section>
...
...
@@ -372,10 +354,9 @@
<divclass="page-header">
<h1>{{_i}}Responsive design <small>Media queries for various devices and resolutions</small>{{/i}}</h1>
<p><imgsrc="assets/img/responsive-illustrations.png"alt="Responsive devices"style="float: right; margin: 0 0 20px 20px;"></p>
<h3>{{_i}}What they do{{/i}}</h3>
<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>
...
...
@@ -384,8 +365,7 @@
<li>{{_i}}Resize headings and text to be more appropriate for devices{{/i}}</li>
</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>
</div><!-- /.span -->
<divclass="span8">
<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>
<tableclass="table table-bordered table-striped">
...
...
@@ -432,15 +412,12 @@
<h3>{{_i}}Requires meta tag{{/i}}</h3>
<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>
<ol>
<li>{{_i}}Use the compiled responsive version, bootstrap-responsive.css{{/i}}</li>
...
...
@@ -448,8 +425,7 @@
<li>{{_i}}Modify and recompile responsive.less as a separate file{{/i}}</li>
</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">
/* {{_i}}Landscape phones and down{{/i}} */
@media (max-width: 480px) { ... }
...
...
@@ -463,21 +439,18 @@
/* {{_i}}Large desktop{{/i}} */
@media (min-width: 1200px) { ... }
</pre>
</div><!-- /.span -->
</div><!-- /.row -->
<br>
<!-- Responsive utility classes -->
<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>