|
2 | 2 | // |
3 | 3 | // Breakpoints are defined as a map of (name: minimum width), order from small to large: |
4 | 4 | // |
5 | | -// (xs: 0, sm: 34rem, md: 45rem) |
| 5 | +// (xs: 0, sm: 544px, md: 768px) |
6 | 6 | // |
7 | 7 | // The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default. |
8 | 8 |
|
9 | 9 | // Name of the next breakpoint, or null for the last breakpoint. |
10 | 10 | // |
11 | 11 | // >> breakpoint-next(sm) |
12 | 12 | // md |
13 | | -// >> breakpoint-next(sm, $breakpoints: (xs: 0, sm: 34rem, md: 45rem)) |
| 13 | +// >> breakpoint-next(sm, (xs: 0, sm: 544px, md: 768px)) |
14 | 14 | // md |
15 | 15 | // >> breakpoint-next(sm, $breakpoint-names: (xs sm md)) |
16 | 16 | // md |
|
21 | 21 |
|
22 | 22 | // Minimum breakpoint width. Null for the smallest (first) breakpoint. |
23 | 23 | // |
24 | | -// >> breakpoint-min(sm, (xs: 0, sm: 34rem, md: 45rem)) |
25 | | -// 34rem |
| 24 | +// >> breakpoint-min(sm, (xs: 0, sm: 544px, md: 768px)) |
| 25 | +// 544px |
26 | 26 | @function breakpoint-min($name, $breakpoints: $grid-breakpoints) { |
27 | 27 | $min: map-get($breakpoints, $name); |
28 | 28 | @return if($min != 0, $min, null); |
|
31 | 31 | // Maximum breakpoint width. Null for the largest (last) breakpoint. |
32 | 32 | // The maximum value is calculated as the minimum of the next one less 0.1. |
33 | 33 | // |
34 | | -// >> breakpoint-max(sm, (xs: 0, sm: 34rem, md: 45rem)) |
35 | | -// 44.9rem |
| 34 | +// >> breakpoint-max(sm, (xs: 0, sm: 544px, md: 768px)) |
| 35 | +// 767px |
36 | 36 | @function breakpoint-max($name, $breakpoints: $grid-breakpoints) { |
37 | 37 | $next: breakpoint-next($name, $breakpoints); |
38 | | - @return if($next, breakpoint-min($next, $breakpoints) - 0.1, null); |
| 38 | + @return if($next, breakpoint-min($next, $breakpoints) - 1px, null); |
39 | 39 | } |
40 | 40 |
|
41 | 41 | // Media of at least the minimum breakpoint width. No query for the smallest breakpoint. |
|
0 commit comments