Bootstrap 4 - A Quick Review
Bootstrap 4
·
Bootrap
is now officially sass-first project.
·
FlexBox
for responsiveness, Traditionally Bootstrap’s layout has been powered by
float-based styles
·
Besides
Bootstrap’s move away from float-based layouts, its responsiveness now also comes
with an extra tier. From now on, you’ll be able to customise these five
defaults:
|
$grid-breakpoints: (
xs: 0px,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px
/*New Tier Added*/
) !default;
|
·
The
default web fonts (Helvetica Neue, Helvetica, and Arial) have been dropped in
Bootstrap 4 and replaced with a “native font stack” for optimum text rendering
on every device and OS
$font-family-sans-serif:
// Safari for OS X and iOS (San Francisco)
-apple-system,
// Chrome < 56 for OS X (San Francisco)
BlinkMacSystemFont,
// Windows
"Segoe UI",
// Android
"Roboto",
// Basic web fallback
"Helvetica Neue", Arial, sans-serif,
// Emoji fonts
"Apple Color Emoji", "Segoe UI
Emoji", "Segoe UI
Symbol" !default;
This font-family is
applied to the <body> and automatically inherited globally
throughout Bootstrap. To switch the global font-family, update $font-family-base and
recompile Bootstrap
·
Bootstrap 4 guidelines
and reasons for choosing what to override in Reboot:
- Update some browser default values to use rems
instead of ems for scalable component spacing.
- Avoid margin-top.
Vertical margins can collapse, yielding unexpected results. More
importantly though, a single direction of margin is
a simpler mental model.
- For easier scaling across device sizes, block elements
should use rems for margins.
- Keep declarations of font-related
properties to a minimum, using inherit whenever
possible.
Comments
Post a Comment