This is a prerelease version of FAST (3.0.0-rc.1).

@microsoft/fast-element > ElementStyles

ElementStyles class

Represents styles that can be applied to a custom element.

Signature:

export declare class ElementStyles

Constructors

Constructor

Modifiers

Description

(constructor)(styles)

Creates an instance of ElementStyles.

Properties

Property

Modifiers

Type

Description

strategy

readonly

StyleStrategy

Gets the StyleStrategy associated with these element styles.

styles

readonly

ReadonlyArray<ComposableStyles>

supportsAdoptedStyleSheets

static

readonly

boolean

Indicates whether the DOM supports the adoptedStyleSheets feature.

Methods

Method

Modifiers

Description

normalize(styles)

static

Normalizes a set of composable style options.

setDefaultStrategy(Strategy)

static

Sets the default strategy type to use when creating style strategies.

withStrategy(Strategy)

Sets the strategy that handles adding/removing these styles for an element.