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 :) |
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
-
What is the example you wish to see?
In the
with-tailwindcss
example 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
Beta Was this translation helpful? Give feedback.
All reactions