Home / Function/ walkDepth() — tailwindcss Function Reference

walkDepth() — tailwindcss Function Reference

Architecture documentation for the walkDepth() function in stylesheet.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  aa43ea12_7b1e_a0b6_b963_a4fcd9efa7c8["walkDepth()"]
  77abe8a1_95ef_fa17_b8b8_8defdf785383["ancestors()"]
  77abe8a1_95ef_fa17_b8b8_8defdf785383 -->|calls| aa43ea12_7b1e_a0b6_b963_a4fcd9efa7c8
  d1895332_3f02_672c_c4b9_5e3c0cbdd379["descendants()"]
  d1895332_3f02_672c_c4b9_5e3c0cbdd379 -->|calls| aa43ea12_7b1e_a0b6_b963_a4fcd9efa7c8
  668f5374_db48_b9d6_46d9_c991d48ffb6c["layers()"]
  668f5374_db48_b9d6_46d9_c991d48ffb6c -->|calls| aa43ea12_7b1e_a0b6_b963_a4fcd9efa7c8
  d6f62274_b443_7cf5_a1aa_cdeda7702f06["pathsToRoot()"]
  d6f62274_b443_7cf5_a1aa_cdeda7702f06 -->|calls| aa43ea12_7b1e_a0b6_b963_a4fcd9efa7c8
  style aa43ea12_7b1e_a0b6_b963_a4fcd9efa7c8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/stylesheet.ts lines 300–314

function* walkDepth(
  value: Stylesheet,
  connections: (value: Stylesheet) => Iterable<StylesheetConnection>,
  path: StylesheetConnection[] = [],
): Iterable<{ item: Stylesheet; path: StylesheetConnection[] }> {
  for (let connection of connections(value)) {
    let newPath = [...path, connection]

    yield* walkDepth(connection.item, connections, newPath)
    yield {
      item: connection.item,
      path: newPath,
    }
  }
}

Domain

Subdomains

Frequently Asked Questions

What does walkDepth() do?
walkDepth() is a function in the tailwindcss codebase.
What calls walkDepth()?
walkDepth() is called by 4 function(s): ancestors, descendants, layers, pathsToRoot.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free