From eabed0edf84c61bb4095ce8f92f41e58552785b9 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Mon, 31 Aug 2015 01:23:43 +0100 Subject: Change grid and container sizes to px Changes grid and container sizes to `px`, as the viewport pixel size does not depend on the font size. The actual em values were inconsistent with the docs, while the docs were not the same as the comments: * `sm` breakpoint was 34em (544px) not 480px. * `lg` container max-width was 60rem (960px), less gutter than `md`. Changed to 940px, same as Bootstrap 3. * `xl` container max-width was 72.25rem which is 1140px not 1156px. Changed to 1140px matching the comment but not the docs. Addresses #17070 and #17388. --- docs/layout/grid.md | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'docs/layout') diff --git a/docs/layout/grid.md b/docs/layout/grid.md index 802a9a142..e35924337 100644 --- a/docs/layout/grid.md +++ b/docs/layout/grid.md @@ -52,6 +52,9 @@ The above example creates three equal-width columns on small, medium, large, and ## Grid options +While Bootstrap uses `em`s or `rem`s for defining most sizes, `px`s are used for grid breakpoints and container widths. +This is because the viewport width is in pixels and does not change with the [font size](https://drafts.csswg.org/mediaqueries-3/#units). + See how aspects of the Bootstrap grid system work across multiple devices with a handy table.
@@ -61,23 +64,23 @@ See how aspects of the Bootstrap grid system work across multiple devices with a Extra small
- <34em / 480px + <544px Small
- ≥34em / 480px + ≥544px Medium
- ≥45em / 720px + ≥768px Large
- ≥62em / 992px + ≥992px Extra large
- ≥75em / 1200px + ≥1200px @@ -90,10 +93,10 @@ See how aspects of the Bootstrap grid system work across multiple devices with a Container width None (auto) - 34rem / 480px - 45rem / 720px - 60rem / 960px - 72.25rem / 1156px + 576px + 720px + 940px + 1140px Class prefix @@ -109,7 +112,7 @@ See how aspects of the Bootstrap grid system work across multiple devices with a Gutter width - 30px (15px on each side of a column) + 1.875rem / 30px (15px on each side of a column) Nestable @@ -140,17 +143,18 @@ $grid-breakpoints: ( // Extra small screen / phone xs: 0, // Small screen / phone - sm: 34em, // 480px + sm: 544px, // Medium screen / tablet - md: 48em, // 768px + md: 768px, // Large screen / desktop - lg: 62em, // 992px + lg: 992px, // Extra large screen / wide desktop - xl: 75em // 1200px + xl: 1200px ) !default; + $grid-columns: 12; -$grid-gutter-width: 1.5rem; +$grid-gutter-width: 1.875rem; {% endhighlight %} ### Mixins -- cgit v1.2.3 From b7bdde3d4c35e95926a7fdb7b39f98dcd6dc6a32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20K=C3=A4ufl?= Date: Sun, 27 Sep 2015 17:32:06 +0200 Subject: Filled leftover placeholder --- docs/layout/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/layout') diff --git a/docs/layout/overview.md b/docs/layout/overview.md index 0f2a09bf0..4fa972d28 100644 --- a/docs/layout/overview.md +++ b/docs/layout/overview.md @@ -51,7 +51,7 @@ Since Bootstrap is developed to be mobile first, we use a handful of [media quer Bootstrap primarily uses the following media query ranges—or breakpoints—in our source Sass files for our layout, grid system, and components. {% highlight scss %} -// Extra small devices (portrait phones, less than ???px) +// Extra small devices (portrait phones, less than 34em) // No media query since this is the default in Bootstrap // Small devices (landscape phones, 34em and up) -- cgit v1.2.3 From ade2ab13418b2c86aa47a767533e542dc6589aff Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sun, 22 Nov 2015 20:53:34 -0800 Subject: Remove non-responsive text alignment classes These can be replaced by their `.text-xs-*` parallels. This also avoids any complications from interactions between the responsive and non-responsive classes. (e.g. `
`) Refs #18300 [skip sauce] --- docs/layout/grid.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs/layout') diff --git a/docs/layout/grid.md b/docs/layout/grid.md index e35924337..6edbaf6b3 100644 --- a/docs/layout/grid.md +++ b/docs/layout/grid.md @@ -62,23 +62,23 @@ See how aspects of the Bootstrap grid system work across multiple devices with a - + Extra small
<544px - + Small
≥544px - + Medium
≥768px - + Large
≥992px - + Extra large
≥1200px -- cgit v1.2.3