Support @media (prefers-color-scheme: dark) within @theme #13436
The-Code-Monkey
started this conversation in
Ideas
Replies: 5 comments 1 reply
-
Bump |
Beta Was this translation helpful? Give feedback.
0 replies
-
Bump |
Beta Was this translation helpful? Give feedback.
0 replies
-
Any update on this |
Beta Was this translation helpful? Give feedback.
0 replies
-
Bump |
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
Uh oh!
There was an error while loading. Please reload this page.
-
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