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 7e2a5db3_0c6f_b3d9_be6d_22a6fc31669d["migrateMaxWidthScreen()"] cc6b9529_7b9f_e67e_d645_39c9d1a98330["migrate-max-width-screen.ts"] 7e2a5db3_0c6f_b3d9_be6d_22a6fc31669d -->|defined in| cc6b9529_7b9f_e67e_d645_39c9d1a98330 style 7e2a5db3_0c6f_b3d9_be6d_22a6fc31669d 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