candidateValue() — tailwindcss Function Reference
Architecture documentation for the candidateValue() function in theme.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 917bf807_c513_0946_6895_463050ce5af5["candidateValue()"] 920fa641_ed52_ddfd_34d9_7c29c44ecdd8["isIgnoredThemeKey()"] 917bf807_c513_0946_6895_463050ce5af5 -->|calls| 920fa641_ed52_ddfd_34d9_7c29c44ecdd8 style 917bf807_c513_0946_6895_463050ce5af5 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
Calls
Source
Frequently Asked Questions
What does candidateValue() do?
candidateValue() is a function in the tailwindcss codebase.
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