Reboot
Reboot, a collection of element-specific CSS changes in a single file, kickstart CAKE to provide an elegant, consistent, and simple baseline to build upon.
Approach#
Reboot builds upon 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 .table, .table-bordered, and more.
Here are our guidelines and reasons for choosing what to override in Reboot:
- Update some browser default values to use rems instead ofems for scalable component spacing.
- Avoid margin-top. Vertical margins can collapse, yielding unexpected results. More importantly though, a single direction ofmarginis a simpler mental model.
- For easier scaling across device sizes, block elements should use rems formargins.
- Keep declarations of font-related properties to a minimum, usinginheritwhenever possible.
Page defaults#
The <html> and <body> elements are updated to provide better page-wide defaults. More specifically:
- The box-sizingis globally set on every element—including*::beforeand*::after, toborder-box. This ensures that the declared width of element is never exceeded due to padding or border.- No base font-sizeis declared on the<html>, but16pxis assumed (the browser default).font-size: 1remis applied on the<body>for easy responsive type-scaling via media queries while respecting user preferences and ensuring a more accessible approach. But inlgbreakpoint it is set to1.125remthat corresponds to18px.
 
- No base 
- The <body>also sets a globalfont-family,line-height, andtext-align. This is inherited later by some form elements to prevent font inconsistencies.
- For safety, the <body>has a declaredbackground-color, defaulting to#fafafa.
Font stack#
We use the Lidl house typeface LidlFontCondPro as primary font family. “Native font stack” is defined as fallback.
$font-family-sans-serif:
    // Lidl house typeface
    LidlFontCondPro,
    // Fallback fonts
    Calibri, Arial,
    // Safari for macOS and iOS (San Francisco)
    -apple-system,
    // Chrome < 56 for macOS (San Francisco)
    BlinkMacSystemFont,
    // Windows
    "Segoe UI",
    // Android
    "Roboto",
    // Basic web fallback
    "Helvetica Neue", Arial, "Noto Sans", sans-serif,
    // Emoji fonts
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";This font-family is applied to the <body> and automatically inherited globally throughout CAKE. To switch the global font-family, update $font-family-base and recompile CAKE.
Headings and paragraphs#
All heading elements—e.g., <h1>—and <p> are reset to have their margin-top removed. Headings level 1 have margin-bottom: 2rem, level 2 margin-bottom: 1rem and all other margin-bottom: .5rem added. Paragraphs have margin-bottom: 2rem for easy spacing.
Forms#
Various form elements have been rebooted for simpler base styles. Here are some of the most notable changes:
- <fieldset>s have no- borders,- padding, or- marginso they can be easily used as wrappers for individual inputs or groups of inputs.
- <legend>s, like fieldsets, have also been restyled to be displayed as a heading of sorts.
- <label>s are set to- display: inline-blockto allow- marginto be applied.
- <input>s,- <select>s,- <textarea>s, and- <button>s are mostly addressed by Normalize, but Reboot removes their- marginand sets- line-height: inherit, too.
- <textarea>s are modified to only be resizable vertically as horizontal resizing often “breaks” page layout.
- <button>s and- <input>button elements have- cursor: pointerwhen- :not(:disabled).
Change log#
Changed#
- Docs: "Reboot" | Add missing fallback fonts- Calibriand- Arialto documentation example
Fixed#
- Doc: "Reboot" | Removed- !defaultfrom font stack from Lidl theme