Tokens
Tokens are the CSS custom properties that hold the design's values. Use them in your own CSS and style attributes instead of fixed values, so your styles follow the theme, the Appearance page and the density: color: var(--fz-color-text-muted). Sizes are given at the default settings; they are in rem, so they grow with the Appearance page's Text and interface size setting.
Colour
The theme's palette, including any colours set on the Appearance page.
| Token | Value |
|---|---|
--fz-color-page | The page background. |
--fz-color-surface | Cards, tables and other raised areas. |
--fz-color-surface-2 | A slightly darker surface, for headers and hover. |
--fz-color-surface-3 | A darker surface still, for inset areas and stripes. |
--fz-color-overlay | The dimming behind a dialog or the drawer. |
--fz-color-border | Borders and dividers. |
--fz-color-border-strong | The borders of controls. |
--fz-color-focus | The border of a focused control. |
--fz-color-text | Body text. |
--fz-color-text-muted | Secondary text. |
--fz-color-text-subtle | Tertiary text, such as placeholders. |
--fz-color-accent | The main colour: primary buttons, links, selection. |
--fz-color-accent-hover | The accent, on hover. |
--fz-color-accent-soft | A pale tint of the accent, for backgrounds. |
--fz-color-accent-soft-2 | A slightly stronger tint of the accent. |
--fz-color-accent-text | Accent-coloured text, such as links. |
--fz-color-on-accent | Text on an accent background. |
--fz-color-success | Success. With --fz-color-success-soft, a pale tint. |
--fz-color-success-soft | A pale tint of success. |
--fz-color-warning | Warning. |
--fz-color-warning-soft | A pale tint of warning. |
--fz-color-danger | Danger, errors. |
--fz-color-danger-soft | A pale tint of danger. |
--fz-color-info | Information. |
--fz-color-info-soft | A pale tint of information. |
Type
Fonts, text sizes (each with a line height), weights and line heights. The sizes are Tailwind's, plus xs-plus.
| Token | Value |
|---|---|
--fz-font-sans | The main font. |
--fz-font-heading | The secondary font, for headings and labels. The main font unless the Appearance page sets another. |
--fz-font-mono | A monospaced font. |
--fz-text-xs | 0.75rem (12px) |
--fz-text-xs-plus | 0.8125rem (13px). Formulize's own step; Lyris's content text. |
--fz-text-sm | 0.875rem (14px) |
--fz-text-base | 1rem (16px) |
--fz-text-lg | 1.125rem (18px) |
--fz-text-xl | 1.25rem (20px) |
--fz-text-2xl | 1.5rem (24px) |
--fz-text-3xl | 1.875rem (30px) |
--fz-text-{xs, | The line height that goes with each size, as in Tailwind: 1rem for xs, 1.25rem for xs-plus and sm, 1.5rem for base, and so on. |
--fz-font-weight-normal | 400 |
--fz-font-weight-medium | 500 |
--fz-font-weight-semibold | 600 |
--fz-font-weight-bold | 700 |
--fz-leading-tight | 1.25 |
--fz-leading-snug | 1.375 |
--fz-leading-normal | 1.5 |
Spacing and sizes
One step that every space and size is a multiple of, as in Tailwind: calc(var(--fz-spacing) * 4) is 1rem, 16px. The density changes the step, so everything built on it follows.
| Token | Value |
|---|---|
--fz-spacing | 0.25rem (4px) at standard density; 3.5px at tight, 4.5px at comfortable. |
--fz-control-height | Buttons: 8 steps, 32px. |
--fz-field-height | Form fields: 9.5 steps, 38px. |
--fz-row-height | Table rows: 10 steps, 40px. |
--fz-container-2xl | 42rem, the narrow container. |
--fz-container-6xl | 72rem, the container. |
--fz-container-7xl | 80rem, the wide container. |
Shape, depth and motion
Corner radii, shadows, the focus ring, and the timing of transitions.
| Token | Value |
|---|---|
--fz-radius-sm | 0.25rem (4px) |
--fz-radius-md | 0.375rem (6px) |
--fz-radius-lg | 0.5rem (8px) |
--fz-radius-xl | 0.75rem (12px) |
--fz-radius-full | Fully round. |
--fz-shadow-xs | A hairline shadow. |
--fz-shadow-sm | Resting cards. |
--fz-shadow-md | Hovered cards. |
--fz-shadow-lg | Floating panels. |
--fz-focus-ring | The keyboard focus ring, as a box-shadow. |
--fz-ease-out | The easing curve for transitions. |
--fz-duration-fast | 120ms, for small changes such as hover. |
--fz-duration | 200ms. |
Tuning properties
Custom properties you can set on an element, in a style attribute, to adjust a layout class or component.
| Token | Value |
|---|---|
--fz-auto-grid-min | On fz-auto-grid or fz-grid-list: the narrowest a column can be. 10rem. |
--fz-sidebar-width | On fz-with-sidebar: the width of the side. 16rem. |
--fz-switcher-threshold | On fz-switcher: the width below which its children stack. 32rem. |
--fz-field-label-width | On fz-field--horizontal: the width of the label. 12rem. |
Set by the classes
Custom properties the classes set for their own use. Don't set these yourself: use the classes that set them.
| Token | Value |
|---|---|
--fz-gap | Set by the layout classes and the fz-gap-* utilities. |
--fz-gap-x | Set by the fz-gap-x-* utilities. |
--fz-gap-y | Set by the fz-gap-y-* utilities. |
--fz-auto-grid-max | Set by the --max-N modifiers of fz-auto-grid and fz-grid-list. |
--fz-tone | Set by the tone modifiers of fz-badge and fz-callout. |
--fz-tone-soft | Set by the tone modifiers of fz-badge and fz-callout. |
Density
How much space there is, and how tall buttons, form fields and table rows are. The Appearance page sets it for the whole site; these classes set it for one part of a page.
| Class | What it does |
|---|---|
fz-density-tight | Less space and shorter controls: fits more on the screen. |
fz-density-standard | The default. |
fz-density-comfortable | More space and taller controls: easier to read and to tap. |
Example
<div class="fz-auto-grid fz-auto-grid--max-3">
<div class="fz-card fz-density-tight">
<p class="fz-card__title">Tight</p>
<div class="fz-cluster"><button type="button" class="fz-btn fz-btn--primary">Save</button><button type="button" class="fz-btn">Cancel</button></div>
</div>
<div class="fz-card fz-density-standard">
<p class="fz-card__title">Standard</p>
<div class="fz-cluster"><button type="button" class="fz-btn fz-btn--primary">Save</button><button type="button" class="fz-btn">Cancel</button></div>
</div>
<div class="fz-card fz-density-comfortable">
<p class="fz-card__title">Comfortable</p>
<div class="fz-cluster"><button type="button" class="fz-btn fz-btn--primary">Save</button><button type="button" class="fz-btn">Cancel</button></div>
</div>
</div>