For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Designer API
    • Introduction
    • Getting Started
    • Webflow CLI
    • Error Handling
    • App Modes
  • Elements
    • Creating & Retrieving Elements
    • Element Properties & Methods
    • Element Types & Methods
  • Styles
    • Managing Style Properties
    • Managing Variable Modes
      • Get variable mode
      • Get variable modes
      • Set variable mode
      • Set variable modes
      • Remove variable mode
      • Remove variable modes
      • Remove all variable modes
  • Components
  • Variables & Collections
    • Variable Collections
    • Variables
    • Variable Modes
  • Assets
  • Pages & Folders
  • Utilities
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • style.removeAllVariableModes(options)
  • Syntax
  • Parameters
  • Returns
StylesManaging Variable Modes

Remove all variable modes

Was this page helpful?
Previous

Components

Next
Built with

style.removeAllVariableModes(options)

Remove all variable modes from a style.


Syntax

1style.emoveAllVariableModes(
2 options?: {
3 breakpointId?: BreakpointId
4 pseudoStateKey?: PseudoStateKey
5 }
6): Promise<null>

Parameters

  • options?: BreakpointAndPseudo - The breakpoint and pseudo state for the style.
    • BreakpointId: Identifies the responsive breakpoint to get styles for.

      1type BreakpointId = "xxl" | "xl" | "large" | "main" | "medium" | "small" | "tiny"
    • PseudoStateKey: Specifies a CSS pseudo-class to get styles for.

      1type PseudoStateKey = "noPseudo" | "nth-child(odd)" | "nth-child(even)" |
      2 "first-child" | "last-child" | "hover" | "active" |
      3 "visited" | "focus" | "focus-visible" | "focus-within" |
      4 "placeholder" | "empty" | "before" | "after"

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