Brand the platform
Section titled “Brand the platform”This how-to is for builders and tenant administrators. You will give OSOS your organization’s look: your colours in light and dark mode, your corporate font, and a matching sign-in page. You do most of it with one CSS file attached to a theme, by overriding the CSS variables the web app is built on.
You need:
- At least Developer access at the system level, with Edit, so you can add themes and fonts under Administration › Interfaces. See Look and feel.
- Your brand colours as hex values, and your font in WOFF, WOFF2, TTF and OTF.
- A text editor to write a
.cssfile. - For the sign-in page: your platform operator, who applies its CSS for you.
How to add a theme or a font, and how to offer a theme to people, is on Look and feel: themes, fonts and icons. This page builds on it.
How the look is put together
Section titled “How the look is put together”The web app’s look comes in layers. Each layer can override the one before it:
- The base theme. Your deployment ships with a built-in base theme. It defines every colour as a CSS variable, in a light set and a dark set. Your operator chooses the base theme; you cannot change it in Administration.
- Your theme’s General CSS. A CSS file you attach to a theme. The web app loads it after the base theme, so whatever it sets wins.
- CSS on a view, a page or a widget. Styles for one screen only. See Style a view with custom CSS.
Which theme’s General CSS someone gets depends on the theme they use: the one they picked under Theme in Quick Settings, or otherwise the Default Theme of the settings record that applies to them. The file is loaded when the app starts. If the file is empty or cannot be loaded, people get the base theme.
The sign-in page is a separate page with its own, much shorter, set of variables. A theme does not change it. See Brand the sign-in page.
Build your theme
Section titled “Build your theme”- Write your CSS file, for example
contoso.css. Start from the worked example below. - Open Administration › Interfaces › Themes, then select Add Theme, or open an existing theme and edit it.
- Fill in Theme Name. Turn on Dark mode if this is a dark theme.
- Under General CSS, upload your CSS file.
- Select Save.
- Offer the theme in a settings record, as Default Theme or under Available Themes. See Choose which themes people can use.
- Reload the web app. To try the theme yourself first, pick it under Theme in Quick Settings (the gear button at the edge of the screen).
To change the CSS later, upload a new file to the same theme and save. People get it the next time they load the app.
Light and dark mode
Section titled “Light and dark mode”The web app switches between a light and a dark colour set by adding the class
dark-mode to the page’s root <html> element. People choose Light or
Dark under Mode in Quick Settings. When someone picks a theme whose
Dark mode is on, the app switches to Dark for them.
In your CSS:
- Put light-mode values in a
:rootrule. - Put dark-mode values in a
:root.dark-moderule.
Use :root.dark-mode, not .dark-mode on its own. The base theme declares its
dark colours on .dark-mode, and a plain :root rule in your file would
override them, so your light colours would also show in dark mode. The
:root.dark-mode selector is more specific, so your dark values win in dark mode.
You can make one theme that looks right in both modes, or two themes (one with Dark mode on), each with its own file.
The CSS variables you can override
Section titled “The CSS variables you can override”These are the variables the base theme defines that change the most of the screen. Colours you do not set keep the base theme’s value.
| Variable | What it changes |
|---|---|
--color-primary | Your main brand colour: primary buttons, links, active menu items, highlights, the loading indicator. --primary-color follows it automatically. |
--primary-color | The same brand colour under the name most components read. Set --color-primary and leave this one alone, unless you want the two to differ. |
--primaryColorRGB | The brand colour as three numbers, R, G, B (for example 10, 110, 92). Used for see-through tints of the brand colour. Set it whenever you change --color-primary. |
--primary-color-text | Text drawn on top of the brand colour, such as the label of a primary button. |
--secondary-color | The second brand colour: secondary buttons, chips, some icons and backgrounds. |
--accent-color | An accent colour used for some headings, borders and highlights. |
--textColor | The default text colour of the page body. |
--text-color | The main text colour inside components. |
--text-color-secondary | Quieter text: hints, captions, labels. |
--bodyBgColor | The page background behind cards and panels. |
--surface-a | The background of cards, panels and menus. |
--surface-b | A slightly different background for alternating areas and headers. |
--surface-c | A light tint used as a hover background. |
--surface-d | Dividers and outlines. |
--border-color | Borders and separator lines. |
--topbar-bg | The top bar’s background. |
--menu-bg-color | The main menu’s background. |
--chart-color-1 to --chart-color-5 | The colours of dashboard charts, Kanban boards and service cards. |
--font-family | The font of the whole web app. See Use your own font. |
--radius | The roundness of corners on many elements. |
--card-border-radius | The roundness of card corners. |
Use your own font
Section titled “Use your own font”Uploading a font under Administration › Interfaces › Fonts stores its files, and Used font links it to a theme. The web app does not load the font by itself: you declare it in your theme’s General CSS, and then use it.
- Upload the font. See Add a font.
- Open the font from the Fonts list. The address in your browser now
contains
/entries/followed by the font’s id. Copy the id. - In your General CSS, declare the font with
@font-face. You choose thefont-familyname; it does not have to match the Font name you gave it. Pointsrcat the font file address:https://<your web app address>/api/v1/fonts/files/<font id>/<format>, where<format>iswoff2,woff,ttforotf. - Put your font first in
--font-family, followed by fallbacks.
Use full addresses (starting with https://) for fonts, images and anything
else your General CSS loads. The web app loads the file in a way that makes
relative addresses such as /api/... fail.
@font-face { font-family: "Contoso Sans"; src: url("https://apps.contoso.example/api/v1/fonts/files/3f2c9a1e-0000-0000-0000-000000000000/woff2") format("woff2"), url("https://apps.contoso.example/api/v1/fonts/files/3f2c9a1e-0000-0000-0000-000000000000/woff") format("woff"); font-weight: normal; font-style: normal; font-display: swap;}
:root { --font-family: "Contoso Sans", Roboto, Tajawal, system-ui, sans-serif;}If your font has no Arabic letters, keep an Arabic font such as Tajawal in the
fallback list. The browser uses it for any letter your font does not have.
Right-to-left languages
Section titled “Right-to-left languages”The web app sets dir="rtl" or dir="ltr" on the <html> element, from the
direction of the language the person is using, and lang to the language’s code.
Write your CSS so it works both ways:
- Prefer variables. A colour or font set through a variable is the same in both directions.
- Use logical properties for anything with a side:
margin-inline-startinstead ofmargin-left,padding-inline-endinstead ofpadding-right,border-inline-start,inset-inline-start, andtext-align: start. They flip by themselves in right-to-left languages. - Target a direction only when you must, with
[dir="rtl"]. For a language-specific font, target the language::root[lang="ar"].
/* A different font for Arabic */:root[lang="ar"] { --font-family: Tajawal, system-ui, sans-serif;}Brand the sign-in page
Section titled “Brand the sign-in page”The sign-in page, and the other pages around it (password reset, sign-in codes), are served by the identity service, not the web app. They have their own name, logo, favicon and CSS. None of it is set in Administration: your platform operator sets it, for your whole deployment or for your organization only. On a shared deployment, the name, logo and favicon come from your organization’s brand. See Your organization’s name, logo and sign-in page.
What you can do is prepare the CSS and give it to your operator. There are three CSS settings:
| Setting | What it is | When it applies |
|---|---|---|
variablesCss | A :root rule that sets the sign-in page’s variables. | Always. Loaded after the built-in variables, so your values win. |
customCss | Any extra CSS. | Always, in both directions. Loaded after the built-in style sheet. |
customCssRtl | Extra CSS for right-to-left languages. | Only when the page is shown in a right-to-left language. Loaded after the built-in right-to-left style sheet. |
In a right-to-left language the page also loads its built-in right-to-left style
sheet after customCss. If a rule in customCss is overridden there, repeat it
in customCssRtl.
The sign-in page’s variables
Section titled “The sign-in page’s variables”| Variable | What it changes | Built-in value |
|---|---|---|
--gold | The accent colour: the sign-in button, input focus borders, checkboxes, links such as the forgotten-password link, and accent lines. | #d82233 |
--gray | The page background colour, behind the background image. | #f8f8f8 |
--bg | The background image. | url('/users-assets/bg.jpg') |
--dark | Headings and dark text. | #212121 |
--dark-gray | Body text and the text in input boxes. | #4a4a4a |
--border-color | Input borders and input icons. | #d8d8d8 |
--label-color | Help text under the form. | #9c9c9c |
--ico-width | The width of the icons inside input boxes. | 40px |
--main-font-family | The font in left-to-right languages. tahoma is always added as a fallback. | tahoma |
--rtl-font-family | The font in right-to-left languages. Tajawal is always added as a fallback. | Tajawal |
The accent variable is called --gold for historical reasons. Since 1.10 its
built-in value is red, #d82233. If your sign-in page used to rely on the old
gold default, set --gold explicitly. Since 1.10
The fonts the sign-in page already has are Tajawal, Frutiger and Roboto,
plus the fonts installed on the visitor’s device.
Worked example: a complete brand
Section titled “Worked example: a complete brand”Contoso uses a deep green as its main colour, a slate grey as its second colour, a warm gold accent, and its own font, Contoso Sans. Its people work in English and Arabic, and many use dark mode.
1. The theme’s General CSS (contoso.css, uploaded to a theme named
Contoso):
/* Contoso brand: web app */
@font-face { font-family: "Contoso Sans"; src: url("https://apps.contoso.example/api/v1/fonts/files/3f2c9a1e-0000-0000-0000-000000000000/woff2") format("woff2"), url("https://apps.contoso.example/api/v1/fonts/files/3f2c9a1e-0000-0000-0000-000000000000/woff") format("woff"); font-display: swap;}
/* Light mode, and the values both modes share */:root { --color-primary: #0a6e5c; --primaryColorRGB: 10, 110, 92; --primary-color-text: #ffffff; --secondary-color: #3d4a57; --accent-color: #c8963e;
--textColor: #1f2933; --text-color: #1f2933; --text-color-secondary: #52606d;
--bodyBgColor: #f3f6f5; --surface-a: #ffffff; --surface-b: #f8faf9; --border-color: #e1e7e5; --topbar-bg: #ffffff; --menu-bg-color: #ffffff;
--chart-color-1: #0a6e5c; --chart-color-2: #3d4a57; --chart-color-3: #c8963e; --chart-color-4: #7fb8a8; --chart-color-5: #9aa5b1;
--font-family: "Contoso Sans", Roboto, Tajawal, system-ui, sans-serif; --radius: 6px;}
/* Dark mode */:root.dark-mode { --primary-color-text: #0b1512; --textColor: rgba(255, 255, 255, 0.87); --text-color: rgba(255, 255, 255, 0.87); --text-color-secondary: rgba(255, 255, 255, 0.6);
--bodyBgColor: #141c1a; --surface-a: #1b2522; --surface-b: #111816; --border-color: #2b3835; --topbar-bg: #1b2522; --menu-bg-color: #1b2522;}
/* Arabic: Contoso Sans has no Arabic letters */:root[lang="ar"] { --font-family: Tajawal, system-ui, sans-serif;}2. The settings. Offer Contoso as the Default Theme in the organization’s settings record.
3. The sign-in page. Send your operator these three values for your organization:
variablesCss, with no quotation marks:
:root { --gold: #0a6e5c; --gray: #f3f6f5; --dark: #1f2933; --dark-gray: #3d4a57; --border-color: #e1e7e5; --label-color: #52606d; --bg: none; --main-font-family: Roboto; --rtl-font-family: Tajawal;}customCss, which rounds the sign-in card and its buttons to match the web app:
.card { border-radius: 6px;}
.btn-gold { border-radius: 6px;}customCssRtl, which gives Arabic headings a little more room:
.card h1 { line-height: 1.6;}Ask the operator to set your logo and favicon at the same time.
4. Check it. Reload the web app and check a list, a form and a dashboard in Light and Dark mode, in English and in Arabic. Then sign out and look at the sign-in page in both languages.
Application shells
Section titled “Application shells”A theme also has an Application Shell field. It is reserved for a future feature and changes nothing people see today. See Application shells.
Troubleshooting
Section titled “Troubleshooting”| What you see | What to check |
|---|---|
| Nothing changed after you uploaded the CSS. | Reload the page. Check that the people concerned use this theme: it is their Default Theme, or they picked it in Quick Settings. |
| Your font does not show. | The src addresses must be full addresses starting with https://. Check the font id and that the format you name was uploaded. |
| Your light colours also show in dark mode. | Put the dark values in a :root.dark-mode rule, not .dark-mode. |
| Some hover colours still use the old brand colour. | Those shades are fixed when OSOS is built. Override the element’s colour directly. |
| The mobile app does not use your colours. | General CSS styles the web app only. See Override mobile app colours. |
| A font on the sign-in page does not apply. | In variablesCss, write the font name without quotation marks. |
See also
Section titled “See also”- Look and feel: themes, fonts and icons
- Organization settings
- Style a view with custom CSS
- Override mobile app colours
- Set your preferences
- Tenant settings & look and feel: technical reference
Platform 1.10.0 · Backend 1.11.0-alpha.11 · Frontend 1.11.0-alpha.6 · Mobile 1.10.2 · Chart 1.11.8 · Gateway 2.6.11 · MCP 0.2.0 · Grafana DS 1.2.0Docs build 2026-11-27