candidateValue() — tailwindcss Function Reference
Architecture documentation for the candidateValue() function in theme.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 4dd03b32_d6c0_17e9_28a2_23655bd4448e["candidateValue()"] e7a2e966_188e_28f5_d9d6_e54e27e0d0f2["Theme"] 4dd03b32_d6c0_17e9_28a2_23655bd4448e -->|defined in| e7a2e966_188e_28f5_d9d6_e54e27e0d0f2 c57fb6e1_ab34_85bb_bfd1_d983c6dca814["isIgnoredThemeKey()"] 4dd03b32_d6c0_17e9_28a2_23655bd4448e -->|calls| c57fb6e1_ab34_85bb_bfd1_d983c6dca814 style 4dd03b32_d6c0_17e9_28a2_23655bd4448e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/theme.ts lines 168–191
#resolveKey(candidateValue: string | null, themeKeys: ThemeKey[]): string | null {
for (let namespace of themeKeys) {
let themeKey =
candidateValue !== null ? (`${namespace}-${candidateValue}` as ThemeKey) : namespace
if (!this.values.has(themeKey)) {
// If the exact theme key is not found, we might be trying to resolve a key containing a dot
// that was registered with an underscore instead:
if (candidateValue !== null && candidateValue.includes('.')) {
themeKey = `${namespace}-${candidateValue.replaceAll('.', '_')}` as ThemeKey
if (!this.values.has(themeKey)) continue
} else {
continue
}
}
if (isIgnoredThemeKey(themeKey, namespace)) continue
return themeKey
}
return null
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does candidateValue() do?
candidateValue() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/theme.ts.
Where is candidateValue() defined?
candidateValue() is defined in packages/tailwindcss/src/theme.ts at line 168.
What does candidateValue() call?
candidateValue() calls 1 function(s): isIgnoredThemeKey.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free