mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-24 12:40:58 +00:00
updating scaffolding page to single column
This commit is contained in:
parent
257890f839
commit
f0ff20ec40
@ -677,6 +677,13 @@ form.well {
|
|||||||
border: 1px solid #d6e9c6;
|
border: 1px solid #d6e9c6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Grid examples
|
||||||
|
------------------------- */
|
||||||
|
.bs-docs-grid {
|
||||||
|
margin-left: -80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Responsive Docs
|
/* Responsive Docs
|
||||||
-------------------------------------------------- */
|
-------------------------------------------------- */
|
||||||
@ -893,4 +900,9 @@ form.well {
|
|||||||
width: 1168px; /* 2px less to account for left/right borders being removed when in fixed mode */
|
width: 1168px; /* 2px less to account for left/right borders being removed when in fixed mode */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bs-docs-grid {
|
||||||
|
width: 1170px;
|
||||||
|
margin-left: -195px;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -102,8 +102,7 @@
|
|||||||
<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>
|
||||||
<div class="row">
|
|
||||||
<div class="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>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
@ -112,8 +111,7 @@
|
|||||||
...
|
...
|
||||||
</html>
|
</html>
|
||||||
</pre>
|
</pre>
|
||||||
</div><!-- /.span -->
|
|
||||||
<div class="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>
|
||||||
@ -122,13 +120,11 @@
|
|||||||
<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 -->
|
|
||||||
<div class="span4">
|
|
||||||
<h2>Reset via Normalize</h2>
|
<h2>Reset via Normalize</h2>
|
||||||
<p>As of Bootstrap 2, the traditional CSS reset has evolved to make use of elements from <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>.</p>
|
<p>As of Bootstrap 2, the traditional CSS reset has evolved to make use of elements from <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>.</p>
|
||||||
<p>The new reset can still be found in <strong>reset.less</strong>, but with many elements removed for brevity and accuracy.</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,6 +137,7 @@
|
|||||||
<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>
|
||||||
|
|
||||||
|
<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>
|
||||||
@ -171,6 +168,8 @@
|
|||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span12">12</div>
|
<div class="span12">12</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span4">
|
<div class="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,6 +190,7 @@
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<h2>Offsetting columns</h2>
|
<h2>Offsetting columns</h2>
|
||||||
|
<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 offset4">4 offset 4</div>
|
<div class="span4 offset4">4 offset 4</div>
|
||||||
@ -202,6 +202,7 @@
|
|||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span8 offset4">8 offset 4</div>
|
<div class="span8 offset4">8 offset 4</div>
|
||||||
</div><!-- /row -->
|
</div><!-- /row -->
|
||||||
|
</div>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span4">...</div>
|
<div class="span4">...</div>
|
||||||
@ -257,6 +258,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Fluid columns</h2>
|
<h2>Fluid columns</h2>
|
||||||
|
<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>
|
||||||
@ -287,17 +289,14 @@
|
|||||||
<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 class="row">
|
|
||||||
<div class="span4">
|
|
||||||
<h3>Percents, not pixels</h3>
|
<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>
|
<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 -->
|
|
||||||
<div class="span4">
|
|
||||||
<h3>Fluid rows</h3>
|
<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>
|
<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 -->
|
|
||||||
<div class="span4">
|
|
||||||
<h3>Markup</h3>
|
<h3>Markup</h3>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
@ -305,12 +304,8 @@
|
|||||||
<div class="span8">...</div>
|
<div class="span8">...</div>
|
||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
</div><!-- /.span -->
|
|
||||||
</div><!-- /.row -->
|
|
||||||
|
|
||||||
<h2>Fluid nesting</h2>
|
<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>
|
<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="row-fluid show-grid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
@ -325,8 +320,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /.span -->
|
|
||||||
<div class="span6">
|
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
@ -338,8 +332,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
</div><!-- /.span -->
|
|
||||||
</div><!-- /.row -->
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -377,20 +369,15 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="row">
|
|
||||||
<div class="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 -->
|
|
||||||
<div class="span4">
|
|
||||||
<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 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>
|
<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><!-- /.span -->
|
|
||||||
<div class="span4">
|
|
||||||
<h3>Staying responsive</h3>
|
<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>
|
<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,8 +390,6 @@
|
|||||||
<h1>Layouts <small>Basic templates to create webpages</small></h1>
|
<h1>Layouts <small>Basic templates to create webpages</small></h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="span6">
|
|
||||||
<h2>Fixed layout</h2>
|
<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>
|
<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>
|
||||||
<div class="mini-layout">
|
<div class="mini-layout">
|
||||||
@ -417,8 +402,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</pre>
|
</pre>
|
||||||
</div><!-- /.span -->
|
|
||||||
<div class="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>
|
||||||
<div class="mini-layout fluid">
|
<div class="mini-layout fluid">
|
||||||
@ -437,8 +421,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
</div><!-- /.span -->
|
|
||||||
</div><!-- /.row -->
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
@ -450,10 +432,9 @@
|
|||||||
<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>
|
||||||
|
|
||||||
<!-- Supported devices -->
|
<!-- Supported devices -->
|
||||||
<div class="row">
|
<p><img src="assets/img/responsive-illustrations.png" alt="Responsive devices" style="float: right; margin: 0 0 20px 20px;"></p>
|
||||||
<div class="span4">
|
|
||||||
<p><img src="assets/img/responsive-illustrations.png" alt="Responsive devices"></p>
|
|
||||||
<h3>What they do</h3>
|
<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>
|
<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>
|
||||||
@ -462,8 +443,7 @@
|
|||||||
<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>
|
||||||
</div><!-- /.span -->
|
|
||||||
<div class="span8">
|
|
||||||
<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">
|
||||||
@ -510,15 +490,12 @@
|
|||||||
<h3>Requires meta tag</h3>
|
<h3>Requires meta tag</h3>
|
||||||
<p>To ensure devices display responsive pages properly, include the viewport meta tag.</p>
|
<p>To ensure devices display responsive pages properly, include the viewport meta tag.</p>
|
||||||
<pre class="prettyprint linenums"><meta name="viewport" content="width=device-width, initial-scale=1.0"></pre>
|
<pre class="prettyprint linenums"><meta name="viewport" content="width=device-width, initial-scale=1.0"></pre>
|
||||||
</div><!-- /.span -->
|
|
||||||
</div><!-- /.row -->
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<!-- Media query code -->
|
<!-- Media query code -->
|
||||||
<h2>Using the media queries</h2>
|
<h2>Using the media queries</h2>
|
||||||
<div class="row">
|
|
||||||
<div class="span4">
|
|
||||||
<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>
|
<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>
|
<ol>
|
||||||
<li>Use the compiled responsive version, bootstrap-responsive.css</li>
|
<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>
|
<li>Modify and recompile responsive.less as a separate file</li>
|
||||||
</ol>
|
</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>
|
<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 -->
|
|
||||||
<div class="span8">
|
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
/* Landscape phones and down */
|
/* Landscape phones and down */
|
||||||
@media (max-width: 480px) { ... }
|
@media (max-width: 480px) { ... }
|
||||||
@ -541,21 +517,18 @@
|
|||||||
/* 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>
|
||||||
<div class="row">
|
|
||||||
<div class="span4">
|
|
||||||
<h3>What are they</h2>
|
<h3>What are they</h2>
|
||||||
<p>For faster mobile-friendly development, use these basic utility classes for showing and hiding content by device.</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>
|
<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>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>
|
<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 -->
|
|
||||||
<div class="span8">
|
|
||||||
<h3>Support classes</h3>
|
<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>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>
|
||||||
<table class="table table-bordered table-striped responsive-utilities">
|
<table class="table table-bordered table-striped responsive-utilities">
|
||||||
@ -622,14 +595,7 @@
|
|||||||
<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>
|
||||||
</div><!-- /.span -->
|
|
||||||
</div><!-- /.row -->
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="span4">
|
|
||||||
</div><!-- /.span -->
|
|
||||||
</div><!-- /.row -->
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
86
docs/templates/pages/scaffolding.mustache
vendored
86
docs/templates/pages/scaffolding.mustache
vendored
@ -24,8 +24,7 @@
|
|||||||
<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>
|
||||||
<div class="row">
|
|
||||||
<div class="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>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
@ -34,8 +33,7 @@
|
|||||||
...
|
...
|
||||||
</html>
|
</html>
|
||||||
</pre>
|
</pre>
|
||||||
</div><!-- /.span -->
|
|
||||||
<div class="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>
|
||||||
@ -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}}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 -->
|
|
||||||
<div class="span4">
|
|
||||||
<h2>{{_i}}Reset via Normalize{{/i}}</h2>
|
<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 <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>.{{/i}}</p>
|
<p>{{_i}}As of Bootstrap 2, the traditional CSS reset has evolved to make use of elements from <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>.{{/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>
|
<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,6 +59,7 @@
|
|||||||
<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>
|
||||||
|
|
||||||
|
<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>
|
||||||
@ -93,6 +90,8 @@
|
|||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span12">12</div>
|
<div class="span12">12</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span4">
|
<div class="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,6 +112,7 @@
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<h2>{{_i}}Offsetting columns{{/i}}</h2>
|
<h2>{{_i}}Offsetting columns{{/i}}</h2>
|
||||||
|
<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 offset4">4 offset 4</div>
|
<div class="span4 offset4">4 offset 4</div>
|
||||||
@ -124,6 +124,7 @@
|
|||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span8 offset4">8 offset 4</div>
|
<div class="span8 offset4">8 offset 4</div>
|
||||||
</div><!-- /row -->
|
</div><!-- /row -->
|
||||||
|
</div>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span4">...</div>
|
<div class="span4">...</div>
|
||||||
@ -179,6 +180,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>{{_i}}Fluid columns{{/i}}</h2>
|
<h2>{{_i}}Fluid columns{{/i}}</h2>
|
||||||
|
<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>
|
||||||
@ -209,17 +211,14 @@
|
|||||||
<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 class="row">
|
|
||||||
<div class="span4">
|
|
||||||
<h3>{{_i}}Percents, not pixels{{/i}}</h3>
|
<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>
|
<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 -->
|
|
||||||
<div class="span4">
|
|
||||||
<h3>{{_i}}Fluid rows{{/i}}</h3>
|
<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>
|
<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 -->
|
|
||||||
<div class="span4">
|
|
||||||
<h3>{{_i}}Markup{{/i}}</h3>
|
<h3>{{_i}}Markup{{/i}}</h3>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
@ -227,12 +226,8 @@
|
|||||||
<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>
|
||||||
<div class="row">
|
|
||||||
<div class="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>
|
<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>
|
||||||
<div class="row-fluid show-grid">
|
<div class="row-fluid show-grid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
@ -247,8 +242,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /.span -->
|
|
||||||
<div class="span6">
|
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
@ -260,8 +254,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
</div><!-- /.span -->
|
|
||||||
</div><!-- /.row -->
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -299,20 +291,15 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="row">
|
|
||||||
<div class="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 -->
|
|
||||||
<div class="span4">
|
|
||||||
<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 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.{{/i}}</p>
|
<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 <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.{{/i}}</p>
|
||||||
</div><!-- /.span -->
|
|
||||||
<div class="span4">
|
|
||||||
<h3>{{_i}}Staying responsive{{/i}}</h3>
|
<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>
|
<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,8 +312,6 @@
|
|||||||
<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>
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="span6">
|
|
||||||
<h2>{{_i}}Fixed layout{{/i}}</h2>
|
<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>
|
<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>
|
||||||
<div class="mini-layout">
|
<div class="mini-layout">
|
||||||
@ -339,8 +324,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</pre>
|
</pre>
|
||||||
</div><!-- /.span -->
|
|
||||||
<div class="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>
|
||||||
<div class="mini-layout fluid">
|
<div class="mini-layout fluid">
|
||||||
@ -359,8 +343,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
</div><!-- /.span -->
|
|
||||||
</div><!-- /.row -->
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
@ -372,10 +354,9 @@
|
|||||||
<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>
|
||||||
|
|
||||||
<!-- Supported devices -->
|
<!-- Supported devices -->
|
||||||
<div class="row">
|
<p><img src="assets/img/responsive-illustrations.png" alt="Responsive devices" style="float: right; margin: 0 0 20px 20px;"></p>
|
||||||
<div class="span4">
|
|
||||||
<p><img src="assets/img/responsive-illustrations.png" alt="Responsive devices"></p>
|
|
||||||
<h3>{{_i}}What they do{{/i}}</h3>
|
<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>
|
<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>
|
||||||
@ -384,8 +365,7 @@
|
|||||||
<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>
|
||||||
</div><!-- /.span -->
|
|
||||||
<div class="span8">
|
|
||||||
<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">
|
||||||
@ -432,15 +412,12 @@
|
|||||||
<h3>{{_i}}Requires meta tag{{/i}}</h3>
|
<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}}To ensure devices display responsive pages properly, include the viewport meta tag.{{/i}}</p>
|
||||||
<pre class="prettyprint linenums"><meta name="viewport" content="width=device-width, initial-scale=1.0"></pre>
|
<pre class="prettyprint linenums"><meta name="viewport" content="width=device-width, initial-scale=1.0"></pre>
|
||||||
</div><!-- /.span -->
|
|
||||||
</div><!-- /.row -->
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<!-- Media query code -->
|
<!-- Media query code -->
|
||||||
<h2>{{_i}}Using the media queries{{/i}}</h2>
|
<h2>{{_i}}Using the media queries{{/i}}</h2>
|
||||||
<div class="row">
|
|
||||||
<div class="span4">
|
|
||||||
<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>
|
<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>
|
<ol>
|
||||||
<li>{{_i}}Use the compiled responsive version, bootstrap-responsive.css{{/i}}</li>
|
<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>
|
<li>{{_i}}Modify and recompile responsive.less as a separate file{{/i}}</li>
|
||||||
</ol>
|
</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>
|
<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 -->
|
|
||||||
<div class="span8">
|
|
||||||
<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) { ... }
|
||||||
@ -463,21 +439,18 @@
|
|||||||
/* {{_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>
|
||||||
<div class="row">
|
|
||||||
<div class="span4">
|
|
||||||
<h3>{{_i}}What are they{{/i}}</h2>
|
<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>
|
<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>
|
<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}}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>
|
<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 -->
|
|
||||||
<div class="span8">
|
|
||||||
<h3>{{_i}}Support classes{{/i}}</h3>
|
<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}}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>
|
||||||
<table class="table table-bordered table-striped responsive-utilities">
|
<table class="table table-bordered table-striped responsive-utilities">
|
||||||
@ -544,12 +517,5 @@
|
|||||||
<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>
|
||||||
</div><!-- /.span -->
|
|
||||||
</div><!-- /.row -->
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="span4">
|
|
||||||
</div><!-- /.span -->
|
|
||||||
</div><!-- /.row -->
|
|
||||||
</section>
|
</section>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user