Home / Function/ markUsedVariable() — tailwindcss Function Reference

markUsedVariable() — tailwindcss Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  f4b2481e_23ea_2f5c_fdf6_9834ac412e37["markUsedVariable()"]
  cebe77e1_f0f2_aeee_417e_2192f5790344["buildDesignSystem()"]
  cebe77e1_f0f2_aeee_417e_2192f5790344 -->|calls| f4b2481e_23ea_2f5c_fdf6_9834ac412e37
  6a3a8ab4_d53c_7516_c736_663c060fe979["compileAst()"]
  6a3a8ab4_d53c_7516_c736_663c060fe979 -->|calls| f4b2481e_23ea_2f5c_fdf6_9834ac412e37
  03501eb1_e642_df92_15b1_af590e3332fb["unescape()"]
  f4b2481e_23ea_2f5c_fdf6_9834ac412e37 -->|calls| 03501eb1_e642_df92_15b1_af590e3332fb
  060c1795_30ba_0381_42f1_be224df086e8["get()"]
  f4b2481e_23ea_2f5c_fdf6_9834ac412e37 -->|calls| 060c1795_30ba_0381_42f1_be224df086e8
  style f4b2481e_23ea_2f5c_fdf6_9834ac412e37 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
  }

Subdomains

Frequently Asked Questions

What does markUsedVariable() do?
markUsedVariable() is a function in the tailwindcss codebase.
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