Home / Function/ resolve() — tailwindcss Function Reference

resolve() — tailwindcss Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  fb0edc12_e3ff_ec56_83b9_8cf4f1b5f8e5["resolve()"]
  cebe77e1_f0f2_aeee_417e_2192f5790344["buildDesignSystem()"]
  cebe77e1_f0f2_aeee_417e_2192f5790344 -->|calls| fb0edc12_e3ff_ec56_83b9_8cf4f1b5f8e5
  ce40bfca_da92_1ec0_b286_244e5002cb7e["asColor()"]
  ce40bfca_da92_1ec0_b286_244e5002cb7e -->|calls| fb0edc12_e3ff_ec56_83b9_8cf4f1b5f8e5
  7d010542_1cda_a540_2ca4_161f665333e4["resolveThemeColor()"]
  7d010542_1cda_a540_2ca4_161f665333e4 -->|calls| fb0edc12_e3ff_ec56_83b9_8cf4f1b5f8e5
  84f8ccf2_2af5_fa7c_53f2_954b21183738["resolveValueFunction()"]
  84f8ccf2_2af5_fa7c_53f2_954b21183738 -->|calls| fb0edc12_e3ff_ec56_83b9_8cf4f1b5f8e5
  060c1795_30ba_0381_42f1_be224df086e8["get()"]
  fb0edc12_e3ff_ec56_83b9_8cf4f1b5f8e5 -->|calls| 060c1795_30ba_0381_42f1_be224df086e8
  style fb0edc12_e3ff_ec56_83b9_8cf4f1b5f8e5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/theme.ts lines 219–235

  resolve(
    candidateValue: string | null,
    themeKeys: ThemeKey[],
    options: ThemeOptions = ThemeOptions.NONE,
  ): string | null {
    let themeKey = this.#resolveKey(candidateValue, themeKeys)

    if (!themeKey) return null

    let value = this.values.get(themeKey)!

    if ((options | value.options) & ThemeOptions.INLINE) {
      return value.value
    }

    return this.#var(themeKey)
  }

Subdomains

Calls

Frequently Asked Questions

What does resolve() do?
resolve() is a function in the tailwindcss codebase.
What does resolve() call?
resolve() calls 1 function(s): get.
What calls resolve()?
resolve() is called by 4 function(s): asColor, buildDesignSystem, resolveThemeColor, resolveValueFunction.

Analyze Your Own Codebase

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

Try Supermodel Free