toggle theme troubleshoot tailwind css #17237
Unanswered
umair-sajjad
asked this question in
Help
Replies: 1 comment
-
You'd want to use @custom-variant dark (&:where(.dark, .dark *)); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is code of my page.jsx
and global.css only includes
@import "tailwindcss";
but theme is not toggling. Only dark classes applying on the page, and when I include
@variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
in global.css then light theme appears but toggle button stucks on light theme.
i cant figure out what is the problem. I search a lot but only figure out that may be problem is with prefer-color-scheme
Anybody knows the solution kindly reply me...
Beta Was this translation helpful? Give feedback.
All reactions