Theme
The shared tokens in tokens.json. Each component reads a token as the custom property with its default as the fallback, so
nothing defines them until a project does. Every one carries the --norn- prefix, so it can sit next to a project's own
custom properties, and its name is the path joined with hyphens: ui.border.color is --norn-ui-border-color.
Set any of them in unlayered CSS to restyle every component.
Change a token in the Override column to try it. A color has a light and a dark value, each from its own picker. Any other token takes
any CSS value, such as 1.5rem. Overrides are saved in this browser and apply to every preview page, in this tab and in any
other that is open.
| Token | Group | Preview | Default | Override | Use |
|---|---|---|---|---|---|
--norn-ui-accent |
ui | #2346d4 |
|
Brand color. A placeholder blue until the project sets it. | |
--norn-ui-border-color |
ui | light-dark(#d3d8e2, #2d323e) |
|
Hairline color. | |
--norn-ui-border-strong |
ui | light-dark(#7a8194, #6f7789) |
|
Edge of a control, such as a field. At least 3:1 on the page surface, which WCAG 1.4.11 asks of a control's boundary. | |
--norn-ui-border-radius |
ui | 6px |
Corner radius. | ||
--norn-ui-radius-s |
ui | 4px |
Corner radius of a part inside a component, and of inline code. A component's own radius is ui.border.radius. |
||
--norn-ui-focus-width |
ui | 2px |
Focus ring width. One ring on every focusable element. | ||
--norn-ui-focus-offset |
ui | 2px |
Gap between an element and its focus ring. An element the ring would clip draws it inset, at the negative of this. | ||
--norn-ui-state-hover |
ui | 8% |
Share of the text color mixed into the background while the pointer is over a control. | ||
--norn-ui-state-press |
ui | 12% |
Share of the text color mixed into the background while a control is pressed, and of the accent on a selected or current item. | ||
--norn-ui-motion-duration |
ui | 150ms |
Length of a state change, such as a hover layer. | ||
--norn-ui-motion-easing |
ui | cubic-bezier(0.2, 0, 0, 1) |
Easing for every transition. | ||
--norn-ui-motion-slide |
ui | 200ms |
|
Length of a selected state sliding to a new option, such as a checked segment or a selected tab. | |
--norn-ui-motion-trail |
ui | 90ms |
|
How far the trailing edge of a sliding selected state lags its leading edge, so the shape stretches as it moves. | |
--norn-ui-control-height |
ui | 2.25rem |
Height of a button, field, or tab. A component raises it to 2.75rem for a coarse pointer. | ||
--norn-ui-icon-s |
ui | 1em |
Icon size beside text. It follows the font size. | ||
--norn-ui-icon-m |
ui | 1.25rem |
Icon size beside a heading or a title. | ||
--norn-ui-shadow |
ui | 0 6px 20px light-dark(rgb(22 24 29 / 0.08), rgb(0 0 0 / 0.4)) |
Elevation shadow. For things that float, such as search results. | ||
--norn-surface-base |
surface | light-dark(#ffffff, #101216) |
|
Page surface. Light and dark values. | |
--norn-surface-raised |
surface | light-dark(hsl(40, 14%, 96%), #242932) |
|
Raised surface. | |
--norn-surface-code |
surface | light-dark(hsl(40, 14%, 94%), #2c313b) |
|
Code surface. | |
--norn-text-base |
text | light-dark(#16181d, #eceef3) |
|
Text color. | |
--norn-text-muted |
text | light-dark(#4b5160, #a4abba) |
|
Secondary text color. | |
--norn-text-accent |
text | light-dark(oklch(from color-mix(in oklch, var(--norn-ui-accent, #2346d4) 82%, black) min(l, 0.5) c h), oklch(from color-mix(in oklch, var(--norn-ui-accent, #2346d4) 55%, white) max(l, 0.72) c h)) |
|
The accent for text and links: darkened in light mode, lightened in dark mode. The lightness caps keep any accent at 4.5:1 or better. | |
--norn-text-on-accent |
text | color(from var(--norn-ui-accent, #2346d4) xyz-d65 calc(0.95047 * clamp(0, calc((0.1791 - y) * 1000000), 1)) clamp(0, calc((0.1791 - y) * 1000000), 1) calc(1.08883 * clamp(0, calc((0.1791 - y) * 1000000), 1))) |
|
Black or white text for an accent background, whichever contrasts more: at least 4.58:1. Switches at relative luminance 0.1791. | |
--norn-text-measure |
text | 40em |
Line length for prose. | ||
--norn-font-body |
font | ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif |
Body face. | ||
--norn-font-heading |
font | var(--norn-font-body, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif) |
Heading face. Follows the body face until the project sets one. | ||
--norn-font-mono |
font | ui-monospace, SFMono-Regular, Menlo, Consolas, monospace |
Code face. | ||
--norn-font-size-s |
font | 0.875rem |
Small text: captions, code, navigation, and notes. | ||
--norn-font-size-m |
font | 1rem |
Body text. | ||
--norn-font-size-l |
font | 1.25rem |
Lede, card title, and third-level heading. | ||
--norn-font-size-xl |
font | 1.5rem |
Second-level heading. Larger titles use a clamp. | ||
--norn-code-text |
code | var(--norn-text-base, light-dark(#16181d, #eceef3)) |
|
Plain code text, on --norn-surface-code. Follows the text color unless a project sets it. | |
--norn-code-punctuation |
code | var(--norn-text-muted, light-dark(#4b5160, #a4abba)) |
|
Code punctuation, on --norn-surface-code. Follows the muted text color unless a project sets it. | |
--norn-code-comment |
code | light-dark(#566070, #9aa3b5) |
|
Syntax color, measured against --norn-surface-code. | |
--norn-code-string |
code | light-dark(#0b6b3a, #7ed6a1) |
|
Syntax color, measured against --norn-surface-code. | |
--norn-code-keyword |
code | light-dark(#6b2fc2, #c4a3ff) |
|
Syntax color, measured against --norn-surface-code. | |
--norn-code-function |
code | light-dark(#1b4fc4, #8fb0ff) |
|
Syntax color, measured against --norn-surface-code. | |
--norn-code-number |
code | light-dark(#9a4a00, #ffb36b) |
|
Syntax color, measured against --norn-surface-code. | |
--norn-code-flag |
code | light-dark(#00687a, #5ccfe0) |
|
Syntax color for a command's flags, measured against --norn-surface-code. | |
--norn-space-2xs |
space | 0.25rem |
Smallest spacing step. | ||
--norn-space-xs |
space | 0.5rem |
Extra small spacing step. | ||
--norn-space-s |
space | 0.75rem |
Small spacing step. | ||
--norn-space-m |
space | 1.25rem |
Medium spacing step. | ||
--norn-space-l |
space | 2rem |
Large spacing step. | ||
--norn-space-xl |
space | 4rem |
Extra large spacing step. | ||
--norn-layout-width |
layout | 64rem |
Width of page content. | ||
--norn-status-info |
status | light-dark(#1b4fc4, #8fb0ff) |
|
Information. The color of a note or an information notice. | |
--norn-status-success |
status | light-dark(#0b6b3a, #7ed6a1) |
|
Success. The color of a tip, a success notice, and a copied mark. | |
--norn-status-warning |
status | light-dark(#9a4a00, #ffb36b) |
|
Warning. | |
--norn-status-danger |
status | light-dark(#b42318, #ff8a80) |
|
Danger. The color of a caution and an error. |