Skip to content

CSS Reset

An optional adaptation of Josh Comeau's custom CSS reset: box sizing, margins, media elements, and text wrapping. It says nothing about color or typefaces, so it works the same with the reference theme or fully headless.

Import order

Import the reset before other stylesheets. Every rule lives in the hz-reset cascade layer, pinned below hz-theme, so the reference theme always beats it. Your own unlayered CSS beats both, at any specificity, because an unlayered rule outranks every layered one. The reset never fights you.

import '@hyzer-labs/ui/reset.css'; // 1. reset (optional)
import '@hyzer-labs/ui/tokens.css'; // 2. tokens
import '@hyzer-labs/ui/theme'; // 3. reference theme (optional)

What it does

  • box-sizing: border-box everywhere.
  • All default margins removed, so spacing becomes a layout decision.
  • interpolate-size: allow-keywords so height: auto transitions can animate (guarded by prefers-reduced-motion).
  • Media elements (img, video, …) block-level and constrained.
  • Form controls inherit the surrounding font.
  • Long words break instead of overflowing; text-wrap: pretty for paragraphs and balance for headings.