Skip to content

basalt / dashboard/src / brandingCssVars

Function: brandingCssVars() ​

> brandingCssVars(branding): Record<string, string>

Defined in: dashboard/src/branding.ts:98

The brand's CSS custom properties (colours first, then any cssVars). Names and values are strictly validated — an unsafe entry is silently dropped, never emitted — because the output is injected into a <style> element and the data is tenant-controlled. Even so, serve the shell under a CSP that forbids inline styles where possible, as defence in depth.

Parameters ​

branding ​

Branding

Returns ​

Record&lt;string, string&gt;

Released under the MIT License.