Skip to main content

@microsoft/fast-element > Controller > addStyles

Controller.addStyles() method

Adds styles to this element. Providing an HTMLStyleElement will attach the element instance to the shadowRoot.

Signature:
addStyles(styles: ElementStyles | HTMLStyleElement): void;

Parameters

ParameterTypeDescription
stylesElementStyles | HTMLStyleElementThe styles to add.
Returns:

void