Tailwindcss-module: Extend Variants not working

Created on 21 Nov 2020  路  7Comments  路  Source: nuxt-community/tailwindcss-module

Version

"@nuxtjs/tailwindcss": "^3.1.0",
"nuxt": "^2.14.6"

This is my tailwind.config.js file

module.exports = {
  variants: {
    extend: {
      display: ['hover', 'focus'],
    },
  },
}

I add variants but i can not see hover:block or hover:hidden in my classes. hover:block not working.
My tailwind.config.js file works because i use corePlugins, it works

 corePlugins: {
   // ...
  display: false,
}
bug

Most helpful comment

As it happens.. It turns out that TailwindCSS 1.9.5 is brought in via @nuxtjs/tailwindcss

I resolved my problem by reading the docs for V1 of TailwindCSS (no extend in variants.. just explicit preferences):

https://v1.tailwindcss.com/docs/pseudo-class-variants#disabled

All 7 comments

I'm having a similar issue working with opacity: ['disabled'] not working as well. I'm doing the best I can to make sure that the contents of the application are scanned properly.

As it happens.. It turns out that TailwindCSS 1.9.5 is brought in via @nuxtjs/tailwindcss

I resolved my problem by reading the docs for V1 of TailwindCSS (no extend in variants.. just explicit preferences):

https://v1.tailwindcss.com/docs/pseudo-class-variants#disabled

@whardier Oh man, thanks for pointing out that the version of tailwindcss is still 1.x! Have been fighting this issue for nearly an hour.

As it happens.. It turns out that TailwindCSS 1.9.5 is brought in via @nuxtjs/tailwindcss

I resolved my problem by reading the docs for V1 of TailwindCSS (no extend in variants.. just explicit preferences):

https://v1.tailwindcss.com/docs/pseudo-class-variants#disabled

Yep, Thank you. I think this issue is about version. I'll wait for the next version

Could you confirm this bug is fixed when upgrading to Tailwind 2?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Zenthae picture Zenthae  路  9Comments

miketromba picture miketromba  路  4Comments

sausin picture sausin  路  4Comments

stevenho0811 picture stevenho0811  路  3Comments

webcoderkz picture webcoderkz  路  9Comments