Commit 27cf3d67 authored by Pierre-Denis Vanduynslager's avatar Pierre-Denis Vanduynslager
Browse files

Merge remote-tracking branch 'twbs/v4-dev' into v4-dev

parents f0c0a753 8e4f3fe7
Showing with 92 additions and 155 deletions
+92 -155
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js" integrity="sha384-mXQoED/lFIuocc//nss8aJOIrz7X7XruhR6bO+sGceiSyMELoVdZkN7F0oYwcFH+" crossorigin="anonymous"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js" integrity="sha384-THPy051/pYDQGanwU6poAc/hOdQxjnOEXzbT+OuUAFqNqFjL+4IGLBgCJC3ZOShY" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script> <script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/js/tether.min.js" integrity="sha384-Plbmg8JY28KFelvJVai01l8WyZzrYWG825m+cZ0eDDS1f7d/js6ikvy1+X+guPIB" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/js/tether.min.js" integrity="sha384-Plbmg8JY28KFelvJVai01l8WyZzrYWG825m+cZ0eDDS1f7d/js6ikvy1+X+guPIB" crossorigin="anonymous"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js" integrity="sha384-mXQoED/lFIuocc//nss8aJOIrz7X7XruhR6bO+sGceiSyMELoVdZkN7F0oYwcFH+" crossorigin="anonymous"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js" integrity="sha384-THPy051/pYDQGanwU6poAc/hOdQxjnOEXzbT+OuUAFqNqFjL+4IGLBgCJC3ZOShY" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script> <script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/js/tether.min.js" integrity="sha384-Plbmg8JY28KFelvJVai01l8WyZzrYWG825m+cZ0eDDS1f7d/js6ikvy1+X+guPIB" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/js/tether.min.js" integrity="sha384-Plbmg8JY28KFelvJVai01l8WyZzrYWG825m+cZ0eDDS1f7d/js6ikvy1+X+guPIB" crossorigin="anonymous"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js" integrity="sha384-mXQoED/lFIuocc//nss8aJOIrz7X7XruhR6bO+sGceiSyMELoVdZkN7F0oYwcFH+" crossorigin="anonymous"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js" integrity="sha384-THPy051/pYDQGanwU6poAc/hOdQxjnOEXzbT+OuUAFqNqFjL+4IGLBgCJC3ZOShY" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script> <script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/js/tether.min.js" integrity="sha384-Plbmg8JY28KFelvJVai01l8WyZzrYWG825m+cZ0eDDS1f7d/js6ikvy1+X+guPIB" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/js/tether.min.js" integrity="sha384-Plbmg8JY28KFelvJVai01l8WyZzrYWG825m+cZ0eDDS1f7d/js6ikvy1+X+guPIB" crossorigin="anonymous"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js" integrity="sha384-mXQoED/lFIuocc//nss8aJOIrz7X7XruhR6bO+sGceiSyMELoVdZkN7F0oYwcFH+" crossorigin="anonymous"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js" integrity="sha384-THPy051/pYDQGanwU6poAc/hOdQxjnOEXzbT+OuUAFqNqFjL+4IGLBgCJC3ZOShY" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script> <script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/js/tether.min.js" integrity="sha384-Plbmg8JY28KFelvJVai01l8WyZzrYWG825m+cZ0eDDS1f7d/js6ikvy1+X+guPIB" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/js/tether.min.js" integrity="sha384-Plbmg8JY28KFelvJVai01l8WyZzrYWG825m+cZ0eDDS1f7d/js6ikvy1+X+guPIB" crossorigin="anonymous"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<div class="m-t-1"> <div class="m-t-1">
<h1>Sticky footer with fixed navbar</h1> <h1>Sticky footer with fixed navbar</h1>
</div> </div>
<p class="lead">Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added with <code>padding-top: 60px;</code> on the <code>body > .container</code>.</p> <p class="lead">Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added with <code>padding-top: 60px;</code> on the <code>body &gt; .container</code>.</p>
<p>Back to <a href="../sticky-footer">the default sticky footer</a> minus the navbar.</p> <p>Back to <a href="../sticky-footer">the default sticky footer</a> minus the navbar.</p>
</div> </div>
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js" integrity="sha384-mXQoED/lFIuocc//nss8aJOIrz7X7XruhR6bO+sGceiSyMELoVdZkN7F0oYwcFH+" crossorigin="anonymous"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js" integrity="sha384-THPy051/pYDQGanwU6poAc/hOdQxjnOEXzbT+OuUAFqNqFjL+4IGLBgCJC3ZOShY" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script> <script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/js/tether.min.js" integrity="sha384-Plbmg8JY28KFelvJVai01l8WyZzrYWG825m+cZ0eDDS1f7d/js6ikvy1+X+guPIB" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/js/tether.min.js" integrity="sha384-Plbmg8JY28KFelvJVai01l8WyZzrYWG825m+cZ0eDDS1f7d/js6ikvy1+X+guPIB" crossorigin="anonymous"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js" integrity="sha384-mXQoED/lFIuocc//nss8aJOIrz7X7XruhR6bO+sGceiSyMELoVdZkN7F0oYwcFH+" crossorigin="anonymous"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js" integrity="sha384-THPy051/pYDQGanwU6poAc/hOdQxjnOEXzbT+OuUAFqNqFjL+4IGLBgCJC3ZOShY" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script> <script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/js/tether.min.js" integrity="sha384-Plbmg8JY28KFelvJVai01l8WyZzrYWG825m+cZ0eDDS1f7d/js6ikvy1+X+guPIB" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/js/tether.min.js" integrity="sha384-Plbmg8JY28KFelvJVai01l8WyZzrYWG825m+cZ0eDDS1f7d/js6ikvy1+X+guPIB" crossorigin="anonymous"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
......
...@@ -22,10 +22,10 @@ In addition, groups and toolbars should be given an explicit label, as most assi ...@@ -22,10 +22,10 @@ In addition, groups and toolbars should be given an explicit label, as most assi
## Skip navigation ## Skip navigation
If your navigation contains many links and comes before the main content in the DOM, add a `Skip to main content` link before the navigation (for a simple explanation, see this [A11Y Project article on skip navigation links](http://a11yproject.com/posts/skip-nav-links/)). Using the `.sr-only` class will visually hide the skip link, and the <code>.sr-only-focusable</code> class will ensure that the link becomes visible once focused (for sighted keyboard users). If your navigation contains many links and comes before the main content in the DOM, add a `Skip to main content` link before the navigation (for a simple explanation, see this [A11Y Project article on skip navigation links](http://a11yproject.com/posts/skip-nav-links)). Using the `.sr-only` class will visually hide the skip link, and the <code>.sr-only-focusable</code> class will ensure that the link becomes visible once focused (for sighted keyboard users).
{% callout danger %} {% callout danger %}
Due to long-standing shortcomings/bugs in Chrome (see [issue 454172 in the Chromium bug tracker](https://code.google.com/p/chromium/issues/detail?id=454172 "Chromium bug tracker - Issue 454172: Focus Link Target (sequential focus navigation starting point)")) and Internet Explorer (see this article on [in-page links and focus order](http://accessibleculture.org/articles/2010/05/in-page-links/)), you will need to make sure that the target of your skip link is at least programmatically focusable by adding `tabindex="-1"`. Due to long-standing shortcomings/bugs in Internet Explorer (see this article on [in-page links and focus order](http://accessibleculture.org/articles/2010/05/in-page-links/)), you will need to make sure that the target of your skip link is at least programmatically focusable by adding `tabindex="-1"`.
In addition, you may want to explicitly suppress a visible focus indication on the target (particularly as Chrome currently also sets focus on elements with `tabindex="-1"` when they are clicked with the mouse) with `#content:focus { outline: none; }`. In addition, you may want to explicitly suppress a visible focus indication on the target (particularly as Chrome currently also sets focus on elements with `tabindex="-1"` when they are clicked with the mouse) with `#content:focus { outline: none; }`.
......
...@@ -219,13 +219,7 @@ Bootstrap includes a workaround for this, although it is disabled by default. By ...@@ -219,13 +219,7 @@ Bootstrap includes a workaround for this, although it is disabled by default. By
Even in some modern browsers, printing can be quirky. Even in some modern browsers, printing can be quirky.
In particular, as of Chrome v32 and regardless of margin settings, Chrome uses a viewport width significantly narrower than the physical paper size when resolving media queries while printing a webpage. This can result in Bootstrap's extra-small grid being unexpectedly activated when printing. See [issue #12078](https://github.com/twbs/bootstrap/issues/12078) and [Chrome bug #273306](https://bugs.chromium.org/p/chromium/issues/detail?id=273306) for some details. Suggested workarounds: As of Safari v8.0, use of the fixed-width `.container` class can cause Safari to use an unusually small font size when printing. See [issue #14868](https://github.com/twbs/bootstrap/issues/14868) and [WebKit bug #138192](https://bugs.webkit.org/show_bug.cgi?id=138192) for more details. One potential workaround is the following CSS:
* Embrace the extra-small grid and make sure your page looks acceptable under it.
* Customize the value of the `$grid-breakpoints` Sass variable so that your printer paper is considered larger than extra-small.
* Add custom media queries to change the grid size breakpoints for print media only.
Also, as of Safari v8.0, use of the fixed-width `.container` class can cause Safari to use an unusually small font size when printing. See [issue #14868](https://github.com/twbs/bootstrap/issues/14868) and [WebKit bug #138192](https://bugs.webkit.org/show_bug.cgi?id=138192) for more details. One potential workaround is the following CSS:
{% highlight css %} {% highlight css %}
@media print { @media print {
......
...@@ -46,7 +46,7 @@ For example, run `TWBS_SASS=sass grunt` to test and build Bootstrap with Ruby Sa ...@@ -46,7 +46,7 @@ For example, run `TWBS_SASS=sass grunt` to test and build Bootstrap with Ruby Sa
Bootstrap uses [Autoprefixer][autoprefixer] (included in our Gruntfile and build process) to automatically add vendor prefixes to some CSS properties at build time. Doing so saves us time and code by allowing us to write key parts of our CSS a single time while eliminating the need for vendor mixins like those found in v3. Bootstrap uses [Autoprefixer][autoprefixer] (included in our Gruntfile and build process) to automatically add vendor prefixes to some CSS properties at build time. Doing so saves us time and code by allowing us to write key parts of our CSS a single time while eliminating the need for vendor mixins like those found in v3.
We maintain the list of browsers supported through Autoprefixer in a separate file within our GitHub repository. See [`/grunt/autoprefixer-settings.json`](https://github.com/twbs/bootstrap/blob/master/grunt/autoprefixer-settings.js) for details. We maintain the list of browsers supported through Autoprefixer in a separate file within our GitHub repository. See [`/grunt/postcss.js`](https://github.com/twbs/bootstrap/blob/master/grunt/postcss.js) for details.
## Local documentation ## Local documentation
......
...@@ -6,31 +6,14 @@ group: getting-started ...@@ -6,31 +6,14 @@ group: getting-started
**Bootstrap v{{ site.current_version}}** is available for download in several ways, including some of your favorite package managers. Choose from the options below to snag just what you need. **Bootstrap v{{ site.current_version}}** is available for download in several ways, including some of your favorite package managers. Choose from the options below to snag just what you need.
<div class="row m-t-2">
<div class="col-sm-6">
{% markdown %}
### Compiled
Download just the compiled and minified CSS and JavaScript. Doesn't include any documentation or original source files.
{% comment %}
<a href="{{ site.download.dist }}" class="btn btn-bs btn-outline" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download compiled');">Download Bootstrap</a>
{% endcomment %}
<span class="text-muted">Coming soon!</span>
{% endmarkdown %}
</div>
<div class="col-sm-6">
{% markdown %}
### Source files ### Source files
Download everything: source Sass, JavaScript, and documentation files. **Requires a Sass compiler, [Autoprefixer](https://github.com/postcss/autoprefixer), and [some setup]({{ site.baseurl }}/getting-started/build-tools/#tooling-setup).** Download everything: source Sass, JavaScript, and documentation files. **Requires a Sass compiler, [Autoprefixer](https://github.com/postcss/autoprefixer), [postcss-flexbugs-fixes](https://github.com/luisrudge/postcss-flexbugs-fixes), and [some setup]({{ site.baseurl }}/getting-started/build-tools/#tooling-setup).**
<a href="{{ site.download.source }}" class="btn btn-bs btn-outline" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download source');">Download source</a> <a href="{{ site.download.source }}" class="btn btn-bs btn-outline" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download source');">Download source</a>
{% endmarkdown %}
</div>
</div>
## Package managers ## Package managers
Pull in Bootstrap's **source files** into nearly any project with some of the most popular package managers. No matter the package manager, Bootstrap will **require a Sass compiler and [Autoprefixer](https://github.com/postcss/autoprefixer)** for a setup that matches our official compiled versions. Pull in Bootstrap's **source files** into nearly any project with some of the most popular package managers. No matter the package manager, Bootstrap will **require a Sass compiler, [Autoprefixer](https://github.com/postcss/autoprefixer), and [postcss-flexbugs-fixes](https://github.com/luisrudge/postcss-flexbugs-fixes)** for a setup that matches our official compiled versions.
{% callout warning %} {% callout warning %}
**Heads up!** Not all package managers have the v4 alpha published yet, but we should have them up shortly! **Heads up!** Not all package managers have the v4 alpha published yet, but we should have them up shortly!
...@@ -78,7 +61,7 @@ $ meteor add twbs:bootstrap@={{ site.current_version }} ...@@ -78,7 +61,7 @@ $ meteor add twbs:bootstrap@={{ site.current_version }}
You can also install and manage Bootstrap's Sass and JavaScript using [Composer](https://getcomposer.org): You can also install and manage Bootstrap's Sass and JavaScript using [Composer](https://getcomposer.org):
{% highlight bash %} {% highlight bash %}
$ composer require twbs/bootstrap $ composer require twbs/bootstrap:{{ site.current_version }}
{% endhighlight %} {% endhighlight %}
### Bower ### Bower
...@@ -100,6 +83,7 @@ PM> Install-Package bootstrap.sass -Pre ...@@ -100,6 +83,7 @@ PM> Install-Package bootstrap.sass -Pre
The `-Pre` is required until Bootstrap v4 has a stable release. The `-Pre` is required until Bootstrap v4 has a stable release.
{% comment %}
## Custom builds ## Custom builds
Need only a part of Bootstrap's CSS or JS? Use one of the custom builds to snag just what you need. Need only a part of Bootstrap's CSS or JS? Use one of the custom builds to snag just what you need.
...@@ -121,4 +105,4 @@ Need only a part of Bootstrap's CSS or JS? Use one of the custom builds to snag ...@@ -121,4 +105,4 @@ Need only a part of Bootstrap's CSS or JS? Use one of the custom builds to snag
<a class="btn btn-bs btn-outline" href="#">Download</a> <a class="btn btn-bs btn-outline" href="#">Download</a>
</div> </div>
</div> </div>
{% endcomment %}
...@@ -19,7 +19,7 @@ Flexbox support is available for a number of Bootstrap's components: ...@@ -19,7 +19,7 @@ Flexbox support is available for a number of Bootstrap's components:
- Input groups, which move from `display: table;` to `display: flex;`. - Input groups, which move from `display: table;` to `display: flex;`.
- The media component moves from `display: table;` and a number of hacky styles to a simple `display: flex;`. - The media component moves from `display: table;` and a number of hacky styles to a simple `display: flex;`.
Vendor prefixes are provided in our compiled CSS with Autoprefixer via Grunt. Vendor prefixes are provided in our compiled CSS with [Autoprefixer](https://github.com/postcss/autoprefixer) via Grunt. Some bugs in IE10-11's Flexbox implementation are worked around via [postcss-flexbugs-fixes](https://github.com/luisrudge/postcss-flexbugs-fixes).
## Why flexbox? ## Why flexbox?
......
...@@ -37,4 +37,4 @@ You can find and customize these variables for key global options in our `_varia ...@@ -37,4 +37,4 @@ You can find and customize these variables for key global options in our `_varia
| `$enable-gradients` | `true` or `false` (default) | Enables predefined gradients via `background-image` styles on various components. | | `$enable-gradients` | `true` or `false` (default) | Enables predefined gradients via `background-image` styles on various components. |
| `$enable-transitions` | `true` (default) or `false` | Enables predefined `transition`s on various components. | | `$enable-transitions` | `true` (default) or `false` | Enables predefined `transition`s on various components. |
| `$enable-hover-media-query` | `true` or `false` (default) | ... | | `$enable-hover-media-query` | `true` or `false` (default) | ... |
| `$enable-grid-classes` | `true` (default) or `false` | Enables the generation of CSS classes for the grid system (e.g. `.col-md-1` etc.). | | `$enable-grid-classes` | `true` (default) or `false` | Enables the generation of CSS classes for the grid system (e.g., `.container`, `.row`, `.col-md-1`, etc.). |
...@@ -9,7 +9,7 @@ Fancy a more modern grid system? [Enable flexbox support in Bootstrap](/getting- ...@@ -9,7 +9,7 @@ Fancy a more modern grid system? [Enable flexbox support in Bootstrap](/getting-
Bootstrap's flexbox grid includes support for every feature from our [default grid system](/layout/grid), and then some. Please read the [default grid system docs](/layout/grid) before proceeding through this page. Features that are covered there are only summarized here. Please note that **Internet Explorer 9 does not support flexbox**, so proceed with caution when enabling it. Bootstrap's flexbox grid includes support for every feature from our [default grid system](/layout/grid), and then some. Please read the [default grid system docs](/layout/grid) before proceeding through this page. Features that are covered there are only summarized here. Please note that **Internet Explorer 9 does not support flexbox**, so proceed with caution when enabling it.
{% callout warning %} {% callout warning %}
**Heads up!** The flexbox grid documentation is only functional when flexbox support is explicitly enabled. **Heads up!** This flexbox grid documentation is powered by an additional CSS file that overrides our default grid system's CSS. This is only available in our hosted docs and is disabled in development.
{% endcallout %} {% endcallout %}
## Contents ## Contents
......
...@@ -139,7 +139,7 @@ Variables and maps determine the number of columns, the gutter width, and the me ...@@ -139,7 +139,7 @@ Variables and maps determine the number of columns, the gutter width, and the me
{% highlight scss %} {% highlight scss %}
$grid-columns: 12; $grid-columns: 12;
$grid-gutter-width: 15px; $grid-gutter-width: 30px;
$grid-breakpoints: ( $grid-breakpoints: (
// Extra small screen / phone // Extra small screen / phone
...@@ -180,20 +180,21 @@ Mixins are used in conjunction with the grid variables to generate semantic CSS ...@@ -180,20 +180,21 @@ Mixins are used in conjunction with the grid variables to generate semantic CSS
} }
// Make the element grid-ready (applying everything but the width) // Make the element grid-ready (applying everything but the width)
@mixin make-col($gutter: $grid-gutter-width) { @mixin make-col-ready($size, $columns: $grid-columns, $gutter: $grid-gutter-width) {
position: relative; position: relative;
min-height: 1px; // Prevent collapsing
padding-right: ($gutter / 2);
padding-left: ($gutter / 2);
// Prevent columns from becoming too narrow when at smaller grid tiers by
// always setting `width: 100%;`. This works because we use `flex` values
// later on to override this initial width.
@if $enable-flex { @if $enable-flex {
flex: 1; width: 100%;
} @else {
float: left;
} }
min-height: 1px;
padding-left: ($gutter / 2);
padding-right: ($gutter / 2);
} }
@mixin make-col-span($size, $columns: $grid-columns) { @mixin make-col($size, $columns: $grid-columns, $gutter: $grid-gutter-width) {
// Set a width (to be used in or out of media queries)
@if $enable-flex { @if $enable-flex {
flex: 0 0 percentage($size / $columns); flex: 0 0 percentage($size / $columns);
// Add a `max-width` to ensure content within each column does not blow out // Add a `max-width` to ensure content within each column does not blow out
...@@ -201,6 +202,7 @@ Mixins are used in conjunction with the grid variables to generate semantic CSS ...@@ -201,6 +202,7 @@ Mixins are used in conjunction with the grid variables to generate semantic CSS
// do not appear to require this. // do not appear to require this.
max-width: percentage($size / $columns); max-width: percentage($size / $columns);
} @else { } @else {
float: left;
width: percentage($size / $columns); width: percentage($size / $columns);
} }
} }
...@@ -232,23 +234,23 @@ See it in action in <a href="http://jsbin.com/ruxona/edit">this rendered example ...@@ -232,23 +234,23 @@ See it in action in <a href="http://jsbin.com/ruxona/edit">this rendered example
@include make-row(); @include make-row();
} }
.content-main { .content-main {
@include make-col(); @include make-col-ready();
@media (max-width: 32em) { @media (max-width: 32em) {
@include make-col-span(6); @include make-col(6);
} }
@media (min-width: 32.1em) { @media (min-width: 32.1em) {
@include make-col-span(8); @include make-col(8);
} }
} }
.content-secondary { .content-secondary {
@include make-col(); @include make-col-ready();
@media (max-width: 32em) { @media (max-width: 32em) {
@include make-col-span(6); @include make-col(6);
} }
@media (min-width: 32.1em) { @media (min-width: 32.1em) {
@include make-col-span(4); @include make-col(4);
} }
} }
{% endhighlight %} {% endhighlight %}
...@@ -268,36 +270,36 @@ In addition to our semantic mixins, Bootstrap includes an extensive set of prebu ...@@ -268,36 +270,36 @@ In addition to our semantic mixins, Bootstrap includes an extensive set of prebu
### Example: Stacked-to-horizontal ### Example: Stacked-to-horizontal
Using a single set of `.col-md-*` grid classes, you can create a basic grid system that starts out stacked on mobile devices and tablet devices (the extra small to small range) before becoming horizontal on desktop (medium) devices. Place grid columns with the `.col` base class and a modifier within any `.row`. Using a single set of `.col-md-*` grid classes, you can create a basic grid system that starts out stacked on mobile devices and tablet devices (the extra small to small range) before becoming horizontal on desktop (medium) devices. Place grid columns within any `.row`.
<div class="bd-example-row"> <div class="bd-example-row">
{% example html %} {% example html %}
<div class="row"> <div class="row">
<div class="col-md-1">md-1</div> <div class="col-md-1">col-md-1</div>
<div class="col-md-1">md-1</div> <div class="col-md-1">col-md-1</div>
<div class="col-md-1">md-1</div> <div class="col-md-1">col-md-1</div>
<div class="col-md-1">md-1</div> <div class="col-md-1">col-md-1</div>
<div class="col-md-1">md-1</div> <div class="col-md-1">col-md-1</div>
<div class="col-md-1">md-1</div> <div class="col-md-1">col-md-1</div>
<div class="col-md-1">md-1</div> <div class="col-md-1">col-md-1</div>
<div class="col-md-1">md-1</div> <div class="col-md-1">col-md-1</div>
<div class="col-md-1">md-1</div> <div class="col-md-1">col-md-1</div>
<div class="col-md-1">md-1</div> <div class="col-md-1">col-md-1</div>
<div class="col-md-1">md-1</div> <div class="col-md-1">col-md-1</div>
<div class="col-md-1">md-1</div> <div class="col-md-1">col-md-1</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-8">md-8</div> <div class="col-md-8">col-md-8</div>
<div class="col-md-4">md-4</div> <div class="col-md-4">col-md-4</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-4">md-4</div> <div class="col-md-4">col-md-4</div>
<div class="col-md-4">md-4</div> <div class="col-md-4">col-md-4</div>
<div class="col-md-4">md-4</div> <div class="col-md-4">col-md-4</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6">md-6</div> <div class="col-md-6">col-md-6</div>
<div class="col-md-6">md-6</div> <div class="col-md-6">col-md-6</div>
</div> </div>
{% endexample %} {% endexample %}
</div> </div>
...@@ -442,7 +444,7 @@ To nest your content with the default grid, add a new `.row` and set of `.col-sm ...@@ -442,7 +444,7 @@ To nest your content with the default grid, add a new `.row` and set of `.col-sm
### Example: Column ordering ### Example: Column ordering
Easily change the order of our built-in grid columns with `.col-md-push-*` and `.col-md-pull-*` modifier classes. Easily change the order of our built-in grid columns with `.push-md-*` and `.pull-md-*` modifier classes.
<div class="bd-example-row"> <div class="bd-example-row">
{% example html %} {% example html %}
...@@ -457,7 +459,18 @@ Easily change the order of our built-in grid columns with `.col-md-push-*` and ` ...@@ -457,7 +459,18 @@ Easily change the order of our built-in grid columns with `.col-md-push-*` and `
Using our built-in grid Sass variables and maps, it's possible to completely customize the predefined grid classes. Change the number of tiers, the media query dimensions, and the container widths—then recompile. Using our built-in grid Sass variables and maps, it's possible to completely customize the predefined grid classes. Change the number of tiers, the media query dimensions, and the container widths—then recompile.
For example, if you wanted just three grid tiers, you'd update the `$grid-breakpoints` and `$container-max-widths` to something like this: ### Columns and gutters
The number of grid columns and their horizontal padding (aka, gutters) can be modified via Sass variables. `$grid-columns` is used to generate the widths (in percent) of each individual column while `$grid-gutter-width` is divided evenly across `padding-left` and `padding-right` for the column gutters.
{% highlight scss %}
$grid-columns: 12;
$grid-gutter-width: 30px;
{% endhighlight %}
### Grid tiers
Moving beyond the columns themselves, you may also customize the number of grid tiers. If you wanted just three grid tiers, you'd update the `$grid-breakpoints` and `$container-max-widths` to something like this:
{% highlight scss %} {% highlight scss %}
$grid-breakpoints: ( $grid-breakpoints: (
...@@ -473,4 +486,4 @@ $container-max-widths: ( ...@@ -473,4 +486,4 @@ $container-max-widths: (
); );
{% endhighlight %} {% endhighlight %}
Save your changes and recompile to have a brand new set of predefined grid classes for column widths, offsets, pushes, and pulls. Responsive visibility utilities will also be updated to use the custom breakpoints. When making any changes to the Sass variables or maps, you'll need to save your changes and recompile. Doing so will out a brand new set of predefined grid classes for column widths, offsets, pushes, and pulls. Responsive visibility utilities will also be updated to use the custom breakpoints.
...@@ -144,7 +144,7 @@ These media queries are also available via Sass mixins: ...@@ -144,7 +144,7 @@ These media queries are also available via Sass mixins:
And finally media that spans multiple breakpoint widths: And finally media that spans multiple breakpoint widths:
{% highlight scss %} {% highlight scss %}
// Example // Example
// Medium devices (tablets, 768px and up) and Large devices (desktops, 992px and up) // Medium devices (tablets, 768px and up) and Large devices (desktops, 992px and up)
@media (min-width: 768px) and (max-width: 1199px) { ... } @media (min-width: 768px) and (max-width: 1199px) { ... }
{% endhighlight %} {% endhighlight %}
......
...@@ -188,6 +188,9 @@ Green checkmarks indicate the element **is visible** in your current viewport. ...@@ -188,6 +188,9 @@ Green checkmarks indicate the element **is visible** in your current viewport.
<span class="hidden-lg-down not-visible">Large or narrower</span> <span class="hidden-lg-down not-visible">Large or narrower</span>
</div> </div>
</div> </div>
<hr>
<div class="row responsive-utilities-test visible-on"> <div class="row responsive-utilities-test visible-on">
<div class="col-xs-6 col-sm-3"> <div class="col-xs-6 col-sm-3">
<span class="hidden-xs-down visible">&#10004; Visible on small or wider</span> <span class="hidden-xs-down visible">&#10004; Visible on small or wider</span>
...@@ -206,24 +209,30 @@ Green checkmarks indicate the element **is visible** in your current viewport. ...@@ -206,24 +209,30 @@ Green checkmarks indicate the element **is visible** in your current viewport.
<span class="hidden-xl-up not-visible">Extra large</span> <span class="hidden-xl-up not-visible">Extra large</span>
</div> </div>
</div> </div>
<hr>
<div class="row responsive-utilities-test visible-on"> <div class="row responsive-utilities-test visible-on">
<div class="col-xs-6 col-sm-3"> <div class="col-xs-6 col-sm-4">
<span class="hidden-sm-up visible">&#10004; Your viewport is exactly extra small</span> <span class="hidden-sm-up visible">&#10004; Your viewport is exactly extra small</span>
<span class="hidden-xs-down not-visible">Your viewport is NOT exactly extra small</span> <span class="hidden-xs-down not-visible">Your viewport is NOT exactly extra small</span>
</div> </div>
<div class="col-xs-6 col-sm-3"> <div class="col-xs-6 col-sm-4">
<span class="hidden-xs-down hidden-md-up visible">&#10004; Your viewport is exactly small</span> <span class="hidden-xs-down hidden-md-up visible">&#10004; Your viewport is exactly small</span>
<span class="hidden-sm-only not-visible">Your viewport is NOT exactly small</span> <span class="hidden-sm-only not-visible">Your viewport is NOT exactly small</span>
</div> </div>
<div class="col-xs-6 col-sm-3"> <div class="col-xs-6 col-sm-4">
<span class="hidden-sm-down hidden-lg-up visible">&#10004; Your viewport is exactly medium</span> <span class="hidden-sm-down hidden-lg-up visible">&#10004; Your viewport is exactly medium</span>
<span class="hidden-md-only not-visible">Your viewport is NOT exactly medium</span> <span class="hidden-md-only not-visible">Your viewport is NOT exactly medium</span>
</div> </div>
<div class="col-xs-6 col-sm-3"> </div>
<div class="row responsive-utilities-test visible-on">
<div class="col-xs-6 col-sm-4">
<span class="hidden-md-down hidden-xl-up visible">&#10004; Your viewport is exactly large</span> <span class="hidden-md-down hidden-xl-up visible">&#10004; Your viewport is exactly large</span>
<span class="hidden-lg-only not-visible">Your viewport is NOT exactly large</span> <span class="hidden-lg-only not-visible">Your viewport is NOT exactly large</span>
</div> </div>
<div class="col-xs-6 col-sm-3"> <div class="col-xs-6 col-sm-4">
<span class="hidden-lg-down visible">&#10004; Your viewport is exactly extra large</span> <span class="hidden-lg-down visible">&#10004; Your viewport is exactly extra large</span>
<span class="hidden-xl-only not-visible">Your viewport is NOT exactly extra large</span> <span class="hidden-xl-only not-visible">Your viewport is NOT exactly extra large</span>
</div> </div>
......
...@@ -59,7 +59,7 @@ This list highlights key changes by component between v3.x.x and v4.0.0. ...@@ -59,7 +59,7 @@ This list highlights key changes by component between v3.x.x and v4.0.0.
### Reboot ### Reboot
New to Bootstrap 4 is the Reboot, a new stylesheet that builds on Normalize with our own somewhat opinionated reset styles. Selectors appearing in this file only use elements—there are no classes here. This isolates our reset styles from our component styles for a more modular approach. Some of the most important resets this includes are the `box-sizing: border` change, moving from `rem` to `em` units on many elements, link styles, and many form element resets. New to Bootstrap 4 is the Reboot, a new stylesheet that builds on Normalize with our own somewhat opinionated reset styles. Selectors appearing in this file only use elements—there are no classes here. This isolates our reset styles from our component styles for a more modular approach. Some of the most important resets this includes are the `box-sizing: border-box` change, moving from `em` to `rem` units on many elements, link styles, and many form element resets.
### Typography ### Typography
...@@ -67,6 +67,7 @@ New to Bootstrap 4 is the Reboot, a new stylesheet that builds on Normalize with ...@@ -67,6 +67,7 @@ New to Bootstrap 4 is the Reboot, a new stylesheet that builds on Normalize with
- Dropped `.page-header` as, aside from the border, all it's styles can be applied via utilities. - Dropped `.page-header` as, aside from the border, all it's styles can be applied via utilities.
- `.dl-horizontal` has been dropped. Instead, use `.row` on `<dl>` and use grid column classes (or mixins) on its `<dt>` and `<dd>` children. - `.dl-horizontal` has been dropped. Instead, use `.row` on `<dl>` and use grid column classes (or mixins) on its `<dt>` and `<dd>` children.
- Custom `<blockquote>` styling has moved to classes—`.blockquote` and the `.blockquote-reverse` modifier. - Custom `<blockquote>` styling has moved to classes—`.blockquote` and the `.blockquote-reverse` modifier.
- `.list-inline` now requires that its children list items have the new `.list-inline-item` class applied to them.
### Images ### Images
...@@ -126,7 +127,7 @@ New to Bootstrap 4 is the Reboot, a new stylesheet that builds on Normalize with ...@@ -126,7 +127,7 @@ New to Bootstrap 4 is the Reboot, a new stylesheet that builds on Normalize with
### Modal ### Modal
- The `remote` option (which could be used to automatically load and inject external content into a modal) and the correspending `loaded.bs.modal` event were removed. We recommend instead using client-side templating or a data binding framework, or calling [jQuery.load](http://api.jquery.com/load/) yourself. - The `remote` option (which could be used to automatically load and inject external content into a modal) and the corresponding `loaded.bs.modal` event were removed. We recommend instead using client-side templating or a data binding framework, or calling [jQuery.load](http://api.jquery.com/load/) yourself.
### Navs ### Navs
...@@ -224,11 +225,7 @@ TODO: audit classes in v3 that aren't present in v4 ...@@ -224,11 +225,7 @@ TODO: audit classes in v3 that aren't present in v4
### Responsive utilities ### Responsive utilities
The following variables have been removed in v4.0.0. Use the `media-breakpoint-up()`, `media-breakpoint-down()`, or `media-breakpoint-only()` Sass mixins or the `$grid-breakpoints` Sass map instead of: All `@screen-` variables have been removed in v4.0.0. Use the `media-breakpoint-up()`, `media-breakpoint-down()`, or `media-breakpoint-only()` Sass mixins or the `$grid-breakpoints` Sass map instead.
* `@screen-phone`, `@screen-tablet`, `@screen-desktop`, `@screen-lg-desktop`.
* `@screen-xs`, `@screen-sm`, `@screen-md`, `@screen-lg`.
* `@screen-xs-min`, `@screen-xs-max`, `@screen-sm-min`, `@screen-sm-max`, `@screen-md-min`, `@screen-md-max`, `@screen-lg-min`, `@screen-lg-max`
The responsive utility classes have also been overhauled. The responsive utility classes have also been overhauled.
......
module.exports = {
browsers: [
//
// Official browser support policy:
// http://v4-alpha.getbootstrap.com/getting-started/browsers-devices/#supported-browsers
//
'Chrome >= 35', // Exact version number here is kinda arbitrary
// Rather than using Autoprefixer's native "Firefox ESR" version specifier string,
// we deliberately hardcode the number. This is to avoid unwittingly severely breaking the previous ESR in the event that:
// (a) we happen to ship a new Bootstrap release soon after the release of a new ESR,
// such that folks haven't yet had a reasonable amount of time to upgrade; and
// (b) the new ESR has unprefixed CSS properties/values whose absence would severely break webpages
// (e.g. `box-sizing`, as opposed to `background: linear-gradient(...)`).
// Since they've been unprefixed, Autoprefixer will stop prefixing them,
// thus causing them to not work in the previous ESR (where the prefixes were required).
'Firefox >= 38', // Current Firefox Extended Support Release (ESR); https://www.mozilla.org/en-US/firefox/organizations/faq/
// Note: Edge versions in Autoprefixer & Can I Use refer to the EdgeHTML rendering engine version,
// NOT the Edge app version shown in Edge's "About" screen.
// For example, at the time of writing, Edge 20 on an up-to-date system uses EdgeHTML 12.
// See also https://github.com/Fyrd/caniuse/issues/1928
'Edge >= 12',
'Explorer >= 9',
// Out of leniency, we prefix these 1 version further back than the official policy.
'iOS >= 8',
'Safari >= 8',
// The following remain NOT officially supported, but we're lenient and include their prefixes to avoid severely breaking in them.
'Android 2.3',
'Android >= 4',
'Opera >= 12'
]
}
/*!
* Bootstrap Grunt task for the CommonJS module generation
* http://getbootstrap.com
* Copyright 2014-2015 The Bootstrap Authors
* Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
'use strict';
var fs = require('fs');
var path = require('path');
var COMMONJS_BANNER = '// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.\n';
module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath) {
var destDir = path.dirname(destFilepath);
function srcPathToDestRequire(srcFilepath) {
return 'require(\'' + srcFilepath.replace(/\\/g, '/') + '\')';
}
var moduleOutputJs = COMMONJS_BANNER + srcFiles.map(srcPathToDestRequire).join('\n');
try {
fs.writeFileSync(destFilepath, moduleOutputJs);
} catch (err) {
grunt.fail.warn(err);
}
grunt.log.writeln('File ' + destFilepath.cyan + ' created.');
};
...@@ -25,7 +25,8 @@ module.exports = function configureLibsass(grunt) { ...@@ -25,7 +25,8 @@ module.exports = function configureLibsass(grunt) {
}, },
docs: { docs: {
files: { files: {
'docs/assets/css/docs.min.css': 'docs/assets/scss/docs.scss' 'docs/assets/css/docs.min.css': 'docs/assets/scss/docs.scss',
'docs/assets/css/docs-flexbox.min.css': 'docs/assets/scss/flex-grid.scss'
} }
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment