diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index 45c6693a7e..81fb7dc9be 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -18,57 +18,25 @@ body { background-position: 0 40px; } -body, -li { - line-height: 20px; -} - -.bs-docs-nav { - display: none; - position: fixed; - top: 0; - left: 0; - bottom: 0; - overflow-y: scroll; - width: 140px; - padding: 25px 30px; - background-color: #eee; - text-shadow: 0 1px 0 rgba(255,255,255,.5); -} -.bs-docs-nav ul { - margin-left: 0; - margin-bottom: 10px; -} -.bs-docs-nav ul li { - list-style: none; -} -.bs-docs-nav a { - font-size: 13px; - line-height: 20px; -} -.bs-docs-nav > ul > li > a { - font-size: 14px; - color: #999; -} - -.bs-docs-wrapper { - position: fixed; - top: 0; - left: 200px; - right: 0; - bottom: 0; - padding: 40px 0; - overflow-y: scroll; - -webkit-box-shadow: -10px 0 15px rgba(0,0,0,.05), -5px 0 10px rgba(0,0,0,.05); - -moz-box-shadow: -10px 0 15px rgba(0,0,0,.05), -5px 0 10px rgba(0,0,0,.05); - box-shadow: -10px 0 15px rgba(0,0,0,.05), -5px 0 10px rgba(0,0,0,.05); -} - +/* Custom container for the narrow docs */ .bs-docs-container { max-width: 780px; margin: 0 auto; } +/* Increase docs base type size and line-heights */ +body { + line-height: 20px; +} +p { + margin-bottom: 15px; +} +li { + line-height: 25px; +} + + + /* Tweak navbar brand link to be super sleek -------------------------------------------------- */ .navbar { @@ -97,6 +65,12 @@ section { padding-top: 60px; } +/* Table of contents */ +.bs-docs-contents li { + line-height: 25px; + color: #777; +} + /* Faded out hr */ hr.soften { height: 1px; @@ -108,17 +82,6 @@ hr.soften { border: 0; } -/* Table of contents */ -.bs-docs-contents { -} -.bs-docs-contents h3 { - -} -.bs-docs-contents li { - line-height: 25px; - color: #777; -} - /* Jumbotrons -------------------------------------------------- */ @@ -365,8 +328,8 @@ hr.soften { -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; - min-height: 30px; - line-height: 30px; + min-height: 40px; + line-height: 40px; } .show-grid:hover [class*="span"] { background: #ddd; @@ -667,6 +630,9 @@ form.well { font-size: 13px; line-height: 18px; } +.bs-docs-example p { + margin-bottom: 9px; +} .bs-docs-example p:last-child { margin-bottom: 0; } @@ -674,6 +640,9 @@ form.well { font-size: 18px; line-height: 24px; } +.bs-docs-example li { + line-height: 18px; +} /* Responsive table ------------------------- */ diff --git a/docs/base-css.html b/docs/base-css.html index 16eca66c76..aed1a5e08b 100644 --- a/docs/base-css.html +++ b/docs/base-css.html @@ -74,89 +74,6 @@ -
<div class="row"> - <div class="span6"> + <div class="span8"> Level 1 column <div class="row"> - <div class="span3">Level 2</div> - <div class="span3">Level 2</div> + <div class="span4">Level 2</div> + <div class="span4">Level 2</div> </div> </div> </div>-
The fluid grid system uses percents instead of pixels for column widths. It has the same responsive capabilities as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.
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.
- -Make any row fluid simply by changing .row
to .row-fluid
. The columns stay the exact same, making it super straightforward to flip between fixed and fluid layouts.
Make any row "fluid" by changing .row
to .row-fluid
. The column classes stay the exact same, making it easy to flip between fixed and fluid grids.
<div class="row-fluid"> <div class="span4">...</div> @@ -384,7 +290,7 @@
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.
+Nesting with fluid grids is a bit different: the number of nested columns should not match the parent's number of columns. Instead, each level of nested columns are reset because each row takes up 100% of the parent column.
<div class="row-fluid"> <div class="span12"> @@ -421,6 +326,9 @@+ +Grid customization
Variables in LESS
+The default grid is built on a few variables for easy customization via LESS. All variables can be found in variables.less.
20px | Negative space between columns | |
@fluidGridColumnWidth |
+ 6.382978723% | +Width of each fluid column | +
@fluidGridGutterWidth |
+ 2.127659574% | +Negative space between fluid columns | +
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.
-Modifying the grid means changing the three @grid*
variables and recompiling Bootstrap. Change the grid variables in variables.less and use one of the four ways documented to recompile. If you're adding more columns, be sure to add the CSS for those in grid.less.
Modifying the grid means changing the three @grid*
variables and recompiling Bootstrap. Change the grid variables in variables.less and use one of the four ways documented to recompile. If you're adding more columns, be sure to add the CSS for those in grid.less.
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.
+Customization of the grid only works at the default level, the 940px grid. To maintain the responsive aspects of Bootstrap, you'll also have to manually customize the grids in responsive.less until a future update improves this.
@@ -469,7 +384,7 @@The default and simple 940px-wide, centered layout for just about any website or page provided by a single <div class="container">
.
Provides a common fixed-width (and optionally responsive) layout with only <div class="container">
required.
<div class="container-fluid">
gives flexible page structure, min- and max-widths, and a left-hand sidebar. It's great for apps and docs.
Create a fluid, two-column page with <div class="container-fluid">
—great for applications and docs.
Turn on responsive CSS in your project by including the proper meta tag and additional stylesheet within the <head>
of your document. If you've compiled Bootstrap from the Customize page, you need only include the meta tag.
+<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<link href="assets/css/bootstrap-responsive.css" rel="stylesheet"> ++
Heads up! Bootstrap doesn't include responsive features by default at this time as not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it as needed.
+ +Media queries allow for custom CSS based on a number of conditions—ratios, widths, display type, etc—but usually focuses around min-width
and max-width
.
To ensure devices display responsive pages properly, include the viewport meta tag.
-<meta name="viewport" content="width=device-width, initial-scale=1.0">- - -
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:
-Why not just include it? Truth be told, not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it.
-- /* Landscape phones and down */ - @media (max-width: 480px) { ... } +/* Landscape phones and down */ +@media (max-width: 480px) { ... } - /* Landscape phone to portrait tablet */ - @media (max-width: 767px) { ... } +/* Landscape phone to portrait tablet */ +@media (max-width: 767px) { ... } - /* Portrait tablet to landscape and desktop */ - @media (min-width: 768px) and (max-width: 979px) { ... } +/* Portrait tablet to landscape and desktop */ +@media (min-width: 768px) and (max-width: 979px) { ... } - /* Large desktop */ - @media (min-width: 1200px) { ... } +/* Large desktop */ +@media (min-width: 1200px) { ... }-
For faster mobile-friendly development, use these basic utility classes for showing and hiding content by device.
-Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.
-For example, you might show a <select>
element for nav on mobile layouts, but not on tablets or desktops.
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 responsive.less
.
For faster mobile-friendly development, use these utility classes for showing and hiding content by device. Below is a table of the available classes and their effect on a given media query layout (labeled by device). They can be found in responsive.less
.
Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.
+ +Resize your browser or load on different devices to test the above classes.
Green checkmarks indicate that class is visible in your current viewport.
diff --git a/docs/templates/layout.mustache b/docs/templates/layout.mustache index b74f59f897..3e8448d194 100644 --- a/docs/templates/layout.mustache +++ b/docs/templates/layout.mustache @@ -86,89 +86,6 @@ -{{_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}}
+{{_i}}Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.{{/i}}
<!DOCTYPE html> <html lang="en"> @@ -37,17 +37,17 @@
{{_i}}Within the scaffolding.less file, we set basic global display, typography, and link styles. Specifically, we:{{/i}}
+{{_i}}Bootstrap sets basic global display, typography, and link styles. Specifically, we:{{/i}}
margin
on the body{{/i}}background-color: white;
on the body
{{/i}}@baseFontFamily
, @baseFontSize
, and @baseLineHeight
attributes as our typographyic base{{/i}}@linkColor
and apply link underlines only on :hover
{{/i}}{{_i}}These styles can be found within scaffolding.less.{{/i}}
{{_i}}As of Bootstrap 2, the traditional CSS reset has evolved to make use of elements from Normalize.css, a project by Nicolas Gallagher that also powers the HTML5 Boilerplate.{{/i}}
-{{_i}}The new reset can still be found in reset.less, but with many elements removed for brevity and accuracy.{{/i}}
+{{_i}}With Bootstrap 2, the old reset block has been dropped in favor of Normalize.css, a project by Nicolas Gallagher that also powers the HTML5 Boilerplate. While we use much of Normalize within our reset.less, we have removed some elements specifically for Bootstrap.{{/i}}
@@ -61,6 +61,8 @@{{_i}}The default Bootstrap grid system utilizes 12 columns, making for a 940px wide container without responsive features enabled. With the responsive CSS file added, the grid adapts to be 724px and 1170px wide depending on your viewport. Below 767px viewports, the columns become fluid and stack vertically.{{/i}}
{{_i}}The default grid system provided in Bootstrap utilizes 12 columns 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}}
+{{_i}}For a simple two column layout, create a .row
and add the appropriate number of .span*
columns. As this is a 12-column grid, each .span*
spans a number of those 12 columns, and should always add up to 12 for each row.{{/i}}
<div class="row"> <div class="span4">...</div> <div class="span8">...</div> </div>- -
{{_i}}As shown here, a basic layout can be created with two "columns", each spanning a number of the 12 foundational columns we defined as part of our grid system.{{/i}}
- -{{_i}}Given this example, we have .span4
and .span8
, making for 12 total columns and a complete row.{{/i}}
{{_i}}Move columns to the left using .offset*
classes. Each class increases the left margin of a column by a whole column. For example, .offset4
moves .span4
over four columns.{{/i}}
{{_i}}With the static (non-fluid) grid system in Bootstrap, nesting is easy. To nest your content, just add a new .row
and set of .span*
columns within an existing .span*
column.{{/i}}
{{_i}}Nested rows should include a set of columns that add up to the number of columns of it's parent. For example, two nested .span3
columns should be placed within a .span6
.{{/i}}
{{_i}}To nest your content with the default grid, add a new .row
and set of .span*
columns within an existing .span*
column. Nested rows should include a set of columns that add up to the number of columns of its parent.{{/i}}
{{_i}}Here two nested .span4
columns are placed within a .span8
.{{/i}}
<div class="row"> - <div class="span6"> + <div class="span8"> {{_i}}Level 1 column{{/i}} <div class="row"> - <div class="span3">{{_i}}Level 2{{/i}}</div> - <div class="span3">{{_i}}Level 2{{/i}}</div> + <div class="span4">{{_i}}Level 2{{/i}}</div> + <div class="span4">{{_i}}Level 2{{/i}}</div> </div> </div> </div>-
{{_i}}The fluid grid system uses percents instead of pixels for column widths. It has the same responsive capabilities as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.{{/i}}
{{_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}}
- -{{_i}}Make any row fluid simply by changing .row
to .row-fluid
. The columns stay the exact same, making it super straightforward to flip between fixed and fluid layouts.{{/i}}
{{_i}}Make any row "fluid" by changing .row
to .row-fluid
. The column classes stay the exact same, making it easy to flip between fixed and fluid grids.{{/i}}
<div class="row-fluid"> <div class="span4">...</div> @@ -223,7 +212,7 @@
{{_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}}
+{{_i}}Nesting with fluid grids is a bit different: the number of nested columns should not match the parent's number of columns. Instead, each level of nested columns are reset because each row takes up 100% of the parent column.{{/i}}
<div class="row-fluid"> <div class="span12"> @@ -260,6 +248,9 @@+ +{{_i}}Grid customization{{/i}}
{{_i}}Variables in LESS{{/i}}
+{{_i}}The default grid is built on a few variables for easy customization via LESS. All variables can be found in variables.less.{{/i}}
20px | {{_i}}Negative space between columns{{/i}} | |
@fluidGridColumnWidth |
+ 6.382978723% | +{{_i}}Width of each fluid column{{/i}} | +
@fluidGridGutterWidth |
+ 2.127659574% | +{{_i}}Negative space between fluid columns{{/i}} | +
{{_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}}
-{{_i}}Modifying the grid means changing the three @grid*
variables and recompiling Bootstrap. Change the grid variables in variables.less and use one of the four ways documented to recompile. If you're adding more columns, be sure to add the CSS for those in grid.less.{{/i}}
{{_i}}Modifying the grid means changing the three @grid*
variables and recompiling Bootstrap. Change the grid variables in variables.less and use one of the four ways documented to recompile. If you're adding more columns, be sure to add the CSS for those in grid.less.{{/i}}
{{_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}}
+{{_i}}Customization of the grid only works at the default level, the 940px grid. To maintain the responsive aspects of Bootstrap, you'll also have to manually customize the grids in responsive.less until a future update improves this.{{/i}}
@@ -308,7 +306,7 @@{{_i}}The default and simple 940px-wide, centered layout for just about any website or page provided by a single <div class="container">
.{{/i}}
{{_i}}Provides a common fixed-width (and optionally responsive) layout with only <div class="container">
required.{{/i}}
{{_i}}<div class="container-fluid">
gives flexible page structure, min- and max-widths, and a left-hand sidebar. It's great for apps and docs.{{/i}}
{{_i}}Create a fluid, two-column page with <div class="container-fluid">
—great for applications and docs.{{/i}}
{{_i}}Turn on responsive CSS in your project by including the proper meta tag and additional stylesheet within the <head>
of your document. If you've compiled Bootstrap from the Customize page, you need only include the meta tag.{{/i}}
+<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<link href="assets/css/bootstrap-responsive.css" rel="stylesheet"> ++
{{_i}}Heads up!{{/i}} {{_i}} Bootstrap doesn't include responsive features by default at this time as not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it as needed.{{/i}}
+ + {{! About }} +{{_i}}Media queries allow for custom CSS based on a number of conditions—ratios, widths, display type, etc—but usually focuses around min-width
and max-width
.{{/i}}
{{_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}}
+ {{! Supported }}{{_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}}
{{_i}}To ensure devices display responsive pages properly, include the viewport meta tag.{{/i}}
-<meta name="viewport" content="width=device-width, initial-scale=1.0">- - -
{{_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}}
-{{_i}}Why not just include it? 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}}
-- /* {{_i}}Landscape phones and down{{/i}} */ - @media (max-width: 480px) { ... } +/* {{_i}}Landscape phones and down{{/i}} */ +@media (max-width: 480px) { ... } - /* {{_i}}Landscape phone to portrait tablet{{/i}} */ - @media (max-width: 767px) { ... } +/* {{_i}}Landscape phone to portrait tablet{{/i}} */ +@media (max-width: 767px) { ... } - /* {{_i}}Portrait tablet to landscape and desktop{{/i}} */ - @media (min-width: 768px) and (max-width: 979px) { ... } +/* {{_i}}Portrait tablet to landscape and desktop{{/i}} */ +@media (min-width: 768px) and (max-width: 979px) { ... } - /* {{_i}}Large desktop{{/i}} */ - @media (min-width: 1200px) { ... } +/* {{_i}}Large desktop{{/i}} */ +@media (min-width: 1200px) { ... }-
{{_i}}For faster mobile-friendly development, use these basic utility classes for showing and hiding content by device.{{/i}}
-{{_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}}
-{{_i}}For example, you might show a <select>
element for nav on mobile layouts, but not on tablets or desktops.{{/i}}
{{_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 responsive.less
.{{/i}}
{{_i}}For faster mobile-friendly development, use these utility classes for showing and hiding content by device. Below is a table of the available classes and their effect on a given media query layout (labeled by device). They can be found in responsive.less
.{{/i}}
{{_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}}
+ +{{_i}}Resize your browser or load on different devices to test the above classes.{{/i}}
{{_i}}Green checkmarks indicate that class is visible in your current viewport.{{/i}}
diff --git a/docs/upgrading.html b/docs/upgrading.html index 603b32ea2d..a2da493ed0 100644 --- a/docs/upgrading.html +++ b/docs/upgrading.html @@ -74,89 +74,6 @@