Window and workspace classes
ToolboxNames.Lookup.Classes lists the class names. Index 0 of each list is the canonical name.
The workspace adds the canonical window classes to every chrome, also to chrome from a custom template. So WindowStyles.uss applies to all templates.


Workspace and window chrome
| Class | Element |
|---|---|
tb-workspace |
The Workspace element. |
tb-window |
The chrome root of every window. |
tb-child-window |
The frame inside the chrome root. |
tb-title-bar |
The title bar. |
tb-title-label |
The title text. |
tb-window-icon |
The icon before the title, in the title bar and in a tab. Only a window with an icon has it. See Window icons. |
tb-window-icon__glyph |
The PromptFont glyph of an icon set by name. It takes the color of the title. |
tb-button-group |
The group of window buttons (default template). |
tb-window-button |
Each window button. |
tb-minimize-button, tb-maximize-button, tb-close-button |
The three window buttons. |
tb-window-content |
The content slot. |
tb-drag-handle |
A drag handle other than the title bar. |
tb-resize-handle |
A resize handle. It also has one of resize-top, resize-bottom, resize-left, resize-right, resize-top-left, resize-top-right, resize-bottom-left, resize-bottom-right. Added to every resizable window whose template has none. WindowStyles.uss hides it under tb-window--minimized. |
tb-focused |
Added to the chrome root of the focused window. |
tb-error-chrome |
Chrome shown when every chrome source failed. |
tb-workspace--overview |
The workspace while the overview shows. |
tb-workspace__dim |
The layer behind the windows that dims the workspace in the overview and in the window mode. |
tb-workspace__overview-layer |
The layer in front of the windows in the overview. It takes the clicks. |
tb-workspace__overview-item |
The frame around one preview of the overview. tb-workspace__overview-item--picked is on the picked one: the focus ring. |
tb-workspace__overview-title |
The row under a preview with the icon and the title of the window. |
tb-workspace--window-mode |
The workspace while the window mode is on. |
tb-window--mode-target |
The chrome root of the window that the window mode moves. |
tb-workspace__window-mode-bar |
The PromptBar with the keys of the window mode. |
Tabs
| Class | Element |
|---|---|
tb-tab-strip |
The tab strip of a tab group. |
tb-tab |
One tab chip. |
tb-tab-label |
The tab text. |
tb-tab--active |
The active tab chip. |
tb-tab-close |
The tab close button. |
tb-tab-pages |
The container of the tab pages. |
Toolbar, docking and menus
| Class | Element |
|---|---|
tb-toolbar |
WorkspaceToolbar. Its height is reserved at the top of the viewport. Buttons that do not fit wrap to a new row. |
tb-toolbar-button |
WorkspaceToolbarButton. |
tb-dock-chrome, tb-dock-content, tb-dock-edge-indicator |
Parts of DockPanelTemplate.uxml. |
tb-dock--left, tb-dock--right, tb-dock--top, tb-dock--bottom |
Added to a dock zone chrome for its edge. |
tb-context-menu |
ContextMenuComponent. |
tb-menu-item |
MenuItem: a row with a check, an icon, a label, a shortcut and an arrow. |
tb-menu-item__check, tb-menu-item__icon, tb-menu-item__label |
The check mark column, the icon (16 px, hidden without an icon) and the text. |
tb-menu-item__shortcut, tb-menu-item__arrow |
The shortcut text (muted, right-aligned) and the submenu arrow (shown for an item with a submenu). |
tb-menu-item--checked, tb-menu-item--highlighted |
A checked item, and the item under the pointer or the keyboard highlight (accent background). |
tb-menu-separator |
A menu separator. |
tb-toolbar-menu |
ToolBarMenu: a row of titles with the surface background and a bottom border. |
tb-toolbar-menu__titles |
The row of titles. It clips a title that does not fit. |
tb-toolbar-menu__item |
A title (ToolBarMenuItem). It gets the hover color on hover. The access key is underlined with a <u> tag. |
tb-toolbar-menu__overflow |
The "≡" title that shows when titles do not fit. Its width is ToolBarMenu.OVERFLOW_WIDTH (32 px), set in code. |
tb-toolbar-menu__item--open |
The title whose menu is open (accent background, also under the pointer). |
tb-text-muted |
Utility class for secondary text. See Text classes. |
Error dialog
The error dialog is a Dialog with the class tb-error-dialog, so the tb-dialog classes style it too. Each error in it is an tb-error-dialog__entry, with its time in an tb-error-dialog__entry-header.
Unity controls in the workspace
Unity's own controls in the workspace take the theme colors, so a form in a window, a popup or a docked panel does not show Unity's default look. The rules in WindowStyles.uss start with .tb-workspace, so a control outside the workspace keeps the Unity look. A USS type selector matches the exact type only, so .tb-workspace Button does not match a subclass; WorkspaceToolbarButton has its own tb-toolbar-button rule. The rules set colors. Two layout rules fix the runtime theme: vector and rect fields show their axes on one row, and the radio dot shows.
| Unity classes | Look |
|---|---|
unity-base-field__label, unity-toggle__text, unity-radio-button__text, unity-foldout__text |
--tb-color-text. |
unity-base-text-field__input, unity-base-popup-field__input, unity-enum-field__input |
--tb-color-background with a --tb-color-border border and --tb-color-text text. The border is --tb-color-text-muted on hover and --tb-color-accent with the focus. A placeholder uses --tb-color-text-disabled. |
unity-toggle__checkmark, unity-radio-button__checkmark-background |
The same box colors; the check takes --tb-color-text. |
unity-radio-button__checkmark |
The dot. The runtime theme draws it with a background color, so the rule sets background-color and the image tint to --tb-color-text. |
unity-composite-field__input, unity-composite-field__field |
Vector2, Vector3, Vector4, Rect and Bounds fields. The runtime theme stacks the axes and gives each axis label the field label width. The rules put the axes on one row with equal widths and a small label. |
unity-foldout__checkmark, unity-tree-view__item-toggle |
The arrow of a Foldout and of a TreeView row: a corner of two borders in --tb-color-text-muted, the arrow of the Accordion. It points right when closed and turns down when open, in --tb-animation-duration-fast. The rules are in Controls.uss. |
unity-collection-view__item (ListView, TreeView, MultiColumnListView) |
--tb-color-surface, --tb-color-surface-alt for alternating rows, --tb-color-surface-hover on hover, and --tb-color-accent with --tb-color-accent-text when selected. |
unity-tab-view__header-container, unity-tab__header |
--tb-color-surface-alt; the checked tab is --tb-color-surface with an --tb-color-accent underline. |
unity-tab__reorderable-handle-bar, unity-tab__close-button |
The grip of a reorderable tab and the x of a closeable tab: --tb-color-text-muted. The x is --tb-color-text on hover. |
unity-progress-bar__background, unity-progress-bar__progress |
--tb-color-background with the border; the progress is --tb-color-accent. |
unity-help-box |
--tb-color-surface-alt with the border. |
unity-base-dropdown__container-inner and its items |
The menu of a DropdownField. It opens at the panel root, outside the workspace. After a press in the workspace, the workspace adds its theme sheet and user sheets to the new menu for 10 ticks, so the menu takes the workspace palette. A menu opened by code, with no press, keeps the base palette. The menu is at least 140 px wide, its items take its width, and a choice that is too long ends with "...", so it never shows a horizontal scroll bar. |
unity-base-slider__tracker, unity-base-slider__dragger, unity-repeat-button |
Sliders: --tb-color-surface-alt tracks, --tb-color-border handles, --tb-color-surface-hover on hover. |
unity-scroller |
Scroll bars. See Scroll bars. |
Disabled state
A disabled control shows that it does not work. Disable it with SetEnabled(false) in code, or with enabled="false" in UXML. The look is the same in each theme:
- The box, the button or the handle has no fill. The text, the label, the arrow and the check have
--tb-color-text-disabled. - A hover or a press changes nothing.
- A disabled control takes no focus, so it shows no focus ring and no caret, and it takes no typing.
- A primary or danger button, a pressed ToggleButton and a checked button of a
ToggleButtonGroupkeep their color at half opacity. A Switch shows its track at half opacity.
The look covers Unity's controls in the workspace (Button, TextField, the number fields, DropdownField, EnumField, Toggle, RadioButton, Slider and MinMaxSlider) and the Toolbox controls with a box or buttons, such as NumericUpDown, ComboBox and InputGroup. The rules are at the end of Controls.uss. To change the look, write a rule with the same selector in a sheet after the Toolbox sheets, for example:
.tb-workspace Button:disabled,
.tb-workspace Button:hover:disabled {
opacity: 0.6;
}
Scroll bars
The scroll views in an element with the class tb-scrollbars have a thin scroll bar: 12px wide, with a round 6px groove, a round 6px handle and no arrow buttons. The groove is --tb-color-surface-alt. The handle is --tb-color-text-muted at 70 % opacity, so it shows on the groove and on the content in each theme. A hover shows the full color, and a drag shows --tb-color-accent.
The rules have four classes, so a rule for the track of a Slider, such as .my-screen .unity-base-slider__tracker, does not reach the groove of a scroll bar.
Runtime panels receive the class and control sheet when a Toolbox control or workspace attaches, a popup opens, or a scene document loads. Both scroll bar axes use the shared theme, including native scroll views outside a workspace. Editor panels keep the class scoped to Toolbox controls. For an editor element of your own, add the class:
<ui:VisualElement class="tb-scrollbars">
<ui:ScrollView />
</ui:VisualElement>
The rules are in Controls.uss. Runtime panel registration loads that sheet. To change the look, override the rules in your sheet with the same selectors, for example:
.tb-scrollbars .unity-scroller .unity-scroller__slider
.unity-base-slider__dragger {
background-color: var(--tb-color-accent);
}
The window edges and corners show the themed resize cursors. See Cursors.