mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-29 17:36:49 +01:00
af942a27e4
- Automated reformatting - Manually change code where Prettier reformatting causes issues - Revert "Disable Prettier formatting in CI for now"
36 lines
1.0 KiB
SCSS
36 lines
1.0 KiB
SCSS
@use 'sass:list';
|
|
@use 'sass:map';
|
|
// Based upon the fine work and thoughts from Bootstrap v4.
|
|
// Copyright 2011-2018 The Bootstrap Authors
|
|
// Copyright 2011-2018 Twitter, Inc.
|
|
// Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
|
|
// Name of the next breakpoint, or null for the last breakpoint.
|
|
// >> breakpoint-next(sm)
|
|
// md
|
|
@function breakpoint-next($name) {
|
|
$breakpoint-names: map.keys($breakpoints);
|
|
$n: list.index($breakpoint-names, $name);
|
|
@return if(
|
|
$n < list.length($breakpoint-names),
|
|
list.nth($breakpoint-names, $n + 1),
|
|
null
|
|
);
|
|
}
|
|
|
|
// Minimum breakpoint width. Null for the smallest (first) breakpoint.
|
|
// >> breakpoint-min(sm)
|
|
// 50em
|
|
@function breakpoint-min($name) {
|
|
$min: map.get($breakpoints, $name);
|
|
@return if($min != 0, $min, null);
|
|
}
|
|
|
|
// Maximum breakpoint width. Null for the largest (last) breakpoint.
|
|
// >> breakpoint-max(sm)
|
|
// 56.1875em
|
|
@function breakpoint-max($name) {
|
|
$next: breakpoint-next($name);
|
|
@return if($next, breakpoint-min($next) - 0.0625em, null);
|
|
}
|