diff options
| author | Gijs Boddeus <[email protected]> | 2017-08-25 23:29:40 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-08-25 23:29:40 +0200 |
| commit | 4356d08abb4d94785af15f3cc9be0e553f1c1c03 (patch) | |
| tree | ce649fd410b7e9a38758ef8318e1d9aba5eef3e8 /docs | |
| parent | a103958975787653b4ba84f80d1d1e8f7be302c3 (diff) | |
| parent | ba6a6f13691000ffaf22ef8e731513737659447f (diff) | |
| download | bootstrap-4356d08abb4d94785af15f3cc9be0e553f1c1c03.tar.xz bootstrap-4356d08abb4d94785af15f3cc9be0e553f1c1c03.zip | |
Merge pull request #3 from twbs/v4-dev
update from official repo
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/4.0/components/alerts.md | 2 | ||||
| -rw-r--r-- | docs/4.0/components/dropdowns.md | 2 | ||||
| -rw-r--r-- | docs/4.0/components/popovers.md | 2 | ||||
| -rw-r--r-- | docs/4.0/components/tooltips.md | 2 | ||||
| -rw-r--r-- | docs/4.0/content/reboot.md | 6 | ||||
| -rw-r--r-- | docs/4.0/content/tables.md | 22 | ||||
| -rw-r--r-- | docs/4.0/examples/carousel/index.html | 6 | ||||
| -rw-r--r-- | docs/4.0/layout/grid.md | 47 | ||||
| -rw-r--r-- | docs/4.0/layout/media-object.md | 20 | ||||
| -rw-r--r-- | docs/4.0/migration.md | 2 | ||||
| -rw-r--r-- | docs/4.0/utilities/clearfix.md | 2 | ||||
| -rw-r--r-- | docs/4.0/utilities/text.md | 2 |
12 files changed, 79 insertions, 36 deletions
diff --git a/docs/4.0/components/alerts.md b/docs/4.0/components/alerts.md index d3eb8bd18..90c146362 100644 --- a/docs/4.0/components/alerts.md +++ b/docs/4.0/components/alerts.md @@ -8,7 +8,7 @@ toc: true ## Examples -Alerts are available for any length of text, as well as an optional dismiss button. For proper styling, use one of the four **required** contextual classes (e.g., `.alert-success`). For inline dismissal, use the [alerts jQuery plugin](#dismissing). +Alerts are available for any length of text, as well as an optional dismiss button. For proper styling, use one of the eight **required** contextual classes (e.g., `.alert-success`). For inline dismissal, use the [alerts jQuery plugin](#dismissing). {% example html %} {% for color in site.data.theme-colors %} diff --git a/docs/4.0/components/dropdowns.md b/docs/4.0/components/dropdowns.md index b93d24aff..a65c1f0f2 100644 --- a/docs/4.0/components/dropdowns.md +++ b/docs/4.0/components/dropdowns.md @@ -10,7 +10,7 @@ toc: true Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap dropdown JavaScript plugin. They're toggled by clicking, not by hovering; this is [an intentional design decision.](http://markdotto.com/2012/02/27/bootstrap-explained-dropdowns/) -Dropdowns are built on a third party library, [Popper.js](https://popper.js.org), which provides dynamic positioning and viewport detection. Be sure to include [popper.min.js](https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js) before Bootstrap's JavaScript. +Dropdowns are built on a third party library, [Popper.js](https://popper.js.org), which provides dynamic positioning and viewport detection. Be sure to include [popper.min.js]({{ site.cdn.popper }}) before Bootstrap's JavaScript. If you're building our JS from source, it [requires `util.js`]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#util). diff --git a/docs/4.0/components/popovers.md b/docs/4.0/components/popovers.md index 2e6f42b55..f8e956e72 100644 --- a/docs/4.0/components/popovers.md +++ b/docs/4.0/components/popovers.md @@ -11,7 +11,7 @@ toc: true Things to know when using the popover plugin: -- Popovers rely on the 3rd party library [Popper.js](https://popper.js.org) for positioning. You must include [popper.min.js](https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js) before bootstrap.js in order for popovers to work! +- Popovers rely on the 3rd party library [Popper.js](https://popper.js.org) for positioning. You must include [popper.min.js]({{ site.cdn.popper }}) before bootstrap.js in order for popovers to work! - Popovers require the [tooltip plugin]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/tooltips/) as a dependency. - If building our JS from source, it [requires `util.js`]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#util). - Popovers are opt-in for performance reasons, so **you must initialize them yourself**. diff --git a/docs/4.0/components/tooltips.md b/docs/4.0/components/tooltips.md index 7018b2442..662493bcf 100644 --- a/docs/4.0/components/tooltips.md +++ b/docs/4.0/components/tooltips.md @@ -10,7 +10,7 @@ toc: true Things to know when using the tooltip plugin: -- Tooltips rely on the 3rd party library [Popper.js](https://popper.js.org) for positioning. You must include [popper.min.js](https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.10.1/umd/popper.min.js) before bootstrap.js in order for tooltips to work! +- Tooltips rely on the 3rd party library [Popper.js](https://popper.js.org) for positioning. You must include [popper.min.js]({{ site.cdn.popper }}) before bootstrap.js in order for tooltips to work! - If building our JS from source, it [requires `util.js`]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#util). - Tooltips are opt-in for performance reasons, so **you must initialize them yourself**. - Tooltips with zero-length titles are never displayed. diff --git a/docs/4.0/content/reboot.md b/docs/4.0/content/reboot.md index f42332874..63a576c6f 100644 --- a/docs/4.0/content/reboot.md +++ b/docs/4.0/content/reboot.md @@ -35,8 +35,6 @@ The default web fonts (Helvetica Neue, Helvetica, and Arial) have been dropped i $font-family-sans-serif: // Safari for OS X and iOS (San Francisco) -apple-system, - // Chrome >= 56 for OS X (San Francisco), Windows, Linux and Android - system-ui, // Chrome < 56 for OS X (San Francisco) BlinkMacSystemFont, // Windows @@ -44,7 +42,9 @@ $font-family-sans-serif: // Android "Roboto", // Basic web fallback - "Helvetica Neue", Arial, sans-serif !default; + "Helvetica Neue", Arial, sans-serif, + // Emoji fonts + "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default; {% endhighlight %} This `font-family` is applied to the `<body>` and automatically inherited globally throughout Bootstrap. To switch the global `font-family`, update `$font-family-base` and recompile Bootstrap. diff --git a/docs/4.0/content/tables.md b/docs/4.0/content/tables.md index db05e8378..9de7c5553 100644 --- a/docs/4.0/content/tables.md +++ b/docs/4.0/content/tables.md @@ -45,10 +45,10 @@ Using the most basic table markup, here's how `.table`-based tables look in Boot </table> {% endexample %} -You can also invert the colors—with light text on dark backgrounds—with `.table-inverse`. +You can also invert the colors—with light text on dark backgrounds—with `.table-dark`. {% example html %} -<table class="table table-inverse"> +<table class="table table-dark"> <thead> <tr> <th>#</th> @@ -82,11 +82,11 @@ You can also invert the colors—with light text on dark backgrounds—with `.ta ## Table head options -Similar to default and inverse tables, use one of two modifier classes to make `<thead>`s appear light or dark gray. +Similar to tables and dark tables, use the modifier classes `.thead-light` or `.thead-dark` to make `<thead>`s appear light or dark gray. {% example html %} <table class="table"> - <thead class="thead-inverse"> + <thead class="thead-dark"> <tr> <th>#</th> <th>First Name</th> @@ -117,7 +117,7 @@ Similar to default and inverse tables, use one of two modifier classes to make ` </table> <table class="table"> - <thead class="thead-default"> + <thead class="thead-light"> <tr> <th>#</th> <th>First Name</th> @@ -186,7 +186,7 @@ Use `.table-striped` to add zebra-striping to any table row within the `<tbody>` {% endexample %} {% example html %} -<table class="table table-striped table-inverse"> +<table class="table table-striped table-dark"> <thead> <tr> <th>#</th> @@ -261,7 +261,7 @@ Add `.table-bordered` for borders on all sides of the table and cells. {% endexample %} {% example html %} -<table class="table table-bordered table-inverse"> +<table class="table table-bordered table-dark"> <thead> <tr> <th>#</th> @@ -335,7 +335,7 @@ Add `.table-hover` to enable a hover state on table rows within a `<tbody>`. {% endexample %} {% example html %} -<table class="table table-hover table-inverse"> +<table class="table table-hover table-dark"> <thead> <tr> <th>#</th> @@ -403,7 +403,7 @@ Add `.table-sm` to make tables more compact by cutting cell padding in half. {% endexample %} {% example html %} -<table class="table table-sm table-inverse"> +<table class="table table-sm table-dark"> <thead> <tr> <th>#</th> @@ -487,10 +487,10 @@ Use contextual classes to color table rows or individual cells. </tr> {% endhighlight %} -Regular table background variants are not available with the inverse table, however, you may use [text or background utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/colors/) to achieve similar styles. +Regular table background variants are not available with the dark table, however, you may use [text or background utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/colors/) to achieve similar styles. <div class="bd-example"> - <table class="table table-inverse"> + <table class="table table-dark"> <thead> <tr> <th>#</th> diff --git a/docs/4.0/examples/carousel/index.html b/docs/4.0/examples/carousel/index.html index d6c220cb7..7d4a6ea22 100644 --- a/docs/4.0/examples/carousel/index.html +++ b/docs/4.0/examples/carousel/index.html @@ -51,7 +51,7 @@ <div class="carousel-item active"> <img class="first-slide" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="First slide"> <div class="container"> - <div class="carousel-caption d-md-block text-left"> + <div class="carousel-caption text-left"> <h1>Example headline.</h1> <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p> <p><a class="btn btn-lg btn-primary" href="#" role="button">Sign up today</a></p> @@ -61,7 +61,7 @@ <div class="carousel-item"> <img class="second-slide" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Second slide"> <div class="container"> - <div class="carousel-caption d-md-block"> + <div class="carousel-caption"> <h1>Another example headline.</h1> <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p> <p><a class="btn btn-lg btn-primary" href="#" role="button">Learn more</a></p> @@ -71,7 +71,7 @@ <div class="carousel-item"> <img class="third-slide" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Third slide"> <div class="container"> - <div class="carousel-caption d-md-block text-right"> + <div class="carousel-caption text-right"> <h1>One more for good measure.</h1> <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p> <p><a class="btn btn-lg btn-primary" href="#" role="button">Browse gallery</a></p> diff --git a/docs/4.0/layout/grid.md b/docs/4.0/layout/grid.md index a4fbf9ca5..20ec1f8c9 100644 --- a/docs/4.0/layout/grid.md +++ b/docs/4.0/layout/grid.md @@ -493,6 +493,22 @@ With the handful of grid tiers available, you're bound to run into issues where, {% endexample %} </div> +In addition to column clearing at responsive breakpoints, you may need to reset offsets. See this in action in [the grid example]({{ site.baseurl }}/docs/{{ site.docs_version }}/examples/grid/). + +<div class="bd-example-row"> +{% example html %} +<div class="row"> + <div class="col-sm-5 col-md-6">.col-sm-5 .col-md-6</div> + <div class="col-sm-5 offset-sm-2 col-md-6 offset-md-0">.col-sm-5 .offset-sm-2 .col-md-6 .offset-md-0</div> +</div> + +<div class="row"> + <div class="col-sm-6 col-md-5 col-lg-6">.col.col-sm-6.col-md-5.col-lg-6</div> + <div class="col-sm-6 col-md-5 offset-md-2 col-lg-6 offset-lg-0">.col-sm-6 .col-md-5 .offset-md-2 .col-lg-6 .offset-lg-0</div> +</div> +{% endexample %} +</div> + ## Reordering ### Flex order @@ -519,7 +535,31 @@ Use `.order-` classes for controlling the **visual order** of your content. Thes ### Offsetting columns -With the move to flexbox in v4, we no longer have v3's style of offset classes. Instead, use margin utilities like `.mr-auto` to force sibling columns away from one another. +You can offset grid columns in two ways: our responsive `.offset-` grid classes and our [margin utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/). Grid classes are sized to match columns while margins are more useful for quick layouts where the width of the offset is variable. + +#### Offset classes + +Move columns to the right using `.offset-md-*` classes. These classes increase the left margin of a column by `*` columns. For example, `.offset-md-4` moves `.col-md-4` over four columns. + +<div class="bd-example-row"> +{% example html %} +<div class="row"> + <div class="col-md-4">.col-md-4</div> + <div class="col-md-4 offset-md-4">.col-md-4 .offset-md-4</div> +</div> +<div class="row"> + <div class="col-md-3 offset-md-3">.col-md-3 .offset-md-3</div> + <div class="col-md-3 offset-md-3">.col-md-3 .offset-md-3</div> +</div> +<div class="row"> + <div class="col-md-6 offset-md-3">.col-md-6 .offset-md-3</div> +</div> +{% endexample %} +</div> + +#### Margin utilities + +With the move to flexbox in v4, you can use margin utilities like `.mr-auto` to force sibling columns away from one another. <div class="bd-example-row"> {% example html %} @@ -604,6 +644,9 @@ Mixins are used in conjunction with the grid variables to generate semantic CSS // Make the element grid-ready (applying everything but the width) @include make-col-ready(); @include make-col($size, $columns: $grid-columns); + +// Get fancy by offsetting, or changing the sort order +@include make-col-offset($size, $columns: $grid-columns); {% endhighlight %} ### Example usage @@ -684,4 +727,4 @@ $container-max-widths: ( ); {% endhighlight %} -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 and ordering. 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, and ordering. Responsive visibility utilities will also be updated to use the custom breakpoints. diff --git a/docs/4.0/layout/media-object.md b/docs/4.0/layout/media-object.md index e3377ef6b..3ffaf6412 100644 --- a/docs/4.0/layout/media-object.md +++ b/docs/4.0/layout/media-object.md @@ -14,7 +14,7 @@ Below is an example of a single media object. Only two classes are required—th {% example html %} <div class="media"> - <img class="d-flex mr-3" data-src="holder.js/64x64" alt="Generic placeholder image"> + <img class="mr-3" data-src="holder.js/64x64" alt="Generic placeholder image"> <div class="media-body"> <h5 class="mt-0">Media heading</h5> Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. @@ -36,13 +36,13 @@ Media objects can be infinitely nested, though we suggest you stop at some point {% example html %} <div class="media"> - <img class="d-flex mr-3" data-src="holder.js/64x64" alt="Generic placeholder image"> + <img class="mr-3" data-src="holder.js/64x64" alt="Generic placeholder image"> <div class="media-body"> <h5 class="mt-0">Media heading</h5> Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. <div class="media mt-3"> - <a class="d-flex pr-3" href="#"> + <a class="pr-3" href="#"> <img data-src="holder.js/64x64" alt="Generic placeholder image"> </a> <div class="media-body"> @@ -60,7 +60,7 @@ Media in a media object can be aligned with flexbox utilities to the top (defaul {% example html %} <div class="media"> - <img class="d-flex align-self-start mr-3" data-src="holder.js/64x64" alt="Generic placeholder image"> + <img class="align-self-start mr-3" data-src="holder.js/64x64" alt="Generic placeholder image"> <div class="media-body"> <h5 class="mt-0">Top-aligned media</h5> <p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p> @@ -71,7 +71,7 @@ Media in a media object can be aligned with flexbox utilities to the top (defaul {% example html %} <div class="media"> - <img class="d-flex align-self-center mr-3" data-src="holder.js/64x64" alt="Generic placeholder image"> + <img class="align-self-center mr-3" data-src="holder.js/64x64" alt="Generic placeholder image"> <div class="media-body"> <h5 class="mt-0">Center-aligned media</h5> <p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p> @@ -82,7 +82,7 @@ Media in a media object can be aligned with flexbox utilities to the top (defaul {% example html %} <div class="media"> - <img class="d-flex align-self-end mr-3" data-src="holder.js/64x64" alt="Generic placeholder image"> + <img class="align-self-end mr-3" data-src="holder.js/64x64" alt="Generic placeholder image"> <div class="media-body"> <h5 class="mt-0">Bottom-aligned media</h5> <p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p> @@ -101,7 +101,7 @@ Change the order of content in media objects by modifying the HTML itself, or by <h5 class="mt-0 mb-1">Media object</h5> Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. </div> - <img class="d-flex ml-3" data-src="holder.js/64x64" alt="Generic placeholder image"> + <img class="ml-3" data-src="holder.js/64x64" alt="Generic placeholder image"> </div> {% endexample %} @@ -112,21 +112,21 @@ Because the media object has so few structural requirements, you can also use th {% example html %} <ul class="list-unstyled"> <li class="media"> - <img class="d-flex mr-3" data-src="holder.js/64x64" alt="Generic placeholder image"> + <img class="mr-3" data-src="holder.js/64x64" alt="Generic placeholder image"> <div class="media-body"> <h5 class="mt-0 mb-1">List-based media object</h5> Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. </div> </li> <li class="media my-4"> - <img class="d-flex mr-3" data-src="holder.js/64x64" alt="Generic placeholder image"> + <img class="mr-3" data-src="holder.js/64x64" alt="Generic placeholder image"> <div class="media-body"> <h5 class="mt-0 mb-1">List-based media object</h5> Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. </div> </li> <li class="media"> - <img class="d-flex mr-3" data-src="holder.js/64x64" alt="Generic placeholder image"> + <img class="mr-3" data-src="holder.js/64x64" alt="Generic placeholder image"> <div class="media-body"> <h5 class="mt-0 mb-1">List-based media object</h5> Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. diff --git a/docs/4.0/migration.md b/docs/4.0/migration.md index 08a3008fe..bfb75a08b 100644 --- a/docs/4.0/migration.md +++ b/docs/4.0/migration.md @@ -212,7 +212,7 @@ Dropped entirely for the new card component. - All CSS has been un-nested and renamed, ensuring each class is prefixed with `.carousel-`. - For carousel items, `.next`, `.prev`, `.left`, and `.right` are now `.carousel-item-next`, `.carousel-item-prev`, `.carousel-item-left`, and `.carousel-item-right`. - `.item` is also now `.carousel-item`. - - For prev/next controls, `.carousel-control.right` and `.carousel-control.left` are now `.carousel-control-right` and `.carousel-control-left`, meaning they no longer require a specific base class. + - For prev/next controls, `.carousel-control.right` and `.carousel-control.left` are now `.carousel-control-next` and `.carousel-control-prev`, meaning they no longer require a specific base class. - Removed all responsive styling, deferring to utilities (e.g., showing captions on certain viewports) and custom styles as needed. - Removed image overrides for images in carousel items, deferring to utilities. - Tweaked the Carousel example to include the new markup and styles. diff --git a/docs/4.0/utilities/clearfix.md b/docs/4.0/utilities/clearfix.md index 5b5727b11..d9de7fdf4 100644 --- a/docs/4.0/utilities/clearfix.md +++ b/docs/4.0/utilities/clearfix.md @@ -6,7 +6,7 @@ group: utilities toc: true --- -Easily clear `float`s by adding `.clearfix` **to the parent element**. Utilizes [the micro clearfix](http://nicolasgallagher.com/micro-clearfix-hack/) as popularized by Nicolas Gallagher. Can also be used as a mixin. +Easily clear `float`s by adding `.clearfix` **to the parent element**. Can also be used as a mixin. {% highlight html %} <div class="clearfix">...</div> diff --git a/docs/4.0/utilities/text.md b/docs/4.0/utilities/text.md index 8dcbba078..699871038 100644 --- a/docs/4.0/utilities/text.md +++ b/docs/4.0/utilities/text.md @@ -1,6 +1,6 @@ --- layout: docs -title: Typography +title: Text description: Documentation and examples for common text utilities to control alignment, wrapping, weight, and more. group: utilities toc: true |
