Skip to main content

Styling surfaces

FINOS Workspace draws five kinds of surface, and each kind takes its styling from a different place. This matters to anyone who writes a stylesheet or a widget, because a stylesheet reaches only some of the surfaces. The table says where the styling of each surface comes from and what you can control.

SurfaceWhere its styling comes fromWhat you can control
The web appTailwind utility classes, together with the custom properties in frontend/src/styles/tokens.css and frontend/src/index.css.Every color, the font and the text scale are custom properties, so a stylesheet can change all of them. The base stylesheets are built into the app. A theme is either a stylesheet that WL_STYLESHEET names, which loads after the base stylesheets, or a preset that an admin applies in the admin area (Theme presets), so a change needs no rebuild. The other white-label settings cover the name, the logos, the favicon, the description and the keywords. See Brand color, font and text size and Semantic properties.
HTML widgetsThe HTML document that the backend returns, drawn in a sandboxed iframe.You control all of it. The frame inherits nothing from the app, and FINOS Workspace adds the theme query parameter to the request. See HTML widgets and artifacts.
iframe widgetsThe page that the widget embeds.You control the page's own CSS. FINOS Workspace adds theme to the request in the same way.
Plugin widgetsThe plugin's entry.css, drawn in a sandboxed frame.You control all of it. The plugin receives a theme trait with the mode and the values of 14 tokens. See Plugin theme.
Agent HTML artifactsThe HTML that the model writes, which FINOS Workspace sanitizes and draws in a sandboxed iframe, together with one style element that FINOS Workspace adds.You control the document's own CSS. The built-in report skill gives the model a stylesheet to use. See Report classes.

What a custom property reaches in the web app​

The web app styles color through Tailwind utility classes such as bg-btn-primary-bg and bg-light-100. Every color utility that the @theme block of index.css defines reads a custom property. In total, 187 utilities read a property, and the source uses them 2365 times in 241 files. The palette utilities read the --color-* properties of tokens.css, so changing a palette step changes every class that names it, and it also changes every semantic property that refers to that step.

Tailwind's own colors are the exception. The colors white and black and the named hues such as red-500 are not custom properties, so a theme cannot change them. Components use these colors 196 times in 72 files.

The counts on this page are generated from the frontend source.