diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip index 9764009092..e51e753062 100644 Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ diff --git a/docs/assets/css/bootstrap-responsive.css b/docs/assets/css/bootstrap-responsive.css index 9dd71c62d5..90f63b6226 100644 --- a/docs/assets/css/bootstrap-responsive.css +++ b/docs/assets/css/bootstrap-responsive.css @@ -21,6 +21,52 @@ display: none; visibility: hidden; } +.visible-phone { + display: none; +} +.visible-tablet { + display: none; +} +.visible-desktop { + display: block; +} +.hidden-phone { + display: block; +} +.hidden-tablet { + display: block; +} +.hidden-desktop { + display: none; +} +@media (max-width: 767px) { + .visible-phone { + display: block; + } + .hidden-phone { + display: none; + } + .hidden-desktop { + display: block; + } + .visible-desktop { + display: none; + } +} +@media (min-width: 768px) and (max-width: 979px) { + .visible-tablet { + display: block; + } + .hidden-tablet { + display: none; + } + .hidden-desktop { + display: block; + } + .visible-desktop { + display: none; + } +} @media (max-width: 480px) { .nav-collapse { -webkit-transform: translate3d(0, 0, 0); diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index f5d63f90dc..36da6853ce 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -557,6 +557,70 @@ form.well { background-color: #fff; } +/* Responsive table +------------------------- */ +.responsive-utilities th small { + display: block; + font-weight: normal; + color: #999; +} +.responsive-utilities tbody th { + font-weight: normal; +} +.responsive-utilities td { + text-align: center; +} +.responsive-utilities td.is-visible { + color: #468847; + background-color: #dff0d8 !important; +} +.responsive-utilities td.is-hidden { + color: #ccc; + background-color: #f9f9f9 !important; +} + +/* Responsive tests +------------------------- */ +.responsive-utilities-test { + margin-top: 5px; + margin-left: 0; + list-style: none; + overflow: hidden; /* clear floats */ +} +.responsive-utilities-test li { + position: relative; + float: left; + width: 25%; + height: 43px; + font-size: 14px; + font-weight: bold; + line-height: 43px; + color: #999; + text-align: center; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.responsive-utilities-test li + li { + margin-left: 10px; +} +.responsive-utilities-test span { + position: absolute; + top: -1px; + left: -1px; + right: -1px; + bottom: -1px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.responsive-utilities-test span { + color: #468847; + background-color: #dff0d8; + border: 1px solid #d6e9c6; +} + /* Responsive Docs -------------------------------------------------- */ diff --git a/docs/scaffolding.html b/docs/scaffolding.html index 97d2bf4c5d..a35012e9c8 100644 --- a/docs/scaffolding.html +++ b/docs/scaffolding.html @@ -173,7 +173,7 @@
The default grid system provided as part of Bootstrap is a 940px-wide, 12-column grid.
It also has four responsive variations for various devices and resolutions: phone, tablet portrait, table landscape and small desktops, and large widescreen desktops.
-<div class="row"> @@ -181,11 +181,11 @@ <div class="span8">...</div> </div>-
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.
-<div class="row"> @@ -242,8 +242,8 @@ </div> </div>-
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.
@@ -304,8 +304,8 @@ <div class="span8">...</div> </div>-
<div class="row-fluid"> @@ -337,8 +337,8 @@ </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.
-<div class="container-fluid">
gives flexible page structure, min- and max-widths, and a left-hand sidebar. It's great for apps and docs.
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:
@@ -506,23 +514,15 @@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
.
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) { ... } @@ -545,8 +545,93 @@ // Large desktop @media (min-width: 1200px) { .. }-
For faster mobile-friendly development, use these basic utility classes for showing and hidding 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 clases.
+{{_i}}The default grid system provided as part of Bootstrap is a 940px-wide, 12-column grid.{{/i}}
{{_i}}It also has four responsive variations for various devices and resolutions: phone, tablet portrait, table landscape and small desktops, and large widescreen desktops.{{/i}}
-<div class="row"> @@ -105,11 +105,11 @@ <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}}
-<div class="row"> @@ -166,8 +166,8 @@ </div> </div>-
{{_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}}
@@ -228,8 +228,8 @@ <div class="span8">...</div> </div>-
<div class="row-fluid"> @@ -261,8 +261,8 @@ </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}}<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}}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}}
@@ -430,23 +438,15 @@{{_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}}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) { ... } @@ -469,6 +469,91 @@ // {{_i}}Large desktop{{/i}} @media (min-width: 1200px) { .. }-
{{_i}}For faster mobile-friendly development, use these basic utility classes for showing and hidding 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 clases.{{/i}}
+