CanonCSS
GitHub

Tokens

The complete vocabulary. If a value has no token, it does not exist.

Spacing - 6 levels

--space-xs0.25rem / 4px
--space-sm0.5rem / 8px
--space-md1rem / 16px
--space-lg1.5rem / 24px
--space-xl2.5rem / 40px
--space-2xl4rem / 64px

Type scale - 7 levels

--text-xs0.75rem / 12px
--text-sm0.875rem / 14px
--text-md1rem / 16px - body
--text-lg1.125rem / 18px
--text-xl1.5rem / 24px
--text-2xl2rem / 32px
--text-3xl3rem / 48px

Headings h1h6 map onto the scale automatically (h1 = 3xl … h6 = sm). Never restyle them.

Color - semantic

--color-brandPrimary actions, links
--color-brand-subtleBrand tints, focus rings
--color-accentSingle sharp accent
--color-surfacePage background
--color-surface-raisedCards, panels, sidebars
--color-surface-sunkenWells, footers
--color-contentBody text
--color-content-subtleSecondary text
--color-borderDefault borders
--color-border-strongInputs, emphasis borders
--color-successStatus - has a -subtle tint
--color-warningStatus - has a -subtle tint
--color-errorStatus - has a -subtle tint
--color-infoStatus - has a -subtle tint

Radius, shadow, typography, motion

Radius--radius-{sm|md|lg|full}
Shadow--shadow-{sm|md|lg}
Fonts--font-{sans|display|mono}
Weight--weight-{normal|medium|bold}
Leading--leading-{tight|normal|loose}
Motion--ease-default, --duration-{fast|normal|slow}

Dark mode

<html data-theme="dark">

Light is Canon's default. Dark mode is always explicit - one attribute, and surfaces, content, borders and subtle tints all remap. No automatic theme switching: one right way.

Theming

:root {
  --color-brand: #0ea5e9;   /* the only sanctioned override point */
}