A collection of specific elements CSS to provide an elegant, consistent, and simple baseline to build upon.
Reboot builds upon Reset and Normalize, providing many HTML elements with somewhat opinionated styles using only element selectors. Additional styling is done only with classes. For example, we reboot some
<table> styles for a simpler baseline and later provide simpler styles within the table component.
Here are our guidelines and reasons for choosing what to override in Reboot:
- Update some browser default values to use
emfor scalable component spacing.
margin-top. Vertical margins can collapse, yielding unexpected results. More importantly though, a single direction of
marginis a simpler mental model.
- For easier scaling across device sizes, block elements should use
- Keep declarations of font-related properties to a minimum, using inherit whenever possible.
Some reset styles was taken of Reset, where the author says: “The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on”.
body elements are updated to provide better page-wide defaults. More specifically:
box-sizingis globally set on every element including
border-box. This ensures that the declared width of element is never exceeded due to padding or border.
- The base
font-sizeis declared on the
16px. Browsers by default assume
16px, if you want to change the base of
1rem, you need to update the global variable:
<body>also sets a global
text-align. This is inherited later by some form elements to prevent font inconsistencies.
- For safety, the
<body>has a declared
background-color, defaulting to
Native font stack
For optimum text rendering on every device and OS. Read more about native font stacks in this Smashing Magazine article.
font-family is applied to the
<body> and automatically inherited globally. To switch the global
$font-family and recompile all Cactu.