migrateMaxWidthScreen() — tailwindcss Function Reference
Architecture documentation for the migrateMaxWidthScreen() function in migrate-max-width-screen.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 579a7acb_b2c1_89ea_306c_08f82c9735cf["migrateMaxWidthScreen()"] 0d83b47a_e74a_3b55_ee7e_a502119edad8["migrate-max-width-screen.ts"] 579a7acb_b2c1_89ea_306c_08f82c9735cf -->|defined in| 0d83b47a_e74a_3b55_ee7e_a502119edad8 style 579a7acb_b2c1_89ea_306c_08f82c9735cf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/@tailwindcss-upgrade/src/codemods/template/migrate-max-width-screen.ts lines 4–25
export function migrateMaxWidthScreen(
designSystem: DesignSystem,
_userConfig: Config | null,
rawCandidate: string,
): string {
for (let candidate of designSystem.parseCandidate(rawCandidate)) {
if (
candidate.kind === 'functional' &&
candidate.root === 'max-w' &&
candidate.value?.value.startsWith('screen-')
) {
return designSystem.printCandidate({
...candidate,
value: {
...candidate.value,
value: `[theme(screens.${candidate.value.value.slice(7)})]`,
},
})
}
}
return rawCandidate
}
Domain
Subdomains
Source
Frequently Asked Questions
What does migrateMaxWidthScreen() do?
migrateMaxWidthScreen() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/codemods/template/migrate-max-width-screen.ts.
Where is migrateMaxWidthScreen() defined?
migrateMaxWidthScreen() is defined in packages/@tailwindcss-upgrade/src/codemods/template/migrate-max-width-screen.ts at line 4.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free