candidateValue() — tailwindcss Function Reference
Architecture documentation for the candidateValue() function in theme.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 738ba3c2_c059_fd39_1c9e_294bee381139["candidateValue()"] 734cf7ec_fb2a_2532_7b20_b3a815c7e3e6["Theme"] 738ba3c2_c059_fd39_1c9e_294bee381139 -->|defined in| 734cf7ec_fb2a_2532_7b20_b3a815c7e3e6 1e748440_c17d_5c46_57bf_ba35ee3e3c39["isIgnoredThemeKey()"] 738ba3c2_c059_fd39_1c9e_294bee381139 -->|calls| 1e748440_c17d_5c46_57bf_ba35ee3e3c39 style 738ba3c2_c059_fd39_1c9e_294bee381139 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