Home / Function/ expand() — tailwindcss Function Reference

expand() — tailwindcss Function Reference

Architecture documentation for the expand() function in expand-declaration.test.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  6f4989fd_689b_7bce_afb3_9718fc06d93c["expand()"]
  989dc85c_fd3b_d37b_10db_e189da171983["expand-declaration.test.ts"]
  6f4989fd_689b_7bce_afb3_9718fc06d93c -->|defined in| 989dc85c_fd3b_d37b_10db_e189da171983
  9d7d664d_b6fd_88fd_8800_4b530c33a95b["parse()"]
  6f4989fd_689b_7bce_afb3_9718fc06d93c -->|calls| 9d7d664d_b6fd_88fd_8800_4b530c33a95b
  4982d9ce_98d4_85d9_44af_7cc47b93c482["walk()"]
  6f4989fd_689b_7bce_afb3_9718fc06d93c -->|calls| 4982d9ce_98d4_85d9_44af_7cc47b93c482
  25758157_37c7_6a41_4b05_7fc8c0e52eed["expandDeclaration()"]
  6f4989fd_689b_7bce_afb3_9718fc06d93c -->|calls| 25758157_37c7_6a41_4b05_7fc8c0e52eed
  9b49f3c6_0c8d_5c62_965c_30a1db6499f8["toCss()"]
  6f4989fd_689b_7bce_afb3_9718fc06d93c -->|calls| 9b49f3c6_0c8d_5c62_965c_30a1db6499f8
  style 6f4989fd_689b_7bce_afb3_9718fc06d93c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/expand-declaration.test.ts lines 10–21

function expand(input: string, options: SignatureFeatures): string {
  let ast = parse(input)

  walk(ast, (node) => {
    if (node.kind === 'declaration') {
      let result = expandDeclaration(node, options)
      if (result) return WalkAction.ReplaceSkip(result)
    }
  })

  return toCss(ast)
}

Domain

Subdomains

Frequently Asked Questions

What does expand() do?
expand() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/expand-declaration.test.ts.
Where is expand() defined?
expand() is defined in packages/tailwindcss/src/expand-declaration.test.ts at line 10.
What does expand() call?
expand() calls 4 function(s): expandDeclaration, parse, toCss, walk.

Analyze Your Own Codebase

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

Try Supermodel Free