Repository navigation
Replies: 1 comment
|
`import type { PlasmoCSConfig } from 'plasmo' export const config: PlasmoCSConfig = { const bodyClassList = document.body.classList bodyClassList.contains('vd-theme--use-dark-mode') ? bodyClassList.add('dark') : bodyClassList.remove('dark') I just used a class check condition that looks for the website's dark mode setting they inject in the body and inserted the tw class dark :) |
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.
What is the example you wish to see?
In the
with-tailwindcssexample the content.tsx usesdark:classes.In my experiments, can't get tailwind to recognise dark mode of the current page.
Neither if
<html class="dark"...is set nor if<html data-color-mode="dark"with the suggesteddarkMode: ['class', '[data-color-mode="dark"]']tailwind config setup.Is there any context that might help us understand?
Debugging context so far:
https://discord.com/channels/946290204443025438/1035409196218331238/1037474596192014446
Code of Conduct
All reactions