aboutsummaryrefslogtreecommitdiff
path: root/docs/scaffolding.html
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2012-02-16 22:41:02 -0800
committerJacob Thornton <[email protected]>2012-02-16 22:41:02 -0800
commit03e6dc66c2fe14e756723395752feefb687b6526 (patch)
treeb8cfe13d72e1a780ef08dbd26e3bfe48e406c59e /docs/scaffolding.html
parent9143d8e449a852c606194ea8c529e30ea1a52ddf (diff)
parent091622644a0c619e1afbb21041c141da30df76b7 (diff)
downloadbootstrap-03e6dc66c2fe14e756723395752feefb687b6526.tar.xz
bootstrap-03e6dc66c2fe14e756723395752feefb687b6526.zip
Merge branch '2.0.1-wip'
Diffstat (limited to 'docs/scaffolding.html')
-rw-r--r--docs/scaffolding.html154
1 files changed, 132 insertions, 22 deletions
diff --git a/docs/scaffolding.html b/docs/scaffolding.html
index 4ed4a36c8..525c1152f 100644
--- a/docs/scaffolding.html
+++ b/docs/scaffolding.html
@@ -7,17 +7,17 @@
<meta name="description" content="">
<meta name="author" content="">
- <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
- <!--[if lt IE 9]>
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
-
<!-- Le styles -->
<link href="assets/css/bootstrap.css" rel="stylesheet">
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
<link href="assets/css/docs.css" rel="stylesheet">
<link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet">
+ <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="assets/ico/favicon.ico">
<link rel="apple-touch-icon" href="assets/ico/apple-touch-icon.png">
@@ -81,7 +81,9 @@
<p class="lead">Bootstrap is built on a responsive 12-column grid. We've also included fixed- and fluid-width layouts based on that system.</p>
<div class="subnav">
<ul class="nav nav-pills">
- <li><a href="#grid-system">Grid system</a></li>
+ <li><a href="#gridSystem">Grid system</a></li>
+ <li><a href="#fluidGridSystem">Fluid gird 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>
@@ -92,12 +94,11 @@
<!-- Grid system
================================================== -->
-<section id="grid-system">
+<section id="gridSystem">
<div class="page-header">
- <h1>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>
- <h2>Default 940px grid</h2>
<div class="row show-grid">
<div class="span1">1</div>
<div class="span1">1</div>
@@ -173,7 +174,8 @@
<div class="row">
<div class="span6">
<p>With the static (non-fluid) grid system in Bootstrap, nesting is easy. To nest your content, just add a new <code>.row</code> and set of <code>.span*</code> columns within an existing <code>.span*</code> column.</p>
- <h4>Example</h4>
+ <h3>Example</h3>
+ <p>Nested rows should include a set of columns that add up to the number of columns of it's parent. For example, two nested <code>.span3</code> columns should be placed within a <code>.span6</code>.</p>
<div class="row show-grid">
<div class="span6">
Level 1 of column
@@ -187,7 +189,7 @@
</div>
</div>
</div>
- </div>
+ </div><!-- /span6 -->
<div class="span6">
<pre class="prettyprint linenums">
&lt;div class="row"&gt;
@@ -202,8 +204,112 @@
</pre>
</div>
</div>
+</section>
+
+
+
+<!-- Fluid grid system
+================================================== -->
+<section id="fluidGridSystem">
+ <div class="page-header">
+ <h1>Fluid grid system <small>12 responsive, percent-based columns</small></h1>
+ </div>
- <h2>Grid customization</h2>
+ <h2>Fluid columns</h2>
+ <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>
+ <div class="row-fluid show-grid">
+ <div class="span4">4</div>
+ <div class="span4">4</div>
+ <div class="span4">4</div>
+ </div>
+ <div class="row-fluid show-grid">
+ <div class="span4">4</div>
+ <div class="span8">8</div>
+ </div>
+ <div class="row-fluid show-grid">
+ <div class="span6">6</div>
+ <div class="span6">6</div>
+ </div>
+ <div class="row-fluid show-grid">
+ <div class="span12">12</div>
+ </div>
+
+ <div class="row">
+ <div class="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>
+ <div class="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>
+ <div class="span4">
+ <h3>Markup</h3>
+<pre class="prettyprint linenums">
+&lt;div class="row-fluid"&gt;
+ &lt;div class="span4"&gt;...&lt;/div&gt;
+ &lt;div class="span8"&gt;...&lt;/div&gt;
+&lt;/div&gt;
+</pre>
+ </div>
+ </div><!-- /row -->
+
+ <h2>Fluid nesting</h2>
+ <div class="row">
+ <div class="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>
+ <div class="row-fluid show-grid">
+ <div class="span12">
+ Fluid 12
+ <div class="row-fluid show-grid">
+ <div class="span6">
+ Fluid 6
+ </div>
+ <div class="span6">
+ Fluid 6
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="span6">
+<pre class="prettyprint linenums">
+&lt;div class="row-fluid"&gt;
+ &lt;div class="span12"&gt;
+ Level 1 of column
+ &lt;div class="row-fluid"&gt;
+ &lt;div class="span6"&gt;Level 2&lt;/div&gt;
+ &lt;div class="span6"&gt;Level 2&lt;/div&gt;
+ &lt;/div&gt;
+ &lt;/div&gt;
+&lt;/div&gt;
+</pre>
+ </div>
+ </div>
+
+</section>
+
+
+
+<!-- Customizaton
+================================================== -->
+<section id="gridCustomization">
+ <div class="page-header">
+ <h1>Grid customization</h1>
+ </div>
<table class="table table-bordered table-striped">
<thead>
<tr>
@@ -242,7 +348,7 @@
</div>
<div class="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 <a href="#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>
+ <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 <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 grid.less.</p>
</div>
<div class="span4">
<h3>Staying responsive</h3>
@@ -265,8 +371,8 @@
<div class="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>&lt;div class="container"&gt;</code>.</p>
- <div class="minicon-layout">
- <div class="minicon-layout-body"></div>
+ <div class="mini-layout">
+ <div class="mini-layout-body"></div>
</div>
<pre class="prettyprint linenums">
&lt;body&gt;
@@ -279,9 +385,9 @@
<div class="span6">
<h2>Fluid layout</h2>
<p><code>&lt;div class="container-fluid"&gt;</code> gives flexible page structure, min- and max-widths, and a left-hand sidebar. It's great for apps and docs.</p>
- <div class="minicon-layout fluid">
- <div class="minicon-layout-sidebar"></div>
- <div class="minicon-layout-body"></div>
+ <div class="mini-layout fluid">
+ <div class="mini-layout-sidebar"></div>
+ <div class="mini-layout-body"></div>
</div>
<pre class="prettyprint linenums">
&lt;div class="container-fluid"&gt;
@@ -315,7 +421,7 @@
</div>
<div class="span8">
<h2>Supported devices</h2>
- <p>Bootstrap supports a handful of media queries 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">
<thead>
<tr>
@@ -338,8 +444,8 @@
</tr>
<tr>
<td>Landscape tablets</td>
- <td>768px to 980px</td>
- <td>44px</td>
+ <td>768px to 979px</td>
+ <td>42px</td>
<td>20px</td>
</tr>
<tr>
@@ -357,6 +463,10 @@
</tbody>
</table>
+ <h3>Requires meta tag</h3>
+ <p>To ensure devices display responsive pages properly, include the viewport meta tag.</p>
+ <pre class="prettyprint linenums">&lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;</pre>
+
<h3>What they do</h3>
<p>Media queries allow for custom CSS based on a number of conditions&mdash;ratios, widths, display type, etc&mdash;but usually focuses around <code>min-width</code> and <code>max-width</code>.</p>
<ul>
@@ -377,7 +487,7 @@
<ol>
<li>Use the compiled responsive version, bootstrap-responsive.css</li>
<li>Add @import "responsive.less" and recompile Bootstrap</li>
- <li>Modify and recompile responsive.less as a separate</li>
+ <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>