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
  1e8a63fb_d767_393f_749f_708105a54264["expand()"]
  2aa0c849_e1bd_ca62_e1ac_c91753e5c84e["expand-declaration.test.ts"]
  1e8a63fb_d767_393f_749f_708105a54264 -->|defined in| 2aa0c849_e1bd_ca62_e1ac_c91753e5c84e
  b8a15b09_3dfb_7181_b1f8_368422e178e4["parse()"]
  1e8a63fb_d767_393f_749f_708105a54264 -->|calls| b8a15b09_3dfb_7181_b1f8_368422e178e4
  ed78da58_8727_ad98_120c_61f35cea357a["walk()"]
  1e8a63fb_d767_393f_749f_708105a54264 -->|calls| ed78da58_8727_ad98_120c_61f35cea357a
  8e1f22b2_13b1_c4b5_7edd_423453055d39["expandDeclaration()"]
  1e8a63fb_d767_393f_749f_708105a54264 -->|calls| 8e1f22b2_13b1_c4b5_7edd_423453055d39
  2da63033_d079_7b37_5cfb_3877674a70b9["toCss()"]
  1e8a63fb_d767_393f_749f_708105a54264 -->|calls| 2da63033_d079_7b37_5cfb_3877674a70b9
  style 1e8a63fb_d767_393f_749f_708105a54264 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