Loading
Current section: Preparing for Tailwind v4 6 exercises
lesson

Migrate Tailwind v3 to v4

Loading lesson

Transcript

00:00 So far in this workshop, we've done all of our theme configuration in the JavaScript Tailwind config file. Up to Tailwind version 3, this is the only way that you can configure your theme. Tailwind version 4 has a brand new way of configuring your theme directly in CSS with CSS variables.

00:15 The JavaScript config file will still work, but the CSS configuration simplifies a lot of stuff. Now, this doesn't mean that what we've done so far is not useful knowledge. You might be working on a v3 project where you have to do things in the JavaScript configuration. This knowledge is not going anywhere, but to make sure that you understand how the CSS config works

00:33 in version 4, we're going to take everything that we've defined in JavaScript and move that to CSS using CSS variables. We're going to port our custom breakpoints, font sizes, color, font family, keyframes, everything. Are you ready? Let's jump in!