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
  e6db46b5_0cdf_2502_9206_17333e8fd473["walkDepth()"]
  41fd12a7_15c2_7d83_2e55_c5b9a8faf9b1["stylesheet.ts"]
  e6db46b5_0cdf_2502_9206_17333e8fd473 -->|defined in| 41fd12a7_15c2_7d83_2e55_c5b9a8faf9b1
  4d021142_8ab8_64dd_9dd3_89c5a94806be["ancestors()"]
  4d021142_8ab8_64dd_9dd3_89c5a94806be -->|calls| e6db46b5_0cdf_2502_9206_17333e8fd473
  c95c15d3_40c1_8edb_aa86_c69313b20391["descendants()"]
  c95c15d3_40c1_8edb_aa86_c69313b20391 -->|calls| e6db46b5_0cdf_2502_9206_17333e8fd473
  541f0913_4821_09d0_f31d_05489c40ddc7["layers()"]
  541f0913_4821_09d0_f31d_05489c40ddc7 -->|calls| e6db46b5_0cdf_2502_9206_17333e8fd473
  b3bea8bf_aced_dc7a_9ad8_9a35f737e64e["pathsToRoot()"]
  b3bea8bf_aced_dc7a_9ad8_9a35f737e64e -->|calls| e6db46b5_0cdf_2502_9206_17333e8fd473
  style e6db46b5_0cdf_2502_9206_17333e8fd473 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,
    }
  }
}

Subdomains

Frequently Asked Questions

What does walkDepth() do?
walkDepth() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/stylesheet.ts.
Where is walkDepth() defined?
walkDepth() is defined in packages/@tailwindcss-upgrade/src/stylesheet.ts at line 300.
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