Skip to content

This how-to is for builders who want a view to look different from the platform default. Examples: highlight one field, make a column wider, make a dashboard figure stand out, or tint the records that are waiting at a workflow step. You will learn what each box under Custom style accepts, where OSOS puts your CSS, and which class names you can safely target. You will also learn how to colour records by tag without writing CSS, and how to style a whole page and its widgets.

You need:

  • Access to Administration with the right to edit the entity’s views.
  • A view to style. See Data Views & Faces.
  • Basic CSS knowledge: selectors, declarations, and @media.
  1. Open Administration › Applications › Data Entities, then select the entity.
  2. Select the Views tab, then open the view.
  3. Select the Web settings tab. Custom style is at the top. The view’s scripts are under it.

Custom style has these parts:

PartWhat you typeShown when
View styleCSS, one box per screen of the viewAlways
Fields styleClass names, per field and per screenAlways
Dashboard styleClass names, per dashboard cardThe view’s dashboard is on
Workflow step styleClass names, per workflow stepThe entity has a workflow
Button dialog styleClass names, per button that asks the user for inputThe view has such a button
Mobile theme override (JSON)JSON for the mobile appAlways

The mobile part does not use CSS. See Override mobile app colours per view and page.

The key idea: you write CSS only in View style. Every other part takes class names, separated by spaces (for example must-read wide-col). OSOS adds those classes to the right element. You then target them from View style.

View style has one box for each screen the view has switched on:

BoxApplies toOSOS wraps your CSS in
GeneralEvery screen of this view: the list, the record’s details and the formsA class unique to this copy of the view
DetailsThe record’s details screen.view-entry-details
Table viewThe table face.face-table-view
Calendar viewThe calendar face.face-calender-view
Card viewThe card face.face-badge-view
Kanban viewThe kanban face.face-kanban-view
Tree viewThe tree face.face-tree-view
Counter viewThe counter face.face-miniCard-view
Create EntryThe create form.view-create-entry
Edit EntryThe edit form.view-edit-entry
Show Message after savingThe message shown after saving.view-show-message
Ask User ForThe dialog a button opens to ask for input.view-ask-for-user-wrapper
DashboardThe view’s dashboard.face-dashboard-view

Only the boxes for screens and faces you have switched on appear. The timeline face has no box of its own. Use General for it.

OSOS puts the text of a box inside a rule for that box’s wrapper class. If you type this in Table view:

color: var(--text-color-secondary);
& td {
padding-block: 0.25rem;
}

the browser receives:

.face-table-view {
color: var(--text-color-secondary);
& td {
padding-block: 0.25rem;
}
}

This is standard CSS nesting. So:

  • Plain declarations (color: …;) style the wrapper itself.
  • Nested rules (& td { … }, .must-read { … }) style elements inside the wrapper. Start each nested selector with & or a class name. A nested selector that starts with a bare element name (such as td { … }) only works in recent browsers.
  • @media works inside a box, for example @media (max-width: 640px) { & td { padding: 0; } }.
  • You cannot reach anything outside the wrapper. A rule such as body { … } becomes “a body inside the wrapper” and matches nothing.

Fields style lists every field of the view. Expand a field to see one box per screen: General, Details, one box per face (Table view, Calendar view, Card view, Kanban view, Tree view, Counter view), Create Entry, Edit Entry, and more. A block field has no face boxes.

Type one or more class names in a box. OSOS adds them to the element that holds the field’s value on that screen:

  • A class in General is added on every screen.
  • A class in a face or screen box is added on that screen only, together with the General classes.
  • When a field has at least one class, OSOS also adds the field’s internal name as a class. Use your own class names in your CSS. They are easier to read and do not change if you rename a field.

Then style the class from View style. For example, give the field Notes the class must-read in General, and type this in View style › General:

.must-read {
border-inline-start: 3px solid var(--primary-color);
padding-inline-start: 0.5rem;
}

In the table face, the class sits on the value inside the cell, not on the cell itself. To style the whole cell, use :has(): & td:has(.must-read) { … }.

Dashboard style: class names for dashboard cards

Section titled “Dashboard style: class names for dashboard cards”

Dashboard style lists the dashboard cards (statistics queries) the view’s dashboard shows. Expand a card and type class names in its Dashboard box. OSOS adds them to the card, next to the card’s own dashboard class.

Inside a card you can target:

SelectorWhat it is
.card-dashboard__titleThe card’s title
.card-dashboard__sub-titleThe line under the title
.card-dashboard__bodyThe card’s content area
.number-view-content strongThe figure, on a card that shows a single number

Write the CSS in View style › Dashboard.

Workflow step style: tint records at a step

Section titled “Workflow step style: tint records at a step”

Workflow step style lists the steps of the entity’s workflows. Expand a step and type class names in its boxes (General, Details, the faces and Edit Entry). When a record’s current step is that step, OSOS adds the classes:

  • in the Table view, to the record’s row;
  • in the Kanban view, to the record’s card;
  • on the record’s details screen, to the section that holds its fields;
  • in the edit form, to the form.

Write the CSS in View style › General, so it works on every screen.

Button dialog style: style an “ask the user” dialog

