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 5076bf17_3f31_7ece_dff7_43a9f651187c["createCompatConfig()"] 834afcdc_4770_404f_cd35_c37419fcda33["create-compat-config.ts"] 5076bf17_3f31_7ece_dff7_43a9f651187c -->|defined in| 834afcdc_4770_404f_cd35_c37419fcda33 1a022c10_a26e_d793_740c_267a533619c4["upgradeToFullPluginSupport()"] 1a022c10_a26e_d793_740c_267a533619c4 -->|calls| 5076bf17_3f31_7ece_dff7_43a9f651187c 378e03e8_d700_b258_53b3_5bd078db1e2b["get()"] 5076bf17_3f31_7ece_dff7_43a9f651187c -->|calls| 378e03e8_d700_b258_53b3_5bd078db1e2b style 5076bf17_3f31_7ece_dff7_43a9f651187c 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, defined in packages/tailwindcss/src/compat/config/create-compat-config.ts.
Where is createCompatConfig() defined?
createCompatConfig() is defined in packages/tailwindcss/src/compat/config/create-compat-config.ts at line 5.
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