sansil / vt-notifications

A headless vue notification library to use with tailwind
MIT License
90 stars 17 forks source link

Transitions doesn't work with Tailwind JIT #9

Closed mtzrmzia closed 3 years ago

mtzrmzia commented 3 years ago

If I have JIT enabled in the tailwindCSS configuration the transitions do not apply. how can i enabled this transitions with JIT?

mtzrmzia commented 3 years ago

update: working with Nuxt, I found a tricky solution: Create a safelist.txt that contains all the classes you want to protect (in this case, the transition classes):

transform
ease-out
duration-300
transition
delay-300
translate-y-2
opacity-0
opacity-100
sm:translate-y-0
sm:translate-x-4
translate-y-0
opacity-100
sm:translate-x-0
ease-in
duration-500

then call the file on the content section of the purge

purge: {
    content: [
      './safelist.txt',
    ],
  },

and works