Table of Contents

Class CliCustomStyle

Namespace
ItTiger.TigerCli.Tui.Themes
Assembly
ItTiger.TigerCli.dll
An app-defined custom semantic style: a named markup token (e.g. ConnectionName, EnvironmentProd) that resolves through the active theme like the framework semantic tokens. A custom style always has a required framework ThemeStyle BaseStyle as a safe fallback, plus optional dark/light family overrides and optional exact theme-name overrides.

Resolution order (most specific first):

  1. exact theme-name override (matches Name, case-insensitive);
  2. dark/light family override (chosen by Family);
  3. the active theme's resolved BaseStyle.
Custom styles are used as semantic markup tags only (single-token, e.g. [ConnectionName]…[/]); like other semantic styles they are never valid inside a raw on colour expression.
public sealed class CliCustomStyle
Inheritance
CliCustomStyle
Inherited Members

Properties

BaseStyle

The required framework fallback role resolved through the active theme.
public ThemeStyle BaseStyle { get; }

Property Value

ThemeStyle

DarkStyle

Optional override applied under dark-family themes.
public CliCellStyle? DarkStyle { get; }

Property Value

CliCellStyle

LightStyle

Optional override applied under light-family themes.
public CliCellStyle? LightStyle { get; }

Property Value

CliCellStyle

Name

The custom style's markup token name (case-insensitive).
public string Name { get; }

Property Value

string

Methods

Resolve(ITheme)

Resolves this custom style against theme following the documented order and returns the effective character style. Never throws on a missing override — it always falls back to the active theme's BaseStyle.
public CliCharStyle? Resolve(ITheme theme)

Parameters

theme ITheme

Returns

CliCharStyle?