Working with JIT

Although Just in Time mode has just been added to Tailwind, it's the future of the platform. Let's take a look at how it works.


JIT Advantages

  • Small files
  • Arbitrary values
  • Variants enabled/stackable

In Just in Time mode, the main advantage is that it generates files that are based only on the existing classes on your projects, so the files will be much smaller.

Also, all variants will automatically be enabled. That means you won't have to modify the config file to turn them on.

Another HUGE advantage is that you can use any value you want, not just the ones available as official classes. Keep that in mind when looking through the rest of this course.


Arbitrary Values

/* color */
bg-[#f5e6c0]

/* width */
w-[150px]

Another cool feature is that you can now specify custom values. Although you can still use any of the built in values I'll be showing you in this course, the arbitrary values are super powerful since it creates only the styles for those.