Skip to main content

@microsoft/fast-element > css

css() function

Transforms a template literal string into styles.

Signature:
export declare function css(strings: TemplateStringsArray, ...values: (ComposableStyles | CSSDirective)[]): ElementStyles;

Parameters

ParameterTypeDescription
stringsTemplateStringsArrayThe string fragments that are interpolated with the values.
values(ComposableStyles | CSSDirective)[]The values that are interpolated with the string fragments.
Returns:

ElementStyles

Remarks

The css helper supports interpolation of strings and ElementStyle instances.