public static class ControlThemeThe stylesheet the controls come with.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Loaded as UserAgent, which is the whole design. A game's own stylesheet is Author and beats this at equal specificity, so restyling a button is one rule rather than a fork of this file — and a rule that only names button is enough, rather than one that has to out-specify whatever this happened to write. That is the reason the cascade has three origins, and this is the first thing in the engine to use the first of them.
⚠ Colours go through custom properties and geometry does not. A theme wanting different colours sets nine values on the root; one wanting different shapes writes rules, because there is no useful token for "a switch's knob is a circle". The split is where it is because recolouring is what nearly every application does and reshaping is what a few do thoroughly.
⚠ The layout defaults are CSS's, so a container with no flex-direction is a row — LayoutStyleBuilder starts from CSS's initial values rather than from Yoga's, which differ in four places. Every rule below that wants a column therefore says so, and a rule that reads as redundant beside a browser stylesheet is not.
box-sizing: border-box is set here on everything, which is the one place it can be: LayoutStyleBuilder's own remarks say the property belongs in a user-agent stylesheet where an author can see and override it rather than baked into the bridge where they cannot. This is that stylesheet. Without it a control's declared height is the height of its content and every padded control comes out taller than it says.
Fields and properties (1)
public static string CssThe stylesheet's text, for a caller that wants to read or amend it.
Methods (1)
public static int Install(UiDocument document)Loads the theme into a document.
Used by (20)
- ShellHelloUi
- DocumentBenchmarksVixen.Benchmarks.Ui
- AdvancedFixtureVixen.Ui.Controls.Advanced.Tests
- ControlFixtureVixen.Ui.Controls.Tests
- ControlHarnessVixen.Ui.Controls.Tests
- CommandTestsVixen.Editor.Ui.Tests
- ConsoleViewTestsVixen.Editor.Ui.Tests
- DialogTestsVixen.Editor.Ui.Tests
- EditorShellVixen.Editor.Ui
- FlameChartViewTestsVixen.Editor.Profiler.Tests
- InspectorFixtureVixen.Editor.Inspector.Tests
- MenuTestsVixen.Editor.Ui.Tests
- PlatformKeyTestsVixen.Editor.Ui.Tests
- ScopeTestsVixen.Editor.Ui.Tests
- ServiceTestsVixen.Editor.Ui.Tests
- TaskCenterTestsVixen.Editor.Ui.Tests
- ToolbarSectionTestsVixen.Editor.Ui.Tests
- ViewFixtureVixen.Editor.NodeGraph.Tests
- ViewHarnessVixen.Editor.AssetEditors.Tests
- WorkspaceTestsVixen.Editor.Ui.Tests