Home / Function/ markUsedVariable() — tailwindcss Function Reference

markUsedVariable() — tailwindcss Function Reference

Architecture documentation for the markUsedVariable() function in theme.ts from the tailwindcss codebase.

Function typescript Oxide Scanner calls 2 called by 2

Entity Profile

Dependency Diagram

graph TD
  9df67824_a508_b69d_ab39_217fd335ee36["markUsedVariable()"]
  e7a2e966_188e_28f5_d9d6_e54e27e0d0f2["Theme"]
  9df67824_a508_b69d_ab39_217fd335ee36 -->|defined in| e7a2e966_188e_28f5_d9d6_e54e27e0d0f2
  e557c8a4_bb27_ee44_c462_9e238157ad04["buildDesignSystem()"]
  e557c8a4_bb27_ee44_c462_9e238157ad04 -->|calls| 9df67824_a508_b69d_ab39_217fd335ee36
  95f6fed7_1762_4f0d_f308_50c6be9a770a["compileAst()"]
  95f6fed7_1762_4f0d_f308_50c6be9a770a -->|calls| 9df67824_a508_b69d_ab39_217fd335ee36
  87a17ea2_6c8d_3d38_bd46_25d9267eeac0["unescape()"]
  9df67824_a508_b69d_ab39_217fd335ee36 -->|calls| 87a17ea2_6c8d_3d38_bd46_25d9267eeac0
  c6703f6a_b776_5326_6e96_8faaab8a851f["get()"]
  9df67824_a508_b69d_ab39_217fd335ee36 -->|calls| c6703f6a_b776_5326_6e96_8faaab8a851f
  style 9df67824_a508_b69d_ab39_217fd335ee36 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/theme.ts lines 210–217

  markUsedVariable(themeKey: string): boolean {
    let key = unescape(this.#unprefixKey(themeKey))
    let value = this.values.get(key)
    if (!value) return false
    let isUsed = value.options & ThemeOptions.USED
    value.options |= ThemeOptions.USED
    return !isUsed
  }

Domain

Subdomains

Frequently Asked Questions

What does markUsedVariable() do?
markUsedVariable() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/theme.ts.
Where is markUsedVariable() defined?
markUsedVariable() is defined in packages/tailwindcss/src/theme.ts at line 210.
What does markUsedVariable() call?
markUsedVariable() calls 2 function(s): get, unescape.
What calls markUsedVariable()?
markUsedVariable() is called by 2 function(s): buildDesignSystem, compileAst.

Analyze Your Own Codebase

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

Try Supermodel Free