diff options
| author | Patrick H. Lauke <[email protected]> | 2017-11-20 05:13:37 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-11-20 05:13:37 -0500 |
| commit | dcb761350c72d77a4288493efc5b9a043feb9a26 (patch) | |
| tree | 8c3b66df36704c60652aa58ac2d06ccf11f54dd8 /docs | |
| parent | 0f17d53770874e7b918fe52a245ecc688584535d (diff) | |
| download | bootstrap-dcb761350c72d77a4288493efc5b9a043feb9a26.tar.xz bootstrap-dcb761350c72d77a4288493efc5b9a043feb9a26.zip | |
Add support for fractional viewport widths (zoom/high-dpi displays) (#24299)
* Change breakpoint max- calculation to fractional values
* Update docs to reflect fractional max-width breakpoint values
* Add fractional max-width to offcanvas example
* Add documentation and SCSS comment for fractional viewport support
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/4.0/content/tables.md | 4 | ||||
| -rw-r--r-- | docs/4.0/examples/offcanvas/offcanvas.css | 2 | ||||
| -rw-r--r-- | docs/4.0/layout/overview.md | 21 |
3 files changed, 17 insertions, 10 deletions
diff --git a/docs/4.0/content/tables.md b/docs/4.0/content/tables.md index 791de590d..0aefc9ad1 100644 --- a/docs/4.0/content/tables.md +++ b/docs/4.0/content/tables.md @@ -579,6 +579,10 @@ Regular table background variants are not available with the dark table, however {% capture callout-include %}{% include callout-warning-color-assistive-technologies.md %}{% endcapture %} {{ callout-include | markdownify }} +Create responsive tables by adding `.table-responsive{-sm|-md|-lg|-xl}` to any `.table` to make them scroll horizontally at each `max-width` breakpoint of 575.99px, 767.99px, 991.99px, and 1119.99px, respectively. + +{% capture callout-include %}{% include callout-info-mediaqueries-breakpoints.md %}{% endcapture %} +{{ callout-include | markdownify }} ## Captions diff --git a/docs/4.0/examples/offcanvas/offcanvas.css b/docs/4.0/examples/offcanvas/offcanvas.css index 1c9ca3b44..c23004ad4 100644 --- a/docs/4.0/examples/offcanvas/offcanvas.css +++ b/docs/4.0/examples/offcanvas/offcanvas.css @@ -17,7 +17,7 @@ footer { * Off Canvas * -------------------------------------------------- */ -@media screen and (max-width: 767px) { +@media screen and (max-width: 767.99px) { .row-offcanvas { position: relative; transition: all .25s ease-out; diff --git a/docs/4.0/layout/overview.md b/docs/4.0/layout/overview.md index 4952da5b7..9ac82d7bd 100644 --- a/docs/4.0/layout/overview.md +++ b/docs/4.0/layout/overview.md @@ -88,21 +88,24 @@ We occasionally use media queries that go in the other direction (the given scre {% highlight scss %} // Extra small devices (portrait phones, less than 576px) -@media (max-width: 575px) { ... } +@media (max-width: 575.99px) { ... } // Small devices (landscape phones, less than 768px) -@media (max-width: 767px) { ... } +@media (max-width: 767.99px) { ... } // Medium devices (tablets, less than 992px) -@media (max-width: 991px) { ... } +@media (max-width: 991.99px) { ... } // Large devices (desktops, less than 1200px) -@media (max-width: 1199px) { ... } +@media (max-width: 1199.99px) { ... } // Extra large devices (large desktops) // No media query since the extra-large breakpoint has no upper bound on its width {% endhighlight %} +{% capture callout-include %}{% include callout-info-mediaqueries-breakpoints.md %}{% endcapture %} +{{ callout-include | markdownify }} + Once again, these media queries are also available via Sass mixins: {% highlight scss %} @@ -116,16 +119,16 @@ There are also media queries and mixins for targeting a single segment of screen {% highlight scss %} // Extra small devices (portrait phones, less than 576px) -@media (max-width: 575px) { ... } +@media (max-width: 575.99px) { ... } // Small devices (landscape phones, 576px and up) -@media (min-width: 576px) and (max-width: 767px) { ... } +@media (min-width: 576px) and (max-width: 767.99px) { ... } // Medium devices (tablets, 768px and up) -@media (min-width: 768px) and (max-width: 991px) { ... } +@media (min-width: 768px) and (max-width: 991.99px) { ... } // Large devices (desktops, 992px and up) -@media (min-width: 992px) and (max-width: 1199px) { ... } +@media (min-width: 992px) and (max-width: 1199.99px) { ... } // Extra large devices (large desktops, 1200px and up) @media (min-width: 1200px) { ... } @@ -146,7 +149,7 @@ Similarly, media queries may span multiple breakpoint widths: {% highlight scss %} // Example // Apply styles starting from medium devices and up to extra large devices -@media (min-width: 768px) and (max-width: 1199px) { ... } +@media (min-width: 768px) and (max-width: 1199.99px) { ... } {% endhighlight %} The Sass mixin for targeting the same screen size range would be: |
