create-compat-config.ts — tailwindcss Source File
Architecture documentation for create-compat-config.ts, a typescript file in the tailwindcss codebase. 5 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR a0ec45fb_d162_d87d_7041_fadd217a3619["create-compat-config.ts"] e28cd4a7_4e1a_e79b_76f1_86c479c6640d["theme.ts"] a0ec45fb_d162_d87d_7041_fadd217a3619 --> e28cd4a7_4e1a_e79b_76f1_86c479c6640d e7a2e966_188e_28f5_d9d6_e54e27e0d0f2["Theme"] a0ec45fb_d162_d87d_7041_fadd217a3619 --> e7a2e966_188e_28f5_d9d6_e54e27e0d0f2 4b9fb355_7055_4825_6db8_a5dd6f45c06e["default-theme.ts"] a0ec45fb_d162_d87d_7041_fadd217a3619 --> 4b9fb355_7055_4825_6db8_a5dd6f45c06e 479eaf18_f640_94ff_bd07_456688f9ac14["types.ts"] a0ec45fb_d162_d87d_7041_fadd217a3619 --> 479eaf18_f640_94ff_bd07_456688f9ac14 f049ff67_bd94_009a_5905_62bd3c9f309b["UserConfig"] a0ec45fb_d162_d87d_7041_fadd217a3619 --> f049ff67_bd94_009a_5905_62bd3c9f309b 2745c5e0_8ea4_a1c7_4f84_369746e3eb63["apply-compat-hooks.ts"] 2745c5e0_8ea4_a1c7_4f84_369746e3eb63 --> a0ec45fb_d162_d87d_7041_fadd217a3619 style a0ec45fb_d162_d87d_7041_fadd217a3619 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { Theme } from '../../theme'
import defaultTheme from '../default-theme'
import type { UserConfig } from './types'
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
Functions
Dependencies
Source
Frequently Asked Questions
What does create-compat-config.ts do?
create-compat-config.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the Oxide domain, Scanner subdomain.
What functions are defined in create-compat-config.ts?
create-compat-config.ts defines 1 function(s): createCompatConfig.
What does create-compat-config.ts depend on?
create-compat-config.ts imports 5 module(s): Theme, UserConfig, default-theme.ts, theme.ts, types.ts.
What files import create-compat-config.ts?
create-compat-config.ts is imported by 1 file(s): apply-compat-hooks.ts.
Where is create-compat-config.ts in the architecture?
create-compat-config.ts is located at packages/tailwindcss/src/compat/config/create-compat-config.ts (domain: Oxide, subdomain: Scanner, directory: packages/tailwindcss/src/compat/config).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free