TWShift in Action: Conversion Examples

See how TWShift intelligently converts various Tailwind CSS v3 configurations to the new v4 CSS-first format. These examples highlight common use cases and complex scenarios.

Basic Theme Customization (Colors & Spacing)
Demonstrates how theme extensions for colors, spacing, and screens are converted to v4 CSS variables within the @theme directive. Note the conversion of `px` to `rem` for breakpoints.

Tailwind v3 Config (tailwind.config.js)

Tailwind v4 Output (CSS-first)

Keyframes, Animations, and a Plugin
Shows migration of custom keyframes and animation utilities to @keyframes and @utility rules. Also demonstrates how a known official plugin is converted to the @plugin directive.

Tailwind v3 Config (tailwind.config.js)

Tailwind v4 Output (CSS-first)

Content Configuration and Dark Mode
Illustrates how `content` paths might translate to `@source` directives if complex, and how `darkMode` is handled (usually implicitly by v4).

Tailwind v3 Config (tailwind.config.js)

Tailwind v4 Output (CSS-first)