Skip to content

Foundation

Foundation is optional but recommended. It builds on preflight with a set of sensible element-level defaults that give your project a clean, consistent starting point without imposing a visual style.

It removes default margins and padding from common elements and re-applies them in a single direction using margin-block-end. This prevents margin collapsing issues and keeps vertical rhythm predictable across the page.

It also sets default typography for headings, body text, links, and small text using CSS custom properties. Every value has a sensible fallback, so you can drop Foundation into a project and start immediately — or override any property with your own custom properties when you are ready.