createCompatConfig() — tailwindcss Function Reference
Architecture documentation for the createCompatConfig() function in create-compat-config.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD f2c40930_6a99_f9d8_d175_a2d0244b3fec["createCompatConfig()"] 0f8ac574_990e_8595_a6ed_11422b8a8ec4["upgradeToFullPluginSupport()"] 0f8ac574_990e_8595_a6ed_11422b8a8ec4 -->|calls| f2c40930_6a99_f9d8_d175_a2d0244b3fec 060c1795_30ba_0381_42f1_be224df086e8["get()"] f2c40930_6a99_f9d8_d175_a2d0244b3fec -->|calls| 060c1795_30ba_0381_42f1_be224df086e8 style f2c40930_6a99_f9d8_d175_a2d0244b3fec fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/compat/config/create-compat-config.ts lines 5–63
export function createCompatConfig(cssTheme: Theme): UserConfig {
return {
theme: {
...defaultTheme,
// In the defaultTheme config, the `colors` key is not a function but a
// shallow object. We don't want to define the color namespace unless it
// is in the CSS theme so here we explicitly overwrite the defaultTheme
// and only allow colors from the CSS theme.
colors: ({ theme }) => theme('color', {}),
extend: {
fontSize: ({ theme }) => ({
...theme('text', {}),
}),
boxShadow: ({ theme }) => ({
...theme('shadow', {}),
}),
animation: ({ theme }) => ({
...theme('animate', {}),
}),
aspectRatio: ({ theme }) => ({
...theme('aspect', {}),
}),
borderRadius: ({ theme }) => ({
...theme('radius', {}),
}),
screens: ({ theme }) => ({
...theme('breakpoint', {}),
}),
letterSpacing: ({ theme }) => ({
...theme('tracking', {}),
}),
lineHeight: ({ theme }) => ({
...theme('leading', {}),
}),
transitionDuration: {
DEFAULT: cssTheme.get(['--default-transition-duration']) ?? null,
},
transitionTimingFunction: {
DEFAULT: cssTheme.get(['--default-transition-timing-function']) ?? null,
},
maxWidth: ({ theme }) => ({
...theme('container', {}),
}),
},
},
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does createCompatConfig() do?
createCompatConfig() is a function in the tailwindcss codebase.
What does createCompatConfig() call?
createCompatConfig() calls 1 function(s): get.
What calls createCompatConfig()?
createCompatConfig() is called by 1 function(s): upgradeToFullPluginSupport.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free