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 and the Appearance page: color: var(--fz-color-text-muted). Sizes are given at the default settings; they are in rem, so they grow with the browser's font size.
- Colour
- Type
- Spacing and sizes
- Shape, depth and motion
- Tuning properties
- Set by the classes
- Component sizes
- Component fonts, colours and corners
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 and sm-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-sm-plus | 0.9375rem (15px). Formulize's own step; labels and field text at the Comfortable size. |
--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.375rem for sm-plus, 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 |
--fz-tracking-wide | 0.025em: slightly wider letter spacing. |
--fz-tracking-wider | 0.05em: wider letter spacing, for small capitals. |
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. It is fixed, like the text sizes: the Appearance page's looks change the component sizes, not the step.
| Token | Value |
|---|---|
--fz-spacing | 0.25rem (4px). |
--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. |
--fz-tone | On fz-badge, fz-callout, fz-bar-list__row, fz-progress or fz-matrix__cell: the colour, for a tone of your own when none of the tone modifiers is the right one, such as the steps of a scale. Set it in a style attribute, or in a class of your own. Set --fz-tone-soft with it on a badge or a callout. |
--fz-tone-soft | On fz-badge or fz-callout: the pale tint that goes with --fz-tone. |
--fz-code-block-max-height | On fz-code-block: the tallest it can be, after which it scrolls. No limit unless it is set. |
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. |
Component sizes
The sizes of the parts of the interface: titles, labels and field text, the heights of fields, buttons and list rows, and the space in forms, cards and the drawer. The components use them. The Appearance page's looks (Default, Compact, Comfortable, and any made in its advanced editor) change them. Steps are spacing steps, 4px each at the default settings.
| Token | Value |
|---|---|
--fz-title-text | The size of form card, drawer and list titles. Default xl (20px), Compact lg (18px), Comfortable xl (20px). Can be base (16px), lg (18px), xl (20px), 2xl (24px). |
--fz-title-text-narrow | The size of titles at 768px wide and below. Default base (16px), Compact base (16px), Comfortable lg (18px). Can be sm (14px), base (16px), lg (18px), xl (20px). |
--fz-title-weight | The weight of titles. Default 600. Can be 500, 600, 700. |
--fz-title-leading | The line height of titles that wrap. Default 1.25. Can be 1.25, 1.3, 1.375, 1.45. |
--fz-label-text | The size of form field labels. Default sm (14px), Compact xs-plus (13px), Comfortable sm-plus (15px). Can be xs (12px), xs-plus (13px), sm (14px), sm-plus (15px), base (16px). |
--fz-label-weight | The weight of form field labels. Default 600, Compact 600, Comfortable 500. Can be 400, 500, 600, 700. |
--fz-field-text | The size of the text in form fields, and of read-only values. Default sm (14px), Compact sm (14px), Comfortable sm-plus (15px). Can be xs-plus (13px), sm (14px), sm-plus (15px), base (16px). |
--fz-help-text | The size of the help text under form fields, and of character counters. Default xs-plus (13px), Compact xs (12px), Comfortable xs-plus (13px). Can be xs (12px), xs-plus (13px), sm (14px). |
--fz-help-leading | The line height of help text. Default 1.5, Compact 1.45, Comfortable 1.5. Can be 1.375, 1.45, 1.5, 1.625. |
--fz-help-max-width | The longest a line of help text can be. Default 65ch, Compact 70ch, Comfortable 62ch. Can be 45ch to 90ch. |
--fz-control-text | The size of the text on buttons, menu items and tabs. Default xs-plus (13px), Compact xs-plus (13px), Comfortable sm (14px). Can be xs (12px), xs-plus (13px), sm (14px), sm-plus (15px). |
--fz-table-text | The size of the text in list and table cells. Default xs-plus (13px), Compact xs-plus (13px), Comfortable sm (14px). Can be xs (12px), xs-plus (13px), sm (14px), sm-plus (15px). |
--fz-table-header-text | The size of the column headings in lists and tables. Default xs (12px), Compact xs (12px), Comfortable xs-plus (13px). Can be xs (12px), xs-plus (13px), sm (14px). |
--fz-field-height | The height of text inputs and dropdowns. Text areas start at 2.4 times this. Default 9.5 steps (38px), Compact 8.5 steps (34px), Comfortable 10.5 steps (42px). Can be 7 steps (28px) to 14 steps (56px). |
--fz-field-padding-x | The space between the edge of a form field and its text. Default 3 steps (12px), Compact 2.5 steps (10px), Comfortable 3.5 steps (14px). Can be 1.5 steps (6px) to 6 steps (24px). |
--fz-field-gap | The space between one form field and the next, in forms and in the drawer. Default 5.5 steps (22px), Compact 3.5 steps (14px), Comfortable 6.5 steps (26px). Can be 2 steps (8px) to 12 steps (48px). |
--fz-label-gap | The space between a label and its field, when the label is above the field. Default 1.5 steps (6px), Compact 1 step (4px), Comfortable 2 steps (8px). Can be 0.5 steps (2px) to 4 steps (16px). |
--fz-help-gap | The space between a field and its help text. Default 1.5 steps (6px), Compact 1 step (4px), Comfortable 2 steps (8px). Can be 0 steps (0px) to 4 steps (16px). |
--fz-option-gap | The space between the radio buttons or checkboxes of one field, when each is on a line of its own. Default 0.5 steps (2px), Compact 0 steps (0px), Comfortable 1 step (4px). Can be 0 steps (0px) to 4 steps (16px). |
--fz-control-height | The height of buttons, including the save and submit buttons on forms. Default 8 steps (32px), Compact 7 steps (28px), Comfortable 9 steps (36px). Can be 6 steps (24px) to 12 steps (48px). |
--fz-control-padding-x | The space between the edge of a button and its label. Default 3 steps (12px), Compact 2.5 steps (10px), Comfortable 3.5 steps (14px). Can be 1.5 steps (6px) to 6 steps (24px). |
--fz-menu-item-height | The height of each item in a dropdown menu. Default 7.5 steps (30px), Compact 7 steps (28px), Comfortable 8.5 steps (34px). Can be 6 steps (24px) to 12 steps (48px). |
--fz-tab-padding-y | The space above and below the label of a tab. Default 1 step (4px), Compact 0.5 steps (2px), Comfortable 1.5 steps (6px). Can be 0 steps (0px) to 3 steps (12px). |
--fz-tab-padding-x | The space either side of the label of a tab. Default 3 steps (12px), Compact 2.5 steps (10px), Comfortable 3.5 steps (14px). Can be 1.5 steps (6px) to 6 steps (24px). |
--fz-row-height | The height of rows in lists and tables. Rows grow to fit text that wraps. Default 10 steps (40px), Compact 8 steps (32px), Comfortable 13 steps (52px). Can be 6 steps (24px) to 16 steps (64px). |
--fz-cell-padding-x | The space either side of the content of a list or table cell. Default 3 steps (12px), Compact 2 steps (8px), Comfortable 4 steps (16px). Can be 1 step (4px) to 6 steps (24px). |
--fz-table-header-height | The height of the row of column headings. Default 9 steps (36px), Compact 8 steps (32px), Comfortable 10 steps (40px). Can be 6 steps (24px) to 14 steps (56px). |
--fz-toolbar-height | The height of a list's title bar and selection bar. Default 14 steps (56px), Compact 13 steps (52px), Comfortable 16 steps (64px). Can be 10 steps (40px) to 20 steps (80px). |
--fz-toolbar-padding-x | The space either side of a list's title bar, selection bar and footer, and of a form's action bar. Default 5 steps (20px), Compact 4 steps (16px), Comfortable 6 steps (24px). Can be 2 steps (8px) to 10 steps (40px). |
--fz-card-padding | The space inside a card, and above and below a form card's header. Default 4 steps (16px), Compact 3 steps (12px), Comfortable 5 steps (20px). Can be 2 steps (8px) to 10 steps (40px). |
--fz-card-gap | The space between the things in a card. Default 3 steps (12px), Compact 2 steps (8px), Comfortable 4 steps (16px). Can be 1 step (4px) to 8 steps (32px). |
--fz-form-padding | The space inside a form card, and either side of its header. Default 6 steps (24px), Compact 4 steps (16px), Comfortable 8 steps (32px). Can be 2 steps (8px) to 12 steps (48px). |
--fz-drawer-padding-x | The space either side of the drawer's content. Default 5 steps (20px), Compact 4 steps (16px), Comfortable 6 steps (24px). Can be 2 steps (8px) to 10 steps (40px). |
--fz-drawer-padding-y | The space above and below the drawer's header and footer. Default 4 steps (16px), Compact 3 steps (12px), Comfortable 5 steps (20px). Can be 2 steps (8px) to 8 steps (32px). |
--fz-page-padding | The space around the main content of the page: around every screen, whatever its type, and around simple pages such as the login page. Default 5 steps (20px), Compact 4 steps (16px), Comfortable 6 steps (24px). Can be 2 steps (8px) to 12 steps (48px). |
--fz-topbar-height | The height of the bar across the top of every page. The logo in it grows and shrinks with it. Default 12 steps (48px). Can be 10 steps (40px) to 30 steps (120px). |
- Use them in your own CSS so it matches the components and follows the site's look:
gap: var(--fz-field-gap),height: var(--fz-control-height). - To change a size for one part of a page, set the token on its container, in a style attribute. Everything inside uses that size; the rest of the page keeps the site's.
<div class="fz-auto-grid fz-auto-grid--max-2">
<table class="fz-table">
<thead><tr><th>Name</th><th>Grade</th></tr></thead>
<tbody><tr><td>Ada</td><td>7</td></tr><tr><td>Grace</td><td>8</td></tr></tbody>
</table>
<table class="fz-table" style="--fz-row-height: calc(var(--fz-spacing) * 8)">
<thead><tr><th>Name</th><th>Grade</th></tr></thead>
<tbody><tr><td>Ada</td><td>7</td></tr><tr><td>Grace</td><td>8</td></tr></tbody>
</table>
</div>Component fonts, colours and corners
Which font each kind of text is set in, the colours of the parts of the interface, and their corners. The components use them. Each follows a site-wide setting from the Appearance page (the main or secondary font, one of the colours) until the Appearance page's advanced editor gives that part its own.
| Token | Value |
|---|---|
--fz-title-font | The font of form card, list and drawer titles. Default var(--fz-font-heading). Can be the main font or the secondary font. |
--fz-label-font | The font of field labels. Default var(--fz-font-heading). Can be the main font or the secondary font. |
--fz-field-font | The font of what is typed in fields, read-only values and choice options. Default var(--fz-font-sans). Can be the main font or the secondary font. |
--fz-help-font | The font of help text under fields. Default var(--fz-font-sans). Can be the main font or the secondary font. |
--fz-control-font | The font of buttons, page tabs, menus and toolbars. Default var(--fz-font-sans). Can be the main font or the secondary font. |
--fz-table-font | The font of the text in list and table rows. Default var(--fz-font-sans). Can be the main font or the secondary font. |
--fz-table-header-font | The font of column headings. Default var(--fz-font-sans). Can be the main font or the secondary font. |
--fz-title-color | The colour of titles. Default var(--fz-color-text). Can be any of the site's colours, or a colour of its own. |
--fz-label-color | The colour of field labels. Default var(--fz-color-text). Can be any of the site's colours, or a colour of its own. |
--fz-required-color | The colour of the * after a required field's label. Default var(--fz-color-danger). Can be any of the site's colours, or a colour of its own. |
--fz-field-color | The colour of what is typed in fields, and of choice options. Default var(--fz-color-text). Can be any of the site's colours, or a colour of its own. |
--fz-value-color | The colour of read-only values. Default var(--fz-color-text). Can be any of the site's colours, or a colour of its own. |
--fz-help-color | The colour of help text. Default var(--fz-color-text-muted). Can be any of the site's colours, or a colour of its own. |
--fz-field-bg | The background of text boxes, dropdowns and text areas. Default var(--fz-color-surface). Can be any of the site's colours, or a colour of its own. |
--fz-field-border | The border of text boxes, dropdowns and text areas. Default var(--fz-color-border-strong). Can be any of the site's colours, or a colour of its own. |
--fz-option-accent | The colour of a chosen radio button or checkbox. Default var(--fz-color-accent). Can be any of the site's colours, or a colour of its own. |
--fz-form-bg | The background of form cards. Default var(--fz-color-surface). Can be any of the site's colours, or a colour of its own. |
--fz-form-border | The border of form cards, and the line under their titles. Default var(--fz-color-border). Can be any of the site's colours, or a colour of its own. |
--fz-button-text | The text of buttons, other than the main one. Default var(--fz-color-text). Can be any of the site's colours, or a colour of its own. |
--fz-button-bg | The background of buttons, other than the main one. Default var(--fz-color-surface). Can be any of the site's colours, or a colour of its own. |
--fz-button-border | The border of buttons, other than the main one. Default var(--fz-color-border-strong). Can be any of the site's colours, or a colour of its own. |
--fz-button-primary-bg | The background of the main button, such as Save or Add. Its hover colour is a darker shade of it. Default var(--fz-color-accent). Can be any of the site's colours, or a colour of its own. |
--fz-button-primary-hover | Follows --fz-button-primary-bg: color-mix(in srgb, its value 85%, #000) when it is set. Default var(--fz-color-accent-hover). |
--fz-button-primary-text | The text of the main button. Default var(--fz-color-on-accent). Can be any of the site's colours, or a colour of its own. |
--fz-tab-text | The text of the tabs that aren't selected. Default var(--fz-color-text-muted). Can be any of the site's colours, or a colour of its own. |
--fz-tab-bg | The background of the tabs that aren't selected. Default var(--fz-color-surface). Can be any of the site's colours, or a colour of its own. |
--fz-tab-border | The border of the tabs that aren't selected. Default var(--fz-color-border). Can be any of the site's colours, or a colour of its own. |
--fz-tab-active-bg | The background of the tab for the page being shown. Default var(--fz-color-accent). Can be any of the site's colours, or a colour of its own. |
--fz-tab-active-text | The text of the tab for the page being shown. Default var(--fz-color-on-accent). Can be any of the site's colours, or a colour of its own. |
--fz-menu-text | The text of menu items. Default var(--fz-color-text). Can be any of the site's colours, or a colour of its own. |
--fz-menu-bg | The background of dropdown menus. Default var(--fz-color-surface). Can be any of the site's colours, or a colour of its own. |
--fz-toolbar-bg | The background of a list's title bar and footer, and of a form's action bar. Default var(--fz-color-surface). Can be any of the site's colours, or a colour of its own. |
--fz-header-text | The text of column headings. Default var(--fz-color-text-muted). Can be any of the site's colours, or a colour of its own. |
--fz-header-bg | The background of column headings. Default var(--fz-color-surface-2). Can be any of the site's colours, or a colour of its own. |
--fz-header-border | The line under the column headings. Default var(--fz-color-border-strong). Can be any of the site's colours, or a colour of its own. |
--fz-row-text | The text in list and table rows. Default var(--fz-color-text). Can be any of the site's colours, or a colour of its own. |
--fz-row-bg | The background of list and table rows. Default var(--fz-color-surface). Can be any of the site's colours, or a colour of its own. |
--fz-row-hover | The background of the row the pointer is over. Default var(--fz-color-surface-2). Can be any of the site's colours, or a colour of its own. |
--fz-row-border | The line between rows. Default var(--fz-color-border). Can be any of the site's colours, or a colour of its own. |
--fz-card-bg | The background of cards. Default var(--fz-color-surface). Can be any of the site's colours, or a colour of its own. |
--fz-card-border | The border of cards. Default var(--fz-color-border). Can be any of the site's colours, or a colour of its own. |
--fz-drawer-bg | The background of the drawer. Default var(--fz-color-surface). Can be any of the site's colours, or a colour of its own. |
--fz-drawer-foot-bg | The background of the drawer's button bar. Default var(--fz-color-surface-2). Can be any of the site's colours, or a colour of its own. |
--fz-field-radius | The corner radius of text boxes, dropdowns and text areas. Default 6px. Can be 0px to 16px. |
--fz-button-radius | The corner radius of buttons. Default 6px. Can be 0px to 16px, or fully rounded. |
--fz-tab-radius | The corner radius of page tabs. Default 999px. Can be 0px to 16px, or fully rounded. |
--fz-form-radius | The corner radius of form cards. Default 8px. Can be 0px to 16px. |
--fz-card-radius | The corner radius of cards. Default 8px. Can be 0px to 16px. |
--fz-menu-radius | The corner radius of dropdown menus. Default 8px. Can be 0px to 12px. |
- Use them in your own CSS so it matches the components:
background: var(--fz-button-primary-bg),border-radius: var(--fz-field-radius),font-family: var(--fz-label-font).
<div class="fz-cluster">
<button type="button" class="fz-btn fz-btn--primary">Save</button>
<button type="button" class="fz-btn fz-btn--primary" style="--fz-button-primary-bg: var(--fz-color-success); --fz-button-primary-hover: var(--fz-color-success); --fz-button-radius: var(--fz-radius-full)">Approve</button>
</div>