Section titled “Button dialog style: style an “ask the user” dialog”

Some buttons open a dialog that asks the user for input before they run (see Buttons). Button dialog style lists those buttons. Type class names in a button’s Ask User For box. OSOS adds them, with the class askForUser, to the box that holds the dialog’s fields. Write the CSS in View style › Ask User For.

People use the same view in English and Arabic, and in light and dark themes. Write CSS that works in all four.

Direction. OSOS sets dir="ltr" or dir="rtl" on the page from the user’s language. Use logical properties, which flip by themselves:

Instead ofUse
margin-left, margin-rightmargin-inline-start, margin-inline-end
padding-left, padding-rightpadding-inline-start, padding-inline-end
border-leftborder-inline-start
text-align: lefttext-align: start
left: 0inset-inline-start: 0

When nothing else works, target the direction: [dir="rtl"] & { … }.

Colours. Do not hard-code colours like #ffffff or black. Use the theme’s CSS variables. They change with the theme and with dark mode:

VariableUse it for
--primary-colorThe theme’s main colour: accents, highlights
--primary-color-textText on a --primary-color background
--text-colorNormal text
--text-color-secondaryMuted text
--surface-aCard and panel backgrounds
--surface-bPage background
--surface-cA light hover or stripe tint
--surface-dThin borders and dividers
--color-invalidErrors and warnings

To make a light tint of a theme colour that works on both light and dark backgrounds, mix it with transparent: background: color-mix(in srgb, var(--primary-color) 12%, transparent);

For the full list of variables and how to set them for your brand, see Brand the platform.

Each recipe says where each piece goes.

  • Fields style › your field › General: must-read
  • View style › General:
.must-read {
background: color-mix(in srgb, var(--primary-color) 10%, transparent);
border-inline-start: 3px solid var(--primary-color);
padding-inline-start: 0.5rem;
}
  • Fields style › your field › Table view: wide-col
  • View style › Table view:
.wide-col {
min-inline-size: 20rem;
}

The table sizes each column to its widest content, so the whole column grows.

  • View style › Table view:
& td {
padding-block: 0.25rem;
}
  • Dashboard style › your card › Dashboard: kpi-big
  • View style › Dashboard:
.kpi-big .number-view-content strong {
font-size: 2.5rem;
color: var(--primary-color);
}
.kpi-big .card-dashboard__title {
font-weight: 600;
}
  • Workflow step style › your step › General: step-waiting
  • View style › General:
& tr.step-waiting > td {
background: color-mix(in srgb, var(--primary-color) 8%, transparent);
}
& .face-kanban-view .step-waiting {
border-inline-start: 4px solid var(--primary-color);
}
  • Button dialog style › your button › Ask User For: confirm-dialog
  • View style › Ask User For:
.confirm-dialog {
border-inline-start: 4px solid var(--primary-color);
}
  • Fields style › your field › Details: long-value
  • View style › Details:
@media (max-width: 640px) {
.long-value {
white-space: normal;
overflow-wrap: anywhere;
}
}

You can colour records without writing CSS. Entry classification styles colour a record’s background or its border by a tag, and can show tags on each record. A tag comes from a query: it marks the records the query matches. Create the tags first. See Colour matching records: tags.

  1. Open the view, and stay on the Settings tab.
  2. Make sure the Entries list is switched on. Scroll to Entry classification styles.
  3. Under Background color, choose a Selected option: the tag whose colour fills the background of the records it matches.
  4. To let people switch to another tag, tick Allow Changing, then choose the tags they may pick from in Options.
  5. Do the same under Border color. The tag’s colour then marks the record’s border instead.
  6. Under Tags, choose one or more tags to show on each record. Tick Allow Changing and fill Options to let people choose.
  7. Save the view.

When Allow Changing is on, people switch styles in the list’s View Settings panel, under Style.

Use classification styles when the colour follows a rule about the data, such as “overdue” or “high priority”. Use workflow step style when the colour follows the record’s workflow step. Use custom CSS for everything else.

Pages have their own styling, separate from views. See Pages & Widgets.

  • Additional CSS, in the page’s settings, takes CSS. OSOS wraps it in the page’s content area (.w_visual_container) in the same way as View style. Plain declarations style the page area, and nested rules style what is inside it.
  • Custom CSS Classes, in a widget’s settings, takes class names. Turn it on and type the classes. OSOS adds them to the widget’s container. Style them from the page’s Additional CSS:
.key-figure {
border: 1px solid var(--surface-d);
border-radius: 8px;
background: var(--surface-a);
}
ProblemWhat to check
My CSS has no effect.You may have typed CSS in a class-name box, or class names in a View style box. CSS goes only in View style.
A rule works on the list but not on the record.The rule is in a face box, such as Table view. Move it to General, or repeat it in Details.
A rule changed another view on the same page.Face, details and form boxes share their wrapper class across views. Move the rule into General.
A field class does not appear on a screen.The class is in another screen’s box. Put it in General to add it everywhere.
Text is unreadable in the dark theme.Replace hard-coded colours with theme variables.
A margin is on the wrong side in Arabic.Use logical properties (margin-inline-start) instead of left and right.

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