class UIStyle
A class that defines a set of styles that can be applied to UI components.
class UIStyle<TDefinition>
Notes
- Do not use this class directly; use the ui.style factory function to create a new style object, or preferably use one of the base styles defined on ui.style.
- For custom styles used by an application, extend base styles using the extend() method, or create override objects using the override() method.
Constructor
- constructor(name, BaseClass)Creates a new style object; do not use directly.
Type Members
- type UIStyle.StyleStateOptions staticType definition for an object that includes style state options.
- type UIStyle.StyleSelectorList staticType definition for a list of style definitions.
- type UIStyle.StyleOverrides staticAn object that includes a base style reference and style overrides.
- type UIStyle.Type staticType definition for a UIStyle class (or extended sub class).
- type UIStyle.TypeOrOverrides staticA value that produces a valid style type or object.
Static Members
- UIStyle.extend(this, …styles) staticCreates a new subclass that includes the original styles as well as new styles.
- UIStyle.override(this, …styles) staticCreates a style override object that can be used to apply base styles as well as the specified styles to a UI component.
- STATE_HOVERED staticA property that is used on StyleStateOptions to apply styles to hovered elements.
- STATE_PRESSED staticA property that is used on StyleStateOptions to apply styles to pressed elements.
- STATE_FOCUSED staticA property that is used on StyleStateOptions to apply styles to focused elements.
- STATE_DISABLED staticA property that is used on StyleStateOptions to apply styles to disabled elements.
- STATE_READONLY staticA property that is used on StyleStateOptions to apply styles to readonly elements.
- OVERRIDES_BASE staticSymbol that’s used on override objects to reference the base style class.
Instance Members
- id readonlyUnique style ID.
- name readonlyStyle type identifier.
- base readonlyBase styles, read from the current theme.
- getStyles()Returns the list of styles that should be applied to a UI component.