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
      • Get all styles
      • Get style by name or path
      • Create style
      • Set style name
      • Remove style
      • Is combo class
      • Get parent style
    • Managing Style Properties
    • Managing 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.getParent()
  • Syntax
  • Returns
  • Example
  • Designer ability
StylesCreating & Retrieving Styles

Get parent style

Get the parent style of a combo class style.
Was this page helpful?
Previous

Style Properties

Next
Built with

style.getParent()

Get the parent style of a class when you’ve determined that a style is a combo class and you want to:

  • Understand style inheritance - See which properties the combo class inherits versus overrides
  • Copy base styles - Apply the parent’s properties to other elements
  • Debug styling conflicts - Trace where specific CSS values originate
  • Build style auditing tools - Map the relationship between styles in a project

Syntax

1style.getParent(): Promise<Style | null>

Returns

Promise<Style | null>

A Promise that resolves to a Style object if a parent exists, or null if no parent is found.

Example

1// Audit combo class inheritance
2if (await style.isComboClass()) {
3 const parentStyle = await style.getParent();
4
5 if (parentStyle) {
6 const parentProps = await parentStyle.getProperties();
7 const comboProps = await style.getProperties();
8
9 console.log('Inherited from parent:', parentProps);
10 console.log('Overrides in combo class:', comboProps);
11 }
12} else {
13 console.log('Style is not a combo class - no parent exists');
14}

Try this example

Designer ability

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAny