onlyAllowedThemeValues() — tailwindcss Function Reference
Architecture documentation for the onlyAllowedThemeValues() function in migrate-js-config.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 220d18cf_fa97_55bb_9b09_4d63ca376b8b["onlyAllowedThemeValues()"] ffe9c87e_35ad_f431_9625_80fc875792a7["migrate-js-config.ts"] 220d18cf_fa97_55bb_9b09_4d63ca376b8b -->|defined in| ffe9c87e_35ad_f431_9625_80fc875792a7 15b378ea_3aa4_54e9_344a_eae392b6770c["canMigrateConfig()"] 15b378ea_3aa4_54e9_344a_eae392b6770c -->|calls| 220d18cf_fa97_55bb_9b09_4d63ca376b8b style 220d18cf_fa97_55bb_9b09_4d63ca376b8b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/@tailwindcss-upgrade/src/codemods/config/migrate-js-config.ts lines 474–489
function onlyAllowedThemeValues(theme: ThemeConfig): boolean {
for (let key of Object.keys(theme)) {
if (!ALLOWED_THEME_KEYS.includes(key)) {
return false
}
}
if ('screens' in theme && typeof theme.screens === 'object' && theme.screens !== null) {
for (let screen of Object.values(theme.screens)) {
if (typeof screen === 'object' && screen !== null && ('max' in screen || 'raw' in screen)) {
return false
}
}
}
return true
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does onlyAllowedThemeValues() do?
onlyAllowedThemeValues() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/codemods/config/migrate-js-config.ts.
Where is onlyAllowedThemeValues() defined?
onlyAllowedThemeValues() is defined in packages/@tailwindcss-upgrade/src/codemods/config/migrate-js-config.ts at line 474.
What calls onlyAllowedThemeValues()?
onlyAllowedThemeValues() is called by 1 function(s): canMigrateConfig.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free