StyleSeeker

Description

A StyleSeeker is an interface that defines functions that are useful to retrieve and/or build styles that can be applied to HTML elements through CSS attributes and classes.

Functions

Function name

Parameter

Type

Description

base

context

StyleContext

Represents the context of the element to style.

 

[output]

OptionalStyleDefinitionAttributes

Returns the default style of the element.

find

key

string | object

The key of the StyleDefinition to retrieve.

 

warnUndefined?

boolean

When set to true, it will output a warning through the Logger.

 

[output]

OptionalStyleDefinitionAttributes

Returns the collection of attributes and/or classes defined in the StyleDefinition.

merge

…values

OptionalStyleDefinitionAttributes[ ]

The styles and/or classes to merge.

 

[output]

OptionalStyleDefinitionAttributes

The resulting style that will be applied to the HTML element.

A StyleSeeker is provided when using a StyleSelector and is useful to define custom styles at runtime.