Dark Mode / Light Mode switching not working manually with FastHTML and standalone TailwindCSS executable on Windows #18697
Replies: 1 comment 1 reply
-
Consider providing a git repo that reproduces the issue and we can take a look for you. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
I am completely stuck. I am using the lastest TailwindCSS with FastHTML (Python) and it's been working as expected until now. For some unfathomable reason, the dark mode will only work based on the mode set by my browser (so the default behaviour, as I understand it).
I added
@custom-variant dark (&:where(.dark, .dark *));
to my input CSS file as indicated by the documentation so that adding or removing "dark" class from my<html>
tag should trigger the switch between these modes... except it doesn't.Looking at my output CSS, I see no indication that the variant is being processed at all. I've tried no config file (since it's v4) and creating a config file (with no effect).
I've tried pouring through Tailwind docs, FastHTML docs, YouTube videos, hours wasted with ChatGPT... I can't find a reason for this. There is nothing out there that talks about this issue with the setup I am using.
Any ideas from the community would be amazing!
--
What version of Tailwind CSS are you using?
v4.1.11
What build tool (or framework if it abstracts the build tool) are you using?
FastHTML (Python)
What version of Node.js are you using?
none -- using the Standalone TailwindCSS executable
What browser are you using?
Chrome
What operating system are you using?
Windows 10 x64
Beta Was this translation helpful? Give feedback.
All reactions