Brand color, font and text size
The brand color, the font and the text size are custom properties like all the others. The base stylesheets declare them. The theme stylesheet that WL_STYLESHEET names loads after the base stylesheets and overrides them, as Create a theme for the web app describes, and so does the preset that an admin applies (Theme presets).
| Property | Declared in | Value |
|---|---|---|
--color-main-100 | tokens.css | #0086bf, FINOS Dark Blue, which is the brand color. |
--color-main-50 | tokens.css | #00b5e2, FINOS Light Blue. |
--color-main-200 | tokens.css | #005e8a, the darker step. |
--color-main-contrast | tokens.css | var(--color-light-100), the color of text on brand-colored controls. |
--brand-main, --brand-lighter and --brand-darker | index.css | var(--color-main-100), var(--color-main-50) and var(--color-main-200). |
--font-family | index.css | "Montserrat". |
--text-scale | index.css | 1, and 1.25 while <html> has data-font-size="large". |
--radius | index.css | 0.5rem. |
The brand color
The three brand steps hold the colors exactly as FINOS supplies them, and they are independent of each other. Changing --color-main-100 alone leaves the other two steps as they are. A theme that has a brand color of its own therefore sets all three steps. It can derive the two shades from its brand color with color-mix, which is what the theme editor prints:
:root {
--color-main-100: <hex-color>;
--color-main-50: color-mix(in srgb, var(--color-main-100) 70%, white);
--color-main-200: color-mix(in srgb, var(--color-main-100) 70%, black);
--color-main-contrast: var(--color-light-100);
}
The first color-mix moves the color 30% of the way to white, and the second multiplies each channel by 0.7. The three --brand-* aliases follow the three steps.
The property --color-main-contrast is separate because CSS cannot choose between light and dark text for a given background. A theme that makes the brand color light sets --color-main-contrast to a dark color, such as var(--color-light-700). The properties --btn-primary-label, --tab-filled-primary-text-active and --copilot-mention-label read it.
Components read the shades through the main color utilities, such as bg-main-100, and through the brand utilities, which are bg-brand-main, bg-brand-lighter and bg-brand-darker.
The font
The file index.css sets the font of :root to var(--font-family) followed by system-ui, and it sets the font of body to var(--font-family) followed by sans-serif. The Tailwind class font-wl uses the same property. The app ships Montserrat, which it declares with @font-face, as Selectors lists. Any other family name works only on devices that have that font installed.
The text scale
The user's Font size setting is either medium or large, and the app writes it to the data-font-size attribute of <html>. The rule :root[data-font-size="large"] sets --text-scale to 1.25.
The property --text-scale multiplies the font size of every Tailwind text size, from text-2xs to text-9xl. It also multiplies the font size and the line height of the typography classes title-*, subtitle-* and body-*. A rule that gives a size in fixed units does not scale.
Radius
The class rounded-lg is var(--radius), rounded-md is that value minus 2px, and rounded-sm is that value minus 4px.
The theme editor
Users of type Admin change these properties on Admin → Theme → Presets, where the Brand group lists the brand colors, the contrast color, the font and the radius. The button "Derive from brand color" sets the two shades and the contrast color from the brand color. The shades are the color-mix declarations above, and the contrast value depends on the relative luminance of the color: it is var(--color-light-700) above 0.22 and var(--color-light-100) otherwise. Theme presets describes the editor.
Properties of index.css
The table below lists the starting values of these properties and the places that read them. It is generated from the stylesheet and the frontend source.
| Property | Value | Used |
|---|---|---|
--text-scale | Light 1Dark as light | 48 rules or scripts read it directly |
--brand-main | Light var(--color-main-100)Dark as light |
General/EmptyDashboardCTA, Website/Content, LayoutAuth/DashboardToolbar |
--brand-lighter | Light var(--color-main-50)Dark as light |
General/EmptyDashboardCTA, AdminRoles/EditPermissionsDialog, ui/Resizable |
--brand-darker | Light var(--color-main-200)Dark as light |
AI/AgentConfigDialog, LayoutAuth/AddWidgetMenu, ui/Resizable |
--font-family | Light "Montserrat"Dark as light | 6 rules or scripts read it directly |
--radius | Light 0.5remDark as light | 3 rules or scripts read it directly |