mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-30 16:50:00 +02:00
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.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Breakpoints are defined as a map of (name: minimum width), order from small to large:
|
||||
//
|
||||
// (xs: 0, sm: 34rem, md: 45rem)
|
||||
// (xs: 0, sm: 544px, md: 768px)
|
||||
//
|
||||
// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
//
|
||||
// >> breakpoint-next(sm)
|
||||
// md
|
||||
// >> breakpoint-next(sm, $breakpoints: (xs: 0, sm: 34rem, md: 45rem))
|
||||
// >> breakpoint-next(sm, (xs: 0, sm: 544px, md: 768px))
|
||||
// md
|
||||
// >> breakpoint-next(sm, $breakpoint-names: (xs sm md))
|
||||
// md
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
// Minimum breakpoint width. Null for the smallest (first) breakpoint.
|
||||
//
|
||||
// >> breakpoint-min(sm, (xs: 0, sm: 34rem, md: 45rem))
|
||||
// 34rem
|
||||
// >> breakpoint-min(sm, (xs: 0, sm: 544px, md: 768px))
|
||||
// 544px
|
||||
@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
|
||||
$min: map-get($breakpoints, $name);
|
||||
@return if($min != 0, $min, null);
|
||||
@@ -31,11 +31,11 @@
|
||||
// Maximum breakpoint width. Null for the largest (last) breakpoint.
|
||||
// The maximum value is calculated as the minimum of the next one less 0.1.
|
||||
//
|
||||
// >> breakpoint-max(sm, (xs: 0, sm: 34rem, md: 45rem))
|
||||
// 44.9rem
|
||||
// >> breakpoint-max(sm, (xs: 0, sm: 544px, md: 768px))
|
||||
// 767px
|
||||
@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
|
||||
$next: breakpoint-next($name, $breakpoints);
|
||||
@return if($next, breakpoint-min($next, $breakpoints) - 0.1, null);
|
||||
@return if($next, breakpoint-min($next, $breakpoints) - 1px, null);
|
||||
}
|
||||
|
||||
// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
|
||||
|
Reference in New Issue
Block a user