@microsoft/fast-foundation > cssCustomPropertyBehaviorFactory

cssCustomPropertyBehaviorFactory() function

Create a CSS Custom Property behavior.

Signature:
export declare function cssCustomPropertyBehaviorFactory(name: string, value: string | ((...arg: any[]) => string), host: (source: typeof FASTElement & HTMLElement) => Partial<CSSCustomPropertyTarget> | null): CSSCustomPropertyBehavior;

Parameters

ParameterTypeDescription
namestringThe name of the CSS custom property
valuestring | ((...arg: any[]) => string)The value or value resolver of the custom property
host(source: typeof FASTElement & HTMLElement) => Partial<CSSCustomPropertyTarget> | nullA function to resolve the element to host the CSS custom property
Returns:

CSSCustomPropertyBehavior