Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TailwindCSS psuedo classes stop working after adding this #3

Closed
fayazara opened this issue Apr 16, 2020 · 2 comments
Closed

TailwindCSS psuedo classes stop working after adding this #3

fayazara opened this issue Apr 16, 2020 · 2 comments

Comments

@fayazara
Copy link

I tried adding this to my nuxt project along with Tailwindcss, the dark mode selectors were working fine, but default tailwind psuedo selectors like hover, focus etc stopped working.

Any idea how to fix this?

Here is a demo -https://github.com/fayazara/tailwind-nuxt-darkmode
Here is the git repo - https://github.com/fayazara/tailwind-nuxt-darkmode

@bdrtsky
Copy link
Contributor

bdrtsky commented Apr 16, 2020

Hey!

You have this:

variants: {
    backgroundColor: ['dark', 'dark-hover', 'dark-group-hover', 'dark-even', 'dark-odd'],
    borderColor: ['dark', 'dark-focus', 'dark-focus-within'],
    textColor: ['dark', 'dark-hover', 'dark-active']
},

While Tailwind docs says: "It's important to note that your array of variants is not merged with the defaults, so if you'd like to enable another variant for a utility, you need to repeat the default variants for that utility as well." https://tailwindcss.com/docs/configuring-variants/#app

Try to add hover states as well. Should work.

@fayazara
Copy link
Author

Worked, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants