Get variable mode
style.getVariableMode(VariableCollecton, options?)
Retrieve the variable mode applied to a style for a given variable collection. A collection can define multiple modes, but a style can have only one variable mode applied per collection.
Syntax
Parameters
- collection: VariableCollection - The variable collection of the variable mode.
- options?: BreakpointAndPseudo - The breakpoint and pseudo state for the style.
-
BreakpointId: Identifies the responsive breakpoint to get styles for. -
PseudoStateKey: Specifies a CSS pseudo-class to get styles for.
-
Returns
A Promise that resolves to a VariableMode object or null if the variable mode isn’t found.