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 4b7a4cd6_9f02_0b91_8991_3889a44cd62f["resolveThemeValue()"] 0043d7b5_bba3_2709_5125_355abd3b6888["createSpacingCache()"] 0043d7b5_bba3_2709_5125_355abd3b6888 -->|calls| 4b7a4cd6_9f02_0b91_8991_3889a44cd62f 88e17ede_e457_4c87_d3c8_c491a1795810["resolveVariablesInValue()"] 88e17ede_e457_4c87_d3c8_c491a1795810 -->|calls| 4b7a4cd6_9f02_0b91_8991_3889a44cd62f d0cd8e91_7dbc_4e3d_f621_705d53f7a49e["applyCompatibilityHooks()"] d0cd8e91_7dbc_4e3d_f621_705d53f7a49e -->|calls| 4b7a4cd6_9f02_0b91_8991_3889a44cd62f 9056089b_151f_3027_844b_242ce55294db["upgradeToFullPluginSupport()"] 9056089b_151f_3027_844b_242ce55294db -->|calls| 4b7a4cd6_9f02_0b91_8991_3889a44cd62f 0a0af711_c5b8_1a31_60fe_678ff9771f13["applyConfigToTheme()"] 0a0af711_c5b8_1a31_60fe_678ff9771f13 -->|calls| 4b7a4cd6_9f02_0b91_8991_3889a44cd62f style 4b7a4cd6_9f02_0b91_8991_3889a44cd62f 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.
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