Remove all variable modes

style.removeAllVariableModes(options)

Remove all variable modes from a style.


Syntax

1removeAllVariableModes(options?: BreakpointAndPseudo): Promise<null>

Parameters

Returns

Promise<null>

A promise that resolves to null.

Example

1// Get Selected Element
2const selectedElement = await webflow.getSelectedElement()
3
4if (selectedElement?.styles) {
5
6// Get Styles
7const styles = await selectedElement.getStyles()
8const primaryStyle = styles[0] // Get the primary style
9
10// Get Variable Modes
11const remove = await primaryStyle?.removeAllVariableModes()
12}

Try this example

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canModifyStyleBlocksAnyAnyCanvasDesign