You can add a new breakpoint to BS 4 by changing the $grid-breakpoints
and $container-max-widths
variables with SASS.
/* your _custom.scss */
@import "bootstrap/functions";
@import "bootstrap/variables";
@import "bootstrap/mixins";
$grid-breakpoints: (
xxs: 0,
xs: 375px,
sm: 544px,
md: 768px,
lg: 992px,
xl: 1200px
);
$container-max-widths: (
xxs: 375px,
xs: 375px,
sm: 544px,
md: 768px,
lg: 992px,
xl: 1200px
);
@import "bootstrap";
http://codeply.com/go/mPS4Yros4U
Update 2018: Now that the xs-
infix has been removed in Bootstrap 4, adding a new smaller xxs breakpoint means that this lowest breakpoint has no infix. For example:
col-6 (50% on xxs)
col-xs-6 (50% on xs)
Notes on customizing Bootstrap using SASS, from the docs...
Modify any of the Sass variables and maps in your custom.scss.... Every Sass variable in Bootstrap 4 includes the !default flag allowing
you to override the variable’s default value in your own Sass without
modifying Bootstrap’s source code. Copy and paste variables as needed,
modify their values, and remove the !default flag. If a variable has
already been assigned, then it won’t be re-assigned by the default
values in Bootstrap.