resolveThemeValue() — tailwindcss Function Reference
Architecture documentation for the resolveThemeValue() function in apply-config-to-theme.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 80c6b9c7_f7d5_21ff_a3e4_25ec4a08f640["resolveThemeValue()"] 245c850a_c551_a2cf_854e_bba95b5a1339["apply-config-to-theme.ts"] 80c6b9c7_f7d5_21ff_a3e4_25ec4a08f640 -->|defined in| 245c850a_c551_a2cf_854e_bba95b5a1339 6f581ee0_818b_dbd1_5d05_0b64a3da62bd["createSpacingCache()"] 6f581ee0_818b_dbd1_5d05_0b64a3da62bd -->|calls| 80c6b9c7_f7d5_21ff_a3e4_25ec4a08f640 d7ab7b92_b8e0_123d_80fe_77ddad589042["resolveVariablesInValue()"] d7ab7b92_b8e0_123d_80fe_77ddad589042 -->|calls| 80c6b9c7_f7d5_21ff_a3e4_25ec4a08f640 fb60e614_817a_db22_d8eb_2bde7cd29719["applyCompatibilityHooks()"] fb60e614_817a_db22_d8eb_2bde7cd29719 -->|calls| 80c6b9c7_f7d5_21ff_a3e4_25ec4a08f640 1a022c10_a26e_d793_740c_267a533619c4["upgradeToFullPluginSupport()"] 1a022c10_a26e_d793_740c_267a533619c4 -->|calls| 80c6b9c7_f7d5_21ff_a3e4_25ec4a08f640 9fb2cb3b_46e1_4148_c220_0e7f4519db6d["applyConfigToTheme()"] 9fb2cb3b_46e1_4148_c220_0e7f4519db6d -->|calls| 80c6b9c7_f7d5_21ff_a3e4_25ec4a08f640 style 80c6b9c7_f7d5_21ff_a3e4_25ec4a08f640 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/compat/apply-config-to-theme.ts lines 5–20
function resolveThemeValue(value: unknown, subValue: string | null = null): string | null {
if (
Array.isArray(value) &&
value.length === 2 &&
typeof value[1] === 'object' &&
typeof value[1] !== null
) {
return subValue ? (value[1][subValue] ?? null) : value[0]
} else if (Array.isArray(value) && subValue === null) {
return value.join(', ')
} else if (typeof value === 'string' && subValue === null) {
return value
}
return null
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does resolveThemeValue() do?
resolveThemeValue() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/compat/apply-config-to-theme.ts.
Where is resolveThemeValue() defined?
resolveThemeValue() is defined in packages/tailwindcss/src/compat/apply-config-to-theme.ts at line 5.
What calls resolveThemeValue()?
resolveThemeValue() is called by 5 function(s): applyCompatibilityHooks, applyConfigToTheme, createSpacingCache, resolveVariablesInValue, upgradeToFullPluginSupport.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free