Design Tokens
NightCSS exposes its entire design system as --nc-* custom properties on :root.
Override any of them to re-theme the foundation at runtime — no rebuild, no config.
The semantic color tokens use light-dark(), so a single value expresses both the
light and dark palette, and the theme follows the operating system’s color-scheme
by default. The named palette is static and lives alongside them.
Semantic colors are the default theme. The named palette sits below and
is exposed for the bg-* / clr-* / fill-* utilities. The ring token aliases
the accent by default.
| Token | Purpose |
|---|---|
--nc-accent |
Brand and interactive color |
--nc-accent-contrast |
Text/icon color on the accent |
--nc-surface |
Page background |
--nc-surface-raised |
Raised surfaces (cards, code, pre) |
--nc-text |
Primary text |
--nc-text-muted |
Secondary text |
--nc-border |
Borders and dividers |
--nc-ring |
Focus ring (defaults to --nc-accent) |
Named palette
Section titled “Named palette”The named palette is exposed as tokens for the bg-* / clr-* / fill-*
utilities. Basic colours and grays are static; the theme aliases point at them, so
redefining --nc-pine retints --nc-primary.
| Group | Tokens |
|---|---|
| Basic | --nc-red, --nc-pink, --nc-orange, --nc-yellow, --nc-green, --nc-brown, --nc-teal, --nc-cyan, --nc-blue, --nc-pine |
| Grays | --nc-white, --nc-gray-1 … --nc-gray-10, --nc-black |
| Theme | --nc-primary, --nc-secondary, --nc-success, --nc-info, --nc-warning, --nc-danger, --nc-light, --nc-dark |
Gradients
Section titled “Gradients”| Token | Shape |
|---|---|
--nc-gradient-primary-success |
145deg, primary → success |
--nc-gradient-primary-light-3-primary |
top → bottom, primary → light primary |
--nc-gradient-red-yellow-blue |
left → right, red → yellow → blue |
--nc-gradient-info-transparent |
90deg, info → transparent |
The stops reference palette tokens, so one override re-tints the gradient. See Color and Gradients for the classes.
Typography
Section titled “Typography”The type scale is fluid: every step is a clamp() that grows smoothly with the
viewport instead of jumping at breakpoints.
| Token | Value |
|---|---|
--nc-font-sans |
system-ui, -apple-system, "Segoe UI", Roboto, … |
--nc-font-mono |
ui-monospace, SFMono-Regular, "SF Mono", Menlo, … |
--nc-text-xs … --nc-text-4xl |
Fluid clamp() type scale |
--nc-leading-none … --nc-leading-loose |
Line heights 1 … 2 |
--nc-tracking-tighter … --nc-tracking-widest |
Letter spacing -0.05em … 0.1em |
--nc-weight-normal … --nc-weight-bold |
Font weights 400, 500, 600, 700 |
--nc-line-height-1/25/50/75/2 |
Line heights 1, 1.25, 1.5, 1.75, 2 |
--nc-font-base, --nc-font-headings, --nc-font-displays |
Alias the sans stack; override to load display faces |
text-4xltext-3xltext-2xltext-xltext-lgtext-basetext-smtext-xsUsage and pairing guidance: Type Scale.
A 4px step scale, 0 through 24.
| Token | Value |
|---|---|
--nc-space-1 |
0.25rem |
--nc-space-4 |
1rem |
--nc-space-8 |
2rem |
--nc-space-12 |
3rem |
--nc-space-24 |
6rem |
space-1space-2space-3space-4space-8space-12space-24Each step is 0.25rem at the default root size. Use the number that matches the
rhythm, not the one that “looks about right”: space-4 is 1rem, space-8 is
2rem, space-12 is 3rem.
Radius
Section titled “Radius”| Token | Value |
|---|---|
--nc-radius-none |
0 |
--nc-radius-sm |
0.25rem |
--nc-radius-md |
0.5rem |
--nc-radius-lg |
1rem |
--nc-radius-xl |
1.5rem |
--nc-radius-full |
9999px |
--nc-radius-zero |
0 |
--nc-radius-small |
4px |
--nc-radius-base |
8px |
--nc-radius-large |
20px |
--nc-radius-circle |
100% |
How to combine radius with borders, shadows, and media: Border, Radius, and Shadow.
Shadow
Section titled “Shadow”| Token | Value |
|---|---|
--nc-shadow-xs |
0 1px 2px rgb(0 0 0 / 0.05) |
--nc-shadow-sm |
0 1px 3px rgb(0 0 0 / 0.1), 0 1px 2px rgb(0 0 0 / 0.06) |
--nc-shadow-md |
0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1) |
--nc-shadow-lg |
0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1) |
--nc-shadow-level-1 … --nc-shadow-level-5 |
Five-level elevation ladder |
The default shadows are neutral black. On dark surfaces, pair them with a border or override the token; see Shadow.
Motion
Section titled “Motion”Durations collapse to near-zero under prefers-reduced-motion: reduce, so anything
built on these tokens respects the user’s preference automatically.
| Token | Value |
|---|---|
--nc-duration-fast / --nc-duration-base / --nc-duration-slow |
150ms / 250ms / 400ms |
--nc-ease-standard |
cubic-bezier(0.4, 0, 0.2, 1) |
--nc-ease-emphasized |
cubic-bezier(0, 0, 0.2, 1) |
--nc-speed-shortest … --nc-speed-lazy |
150ms … 750ms, duration ladder |
--nc-timing-linear, --nc-timing-standard, --nc-timing-sharp, … |
The ten easing curves |
The speed tokens collapse under prefers-reduced-motion, like the duration tokens.
Transition and animation patterns: Motion.
Z-index
Section titled “Z-index”| Token | Value |
|---|---|
--nc-z-base |
0 |
--nc-z-dropdown |
1000 |
--nc-z-sticky |
1020 |
--nc-z-overlay |
1040 |
--nc-z-modal |
1060 |
--nc-z-toast |
1080 |
Breakpoints
Section titled “Breakpoints”Media queries cannot read custom properties, so these reference tokens exist for tooling and documentation, and as the single source of truth for the layout primitives and Sass breakpoint mixins.
| Token | Value |
|---|---|
--nc-breakpoint-sm |
640px |
--nc-breakpoint-md |
768px |
--nc-breakpoint-lg |
1024px |
--nc-breakpoint-xl |
1280px |
--nc-breakpoint-2xl |
1536px |