Table of Contents

Class StyleOverrides

Namespace
Velvet
Assembly
Velvet.Docs.dll

Limited set of inline styles applied directly to an element. Intentionally inconvenient to encourage class-based styling.

public sealed class StyleOverrides
Inheritance
object
StyleOverrides

Remarks

Styling priority:

  1. USS class (BEM) — for all static, predictable styles.
  2. USS Custom Properties — for theme / config values.
  3. StyleOverrides — only for values that cannot be expressed via classes (dynamic textures, etc.).

Fields

Empty

A shared instance with every override unset.

Properties

BackgroundColor

Color computed at runtime.

BackgroundImage

For dynamic textures.

BackgroundRepeat

How the background image repeats (background-repeat).

Color

Dynamic text color.

UnitySliceBottom

The background image's bottom nine-slice inset (-unity-slice-bottom).

UnitySliceLeft

The background image's left nine-slice inset (-unity-slice-left).

UnitySliceRight

The background image's right nine-slice inset (-unity-slice-right).

UnitySliceScale

The factor the nine-slice insets are scaled by (-unity-slice-scale).

UnitySliceTop

The background image's top nine-slice inset (-unity-slice-top).

UnitySliceType

The nine-slice fill mode, sliced or tiled (-unity-slice-type).