Skip to content
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

Support dark and light adaptive props #14

Merged
merged 4 commits into from
Apr 8, 2022

Conversation

argyleink
Copy link
Collaborator

@argyleink argyleink commented Apr 8, 2022

fixes #11

todo:

  • add documentation

@argyleink argyleink self-assigned this Apr 8, 2022
@argyleink argyleink merged commit 257361d into main Apr 8, 2022
@argyleink argyleink deleted the support-dark-and-light-adaptive-props branch April 8, 2022 04:22
@PapiPeppers
Copy link

Is it possible to place the dark mode props under a specific class or attribute selector, instead of placing them into a media query? I have a theme toggle that updates a root data-attribute and class upon a toggle change event so placing the css variables into a prefers-color-scheme media query won't work.

I'm wondering if an option could be added to the plugin to specify where the props get placed (default: media query, custom: [data-attr, #id, .class, etc]), similar to the option to insert the props into a specified layer. The current -@media:dark syntax could be maintained if the plugin created the specified selectors instead of outputting props under the root selector in a media query.

@argyleink
Copy link
Collaborator Author

this is a very meaningful feature request! logged the feature request here #44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need a syntax (like -@) so jit-props can inject light/dark adaptive props
2 participants