Skip to content

Type to search the docs, API, and blog.

↑↓ navigate↵ openesc close
Zazz 0.7 alpha
API navigation

API

Backgrounds

Background color, alpha, and gradients.

--bg is the color; --bg-alpha multiplies into its alpha without touching the text. A gradient pairs a type with its stops: --bg-linear: to bottom in oklch; --bg-stops: var(--color-shade-600), transparent 20%. --bg: none clears the color and any gradient, at the base or a state.

Reference

Backgrounds utilities
UtilityWritesValueTiersNotes
--bgbackground-colorcolor, or none (clears the color and any gradient)breakpoints, statesworks tier-only; --before-bg / --after-bg
--bg-alphaalpha of --bg0 to 1, multiplied into --bg's alphabreakpoints, states
--bg-linearbackground-image (linear-gradient)gradient prelude: direction, in <color-space>—
--bg-radialbackground-image (radial-gradient)gradient prelude: shape, position, in <color-space>—
--bg-conicbackground-image (conic-gradient)gradient prelude: from <angle>, at <position>—
--bg-stopsthe gradient's color stopscomma-separated color stops—