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

The theme's palette, including any colours set on the Appearance page.

TokenValue
--fz-color-pageThe page background.
--fz-color-surfaceCards, tables and other raised areas.
--fz-color-surface-2A slightly darker surface, for headers and hover.
--fz-color-surface-3A darker surface still, for inset areas and stripes.
--fz-color-overlayThe dimming behind a dialog or the drawer.
--fz-color-borderBorders and dividers.
--fz-color-border-strongThe borders of controls.
--fz-color-focusThe border of a focused control.
--fz-color-textBody text.
--fz-color-text-mutedSecondary text.
--fz-color-text-subtleTertiary text, such as placeholders.
--fz-color-accentThe main colour: primary buttons, links, selection.
--fz-color-accent-hoverThe accent, on hover.
--fz-color-accent-softA pale tint of the accent, for backgrounds.
--fz-color-accent-soft-2A slightly stronger tint of the accent.
--fz-color-accent-textAccent-coloured text, such as links.
--fz-color-on-accentText on an accent background.
--fz-color-successSuccess. With --fz-color-success-soft, a pale tint.
--fz-color-success-softA pale tint of success.
--fz-color-warningWarning.
--fz-color-warning-softA pale tint of warning.
--fz-color-dangerDanger, errors.
--fz-color-danger-softA pale tint of danger.
--fz-color-infoInformation.
--fz-color-info-softA 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.

TokenValue
--fz-font-sansThe main font.
--fz-font-headingThe secondary font, for headings and labels. The main font unless the Appearance page sets another.
--fz-font-monoA monospaced font.
--fz-text-xs0.75rem (12px)
--fz-text-xs-plus0.8125rem (13px). Formulize's own step; Lyris's content text.
--fz-text-sm0.875rem (14px)
--fz-text-sm-plus0.9375rem (15px). Formulize's own step; labels and field text at the Comfortable size.
--fz-text-base1rem (16px)
--fz-text-lg1.125rem (18px)
--fz-text-xl1.25rem (20px)
--fz-text-2xl1.5rem (24px)
--fz-text-3xl1.875rem (30px)
--fz-text-{xs,xs-plus,sm,sm-plus,base,lg,xl,2xl,3xl}--line-heightThe 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-normal400
--fz-font-weight-medium500
--fz-font-weight-semibold600
--fz-font-weight-bold700
--fz-leading-tight1.25
--fz-leading-snug1.375
--fz-leading-normal1.5
--fz-tracking-wide0.025em: slightly wider letter spacing.
--fz-tracking-wider0.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.

TokenValue
--fz-spacing0.25rem (4px).
--fz-container-2xl42rem, the narrow container.
--fz-container-6xl72rem, the container.
--fz-container-7xl80rem, the wide container.

Shape, depth and motion

Corner radii, shadows, the focus ring, and the timing of transitions.

TokenValue
--fz-radius-sm0.25rem (4px)
--fz-radius-md0.375rem (6px)
--fz-radius-lg0.5rem (8px)
--fz-radius-xl0.75rem (12px)
--fz-radius-fullFully round.
--fz-shadow-xsA hairline shadow.
--fz-shadow-smResting cards.
--fz-shadow-mdHovered cards.
--fz-shadow-lgFloating panels.
--fz-focus-ringThe keyboard focus ring, as a box-shadow.
--fz-ease-outThe easing curve for transitions.
--fz-duration-fast120ms, for small changes such as hover.
--fz-duration200ms.

Tuning properties

Custom properties you can set on an element, in a style attribute, to adjust a layout class or component.

TokenValue
--fz-auto-grid-minOn fz-auto-grid or fz-grid-list: the narrowest a column can be. 10rem.
--fz-sidebar-widthOn fz-with-sidebar: the width of the side. 16rem.
--fz-switcher-thresholdOn fz-switcher: the width below which its children stack. 32rem.
--fz-field-label-widthOn fz-field--horizontal: the width of the label. 12rem.
--fz-toneOn 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-softOn fz-badge or fz-callout: the pale tint that goes with --fz-tone.
--fz-code-block-max-heightOn 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.

TokenValue
--fz-gapSet by the layout classes and the fz-gap-* utilities.
--fz-gap-xSet by the fz-gap-x-* utilities.
--fz-gap-ySet by the fz-gap-y-* utilities.
--fz-auto-grid-maxSet 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.

TokenValue
--fz-title-textThe 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-narrowThe 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-weightThe weight of titles. Default 600. Can be 500, 600, 700.
--fz-title-leadingThe line height of titles that wrap. Default 1.25. Can be 1.25, 1.3, 1.375, 1.45.
--fz-label-textThe 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-weightThe weight of form field labels. Default 600, Compact 600, Comfortable 500. Can be 400, 500, 600, 700.
--fz-field-textThe 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-textThe 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-leadingThe 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-widthThe longest a line of help text can be. Default 65ch, Compact 70ch, Comfortable 62ch. Can be 45ch to 90ch.
--fz-control-textThe 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-textThe 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-textThe 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-heightThe 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-xThe 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-gapThe 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-gapThe 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-gapThe 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-gapThe 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-heightThe 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-xThe 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-heightThe 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-yThe 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-xThe 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-heightThe 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-xThe 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-heightThe 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-heightThe 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-xThe 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-paddingThe 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-gapThe 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-paddingThe 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-xThe 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-yThe 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-paddingThe 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-heightThe 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.
Example
<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.

TokenValue
--fz-title-fontThe font of form card, list and drawer titles. Default var(--fz-font-heading). Can be the main font or the secondary font.
--fz-label-fontThe font of field labels. Default var(--fz-font-heading). Can be the main font or the secondary font.
--fz-field-fontThe 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-fontThe font of help text under fields. Default var(--fz-font-sans). Can be the main font or the secondary font.
--fz-control-fontThe font of buttons, page tabs, menus and toolbars. Default var(--fz-font-sans). Can be the main font or the secondary font.
--fz-table-fontThe 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-fontThe font of column headings. Default var(--fz-font-sans). Can be the main font or the secondary font.
--fz-title-colorThe colour of titles. Default var(--fz-color-text). Can be any of the site's colours, or a colour of its own.
--fz-label-colorThe 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-colorThe 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-colorThe 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-colorThe 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-colorThe 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-bgThe 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-borderThe 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-accentThe 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-bgThe 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-borderThe 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-textThe 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-bgThe 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-borderThe 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-bgThe 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-hoverFollows --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-textThe 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-textThe 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-bgThe 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-borderThe 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-bgThe 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-textThe 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-textThe 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-bgThe 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-bgThe 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-textThe 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-bgThe 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-borderThe 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-textThe 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-bgThe 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-hoverThe 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-borderThe line between rows. Default var(--fz-color-border). Can be any of the site's colours, or a colour of its own.
--fz-card-bgThe background of cards. Default var(--fz-color-surface). Can be any of the site's colours, or a colour of its own.
--fz-card-borderThe border of cards. Default var(--fz-color-border). Can be any of the site's colours, or a colour of its own.
--fz-drawer-bgThe 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-bgThe 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-radiusThe corner radius of text boxes, dropdowns and text areas. Default 6px. Can be 0px to 16px.
--fz-button-radiusThe corner radius of buttons. Default 6px. Can be 0px to 16px, or fully rounded.
--fz-tab-radiusThe corner radius of page tabs. Default 999px. Can be 0px to 16px, or fully rounded.
--fz-form-radiusThe corner radius of form cards. Default 8px. Can be 0px to 16px.
--fz-card-radiusThe corner radius of cards. Default 8px. Can be 0px to 16px.
--fz-menu-radiusThe 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).
Example
<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>