themeableValues() — tailwindcss Function Reference
Architecture documentation for the themeableValues() function in apply-config-to-theme.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 961a5671_178b_5937_79ae_2463c9fb3bc9["themeableValues()"] 8d84257d_f3b2_cdf8_542f_835967da0481["apply-config-to-theme.ts"] 961a5671_178b_5937_79ae_2463c9fb3bc9 -->|defined in| 8d84257d_f3b2_cdf8_542f_835967da0481 253815a9_405f_ff30_32b6_577fe2d91fb2["migrateTheme()"] 253815a9_405f_ff30_32b6_577fe2d91fb2 -->|calls| 961a5671_178b_5937_79ae_2463c9fb3bc9 652fb7ad_2f22_0667_c96e_43b408d0edbe["applyConfigToTheme()"] 652fb7ad_2f22_0667_c96e_43b408d0edbe -->|calls| 961a5671_178b_5937_79ae_2463c9fb3bc9 3c5fd219_14a5_c325_da58_a54d19bbbdd4["walk()"] 961a5671_178b_5937_79ae_2463c9fb3bc9 -->|calls| 3c5fd219_14a5_c325_da58_a54d19bbbdd4 6da26e58_87db_b3e8_5032_0c43d6f0d7e8["isValidThemePrimitive()"] 961a5671_178b_5937_79ae_2463c9fb3bc9 -->|calls| 6da26e58_87db_b3e8_5032_0c43d6f0d7e8 4b7ca2d9_75a2_87ac_b992_92d7fb86a3c2["isValidThemeTuple()"] 961a5671_178b_5937_79ae_2463c9fb3bc9 -->|calls| 4b7ca2d9_75a2_87ac_b992_92d7fb86a3c2 style 961a5671_178b_5937_79ae_2463c9fb3bc9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/compat/apply-config-to-theme.ts lines 112–148
export function themeableValues(config: ResolvedConfig['theme']): [string[], unknown][] {
let toAdd: [string[], unknown][] = []
walk(config as any, [], (value, path) => {
if (isValidThemePrimitive(value)) {
toAdd.push([path, value])
return WalkAction.Skip
}
if (isValidThemeTuple(value)) {
toAdd.push([path, value[0]])
for (let key of Reflect.ownKeys(value[1]) as string[]) {
toAdd.push([[...path, `-${key}`], value[1][key]])
}
return WalkAction.Skip
}
if (Array.isArray(value) && value.every((v) => typeof v === 'string')) {
if (path[0] === 'fontSize') {
toAdd.push([path, value[0]])
if (value.length >= 2) {
toAdd.push([[...path, '-line-height'], value[1]])
}
} else {
toAdd.push([path, value.join(', ')])
}
return WalkAction.Skip
}
})
return toAdd
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does themeableValues() do?
themeableValues() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/compat/apply-config-to-theme.ts.
Where is themeableValues() defined?
themeableValues() is defined in packages/tailwindcss/src/compat/apply-config-to-theme.ts at line 112.
What does themeableValues() call?
themeableValues() calls 3 function(s): isValidThemePrimitive, isValidThemeTuple, walk.
What calls themeableValues()?
themeableValues() is called by 2 function(s): applyConfigToTheme, migrateTheme.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free