diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index dce385eb68..5bdf83b2c3 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -677,6 +677,13 @@ form.well { border: 1px solid #d6e9c6; } +/* Grid examples +------------------------- */ +.bs-docs-grid { + margin-left: -80px; +} + + /* Responsive Docs -------------------------------------------------- */ @@ -893,4 +900,9 @@ form.well { width: 1168px; /* 2px less to account for left/right borders being removed when in fixed mode */ } + .bs-docs-grid { + width: 1170px; + margin-left: -195px; + } + } diff --git a/docs/scaffolding.html b/docs/scaffolding.html index 8ff977b736..78cb0ba1ba 100644 --- a/docs/scaffolding.html +++ b/docs/scaffolding.html @@ -102,33 +102,29 @@
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.
+ +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.
<!DOCTYPE html> <html lang="en"> ... </html>-
Within the scaffolding.less file, we set basic global display, typography, and link styles. Specifically, we:
-background-color: white;
on the body
@baseFontFamily
, @baseFontSize
, and @baseLineHeight
attributes as our typographyic base@linkColor
and apply link underlines only on :hover
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.
-The new reset can still be found in reset.less, but with many elements removed for brevity and accuracy.
-Within the scaffolding.less file, we set basic global display, typography, and link styles. Specifically, we:
+background-color: white;
on the body
@baseFontFamily
, @baseFontSize
, and @baseLineHeight
attributes as our typographyic base@linkColor
and apply link underlines only on :hover
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.
+The new reset can still be found in reset.less, but with many elements removed for brevity and accuracy.
+ @@ -141,36 +137,39 @@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.
@@ -191,17 +190,19 @@<div class="row"> <div class="span4">...</div> @@ -257,76 +258,69 @@
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.
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.
<div class="row-fluid"> <div class="span4">...</div> <div class="span8">...</div> </div>-
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 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.
+<div class="row-fluid"> <div class="span12"> @@ -338,8 +332,6 @@ </div> </div>-
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.
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.
-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.
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.
@@ -403,13 +390,11 @@The default and simple 940px-wide, centered layout for just about any website or page provided by a single <div class="container">
.
The default and simple 940px-wide, centered layout for just about any website or page provided by a single <div class="container">
.
<body> <div class="container"> @@ -417,14 +402,13 @@ </div> </body>-
<div class="container-fluid">
gives flexible page structure, min- and max-widths, and a left-hand sidebar. It's great for apps and docs.
<div class="container-fluid">
gives flexible page structure, min- and max-widths, and a left-hand sidebar. It's great for apps and docs.
<div class="container-fluid"> <div class="row-fluid"> @@ -437,8 +421,6 @@ </div> </div>-
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
.
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.
-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:
-Label | -Layout width | -Column width | -Gutter width | -
---|---|---|---|
Smartphones | -480px and below | -Fluid columns, no fixed widths | -|
Smartphones to tablets | -767px and below | -Fluid columns, no fixed widths | -|
Portrait tablets | -768px and above | -42px | -20px | -
Default | -980px and up | -60px | -20px | -
Large display | -1200px and up | -70px | -30px | -
To ensure devices display responsive pages properly, include the viewport meta tag.
-<meta name="viewport" content="width=device-width, initial-scale=1.0">-
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
.
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.
+ +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:
+Label | +Layout width | +Column width | +Gutter width | +
---|---|---|---|
Smartphones | +480px and below | +Fluid columns, no fixed widths | +|
Smartphones to tablets | +767px and below | +Fluid columns, no fixed widths | +|
Portrait tablets | +768px and above | +42px | +20px | +
Default | +980px and up | +60px | +20px | +
Large display | +1200px and up | +70px | +30px | +
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.
-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) { ... } @@ -541,95 +517,85 @@ /* 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
.
Class | -Phones 480px and below | -Tablets 767px and below | -Desktops 768px and above | -
---|---|---|---|
.visible-phone |
- Visible | -Hidden | -Hidden | -
.visible-tablet |
- Hidden | -Visible | -Hidden | -
.visible-desktop |
- Hidden | -Hidden | -Visible | -
.hidden-phone |
- Hidden | -Visible | -Visible | -
.hidden-tablet |
- Visible | -Hidden | -Visible | -
.hidden-desktop |
- Visible | -Visible | -Hidden | -
Resize your browser or load on different devices to test the above classes.
-Green checkmarks indicate that class is visible in your current viewport.
-Here, green checkmarks indicate that class is hidden in your current viewport.
- -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
.
Class | +Phones 480px and below | +Tablets 767px and below | +Desktops 768px and above | +
---|---|---|---|
.visible-phone |
+ Visible | +Hidden | +Hidden | +
.visible-tablet |
+ Hidden | +Visible | +Hidden | +
.visible-desktop |
+ Hidden | +Hidden | +Visible | +
.hidden-phone |
+ Hidden | +Visible | +Visible | +
.hidden-tablet |
+ Visible | +Hidden | +Visible | +
.hidden-desktop |
+ Visible | +Visible | +Hidden | +
Resize your browser or load on different devices to test the above classes.
+Green checkmarks indicate that class is visible in your current viewport.
+Here, green checkmarks indicate that class is hidden in your current viewport.
+ -{{_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 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}}
<!DOCTYPE html> <html lang="en"> ... </html>-
{{_i}}Within the scaffolding.less file, we set basic global display, typography, and link styles. Specifically, we:{{/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}}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}}Within the scaffolding.less file, we set basic global display, typography, and link styles. Specifically, we:{{/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}}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}}
+ @@ -63,36 +59,39 @@{{_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}}
@@ -113,17 +112,19 @@<div class="row"> <div class="span4">...</div> @@ -179,76 +180,69 @@
{{_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}}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}}
<div class="row-fluid"> <div class="span4">...</div> <div class="span8">...</div> </div>-
{{_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 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}}
+<div class="row-fluid"> <div class="span12"> @@ -260,8 +254,6 @@ </div> </div>-
{{_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}}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}}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}}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}}
@@ -325,13 +312,11 @@{{_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}}The default and simple 940px-wide, centered layout for just about any website or page provided by a single <div class="container">
.{{/i}}
<body> <div class="container"> @@ -339,14 +324,13 @@ </div> </body>-
{{_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}}<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}}
<div class="container-fluid"> <div class="row-fluid"> @@ -359,8 +343,6 @@ </div> </div>-
{{_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}}
-{{_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}}Label{{/i}} | -{{_i}}Layout width{{/i}} | -{{_i}}Column width{{/i}} | -{{_i}}Gutter width{{/i}} | -
---|---|---|---|
{{_i}}Smartphones{{/i}} | -480px and below | -{{_i}}Fluid columns, no fixed widths{{/i}} | -|
{{_i}}Smartphones to tablets{{/i}} | -767px and below | -{{_i}}Fluid columns, no fixed widths{{/i}} | -|
{{_i}}Portrait tablets{{/i}} | -768px and above | -42px | -20px | -
{{_i}}Default{{/i}} | -980px and up | -60px | -20px | -
{{_i}}Large display{{/i}} | -1200px and up | -70px | -30px | -
{{_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}}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}}
+ +{{_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}}Label{{/i}} | +{{_i}}Layout width{{/i}} | +{{_i}}Column width{{/i}} | +{{_i}}Gutter width{{/i}} | +
---|---|---|---|
{{_i}}Smartphones{{/i}} | +480px and below | +{{_i}}Fluid columns, no fixed widths{{/i}} | +|
{{_i}}Smartphones to tablets{{/i}} | +767px and below | +{{_i}}Fluid columns, no fixed widths{{/i}} | +|
{{_i}}Portrait tablets{{/i}} | +768px and above | +42px | +20px | +
{{_i}}Default{{/i}} | +980px and up | +60px | +20px | +
{{_i}}Large display{{/i}} | +1200px and up | +70px | +30px | +
{{_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}}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) { ... } @@ -463,93 +439,83 @@ /* {{_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}}Class{{/i}} | -{{_i}}Phones 480px and below{{/i}} | -{{_i}}Tablets 767px and below{{/i}} | -{{_i}}Desktops 768px and above{{/i}} | -
---|---|---|---|
.visible-phone |
- {{_i}}Visible{{/i}} | -{{_i}}Hidden{{/i}} | -{{_i}}Hidden{{/i}} | -
.visible-tablet |
- {{_i}}Hidden{{/i}} | -{{_i}}Visible{{/i}} | -{{_i}}Hidden{{/i}} | -
.visible-desktop |
- {{_i}}Hidden{{/i}} | -{{_i}}Hidden{{/i}} | -{{_i}}Visible{{/i}} | -
.hidden-phone |
- {{_i}}Hidden{{/i}} | -{{_i}}Visible{{/i}} | -{{_i}}Visible{{/i}} | -
.hidden-tablet |
- {{_i}}Visible{{/i}} | -{{_i}}Hidden{{/i}} | -{{_i}}Visible{{/i}} | -
.hidden-desktop |
- {{_i}}Visible{{/i}} | -{{_i}}Visible{{/i}} | -{{_i}}Hidden{{/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}}
-{{_i}}Here, green checkmarks indicate that class is hidden in your current viewport.{{/i}}
- -{{_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}}Class{{/i}} | +{{_i}}Phones 480px and below{{/i}} | +{{_i}}Tablets 767px and below{{/i}} | +{{_i}}Desktops 768px and above{{/i}} | +
---|---|---|---|
.visible-phone |
+ {{_i}}Visible{{/i}} | +{{_i}}Hidden{{/i}} | +{{_i}}Hidden{{/i}} | +
.visible-tablet |
+ {{_i}}Hidden{{/i}} | +{{_i}}Visible{{/i}} | +{{_i}}Hidden{{/i}} | +
.visible-desktop |
+ {{_i}}Hidden{{/i}} | +{{_i}}Hidden{{/i}} | +{{_i}}Visible{{/i}} | +
.hidden-phone |
+ {{_i}}Hidden{{/i}} | +{{_i}}Visible{{/i}} | +{{_i}}Visible{{/i}} | +
.hidden-tablet |
+ {{_i}}Visible{{/i}} | +{{_i}}Hidden{{/i}} | +{{_i}}Visible{{/i}} | +
.hidden-desktop |
+ {{_i}}Visible{{/i}} | +{{_i}}Visible{{/i}} | +{{_i}}Hidden{{/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}}
+{{_i}}Here, green checkmarks indicate that class is hidden in your current viewport.{{/i}}
+ -