Support @media (prefers-color-scheme: dark) within @theme #13436
The-Code-Monkey
started this conversation in
Ideas
Replies: 5 comments 1 reply
-
Any update on this |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can do this without @theme {
--color-text: #000;
--color-text-inverse: #fff;
}
@media (prefers-color-scheme: dark) {
:root {
--color-text: #fff;
--color-text-inverse: #000;
}
} |
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
-
I had an idea to support color differences using inbuilt css rather than prefixing and writing this media query everywhere.
I have tested this out and in chrome adding this to the theme directive seems to work
I think logic like this should be allowed and would allow for a lot more flexibility especially in component libraries made using tailwind v4
Beta Was this translation helpful? Give feedback.
All reactions