-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
does not work when using prefix? #11
Comments
Thanks for pointing this out! Will implement a custom darkSelector in the next release to address the issue. Please let me know if you find any other issue with Nightwind when using a prefix, as I'll be fixing those as well |
Hi @jjranalli, I see you tagged a new release but I didn't see anything about a custom darkSelector in there. I'm still unable to use nightwind when using a prefix (such as 'tw-') But it does work if I don't use a prefix. Any chance you can release this custom darkSelector? I believe what you mean by that is that you'll allow us to set the custom selector? Or ideally you would just be able to make use of whatever prefix we have set in our tailwind config file. If you don't feel like you can release this soon, I would appreciate a little more understanding about how I may be able to extend it and make it work with a prefix myself. Many thanks! |
I tried to solve it myself. I imported your package as a local module and made the following modifications: Essentially I added
|
I use the
tw-
prefix and I've noticed that when applying dark mode manually (not using your plugin here) it only works if I add the classtw-dark
to the root element. Addingdark
does not work. Since your toggle adds and removesdark
and doesn't take into considering the prefix.. then I believe this wouldn't work for those of us that use a prefixThe text was updated successfully, but these errors were encountered: