resolveWith() — tailwindcss Function Reference
Architecture documentation for the resolveWith() function in theme.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 4e726f50_1e91_dbf7_ae25_7c2d717736b7["resolveWith()"] e7a2e966_188e_28f5_d9d6_e54e27e0d0f2["Theme"] 4e726f50_1e91_dbf7_ae25_7c2d717736b7 -->|defined in| e7a2e966_188e_28f5_d9d6_e54e27e0d0f2 b1961b55_1394_8973_5694_152fd6b3140a["resolveValueFunction()"] b1961b55_1394_8973_5694_152fd6b3140a -->|calls| 4e726f50_1e91_dbf7_ae25_7c2d717736b7 c6703f6a_b776_5326_6e96_8faaab8a851f["get()"] 4e726f50_1e91_dbf7_ae25_7c2d717736b7 -->|calls| c6703f6a_b776_5326_6e96_8faaab8a851f style 4e726f50_1e91_dbf7_ae25_7c2d717736b7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/theme.ts lines 245–274
resolveWith(
candidateValue: string,
themeKeys: ThemeKey[],
nestedKeys: `--${string}`[] = [],
): [string, Record<string, string>] | null {
let themeKey = this.#resolveKey(candidateValue, themeKeys)
if (!themeKey) return null
let extra = {} as Record<string, string>
for (let name of nestedKeys) {
let nestedKey = `${themeKey}${name}`
let nestedValue = this.values.get(nestedKey)!
if (!nestedValue) continue
if (nestedValue.options & ThemeOptions.INLINE) {
extra[name] = nestedValue.value
} else {
extra[name] = this.#var(nestedKey)!
}
}
let value = this.values.get(themeKey)!
if (value.options & ThemeOptions.INLINE) {
return [value.value, extra]
}
return [this.#var(themeKey)!, extra]
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does resolveWith() do?
resolveWith() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/theme.ts.
Where is resolveWith() defined?
resolveWith() is defined in packages/tailwindcss/src/theme.ts at line 245.
What does resolveWith() call?
resolveWith() calls 1 function(s): get.
What calls resolveWith()?
resolveWith() is called by 1 function(s): resolveValueFunction.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free