Skip to content

Should work with a client side switch #44

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

Closed
argyleink opened this issue Oct 13, 2023 · 3 comments · Fixed by #45
Closed

Should work with a client side switch #44

argyleink opened this issue Oct 13, 2023 · 3 comments · Fixed by #45

Comments

@argyleink
Copy link
Contributor

see #14 (comment)

either this plugin should automatically place the props under a class/data attribute/etc with a generic set of selectors OR it should allow specifying what selector to additionally put the props under.

@PapiPeppers
Copy link

Could have 2 new config options: rootSelector, darkSelector. rootSelector defaults to :root, and darkSelector defaults to :root nested under @media (prefers-color-scheme: dark) same as the plugin does now. Or the options take a user provided css selector string such as ":root, .light, [data-color-mode=light]" for rootSelector or ".dark, [data-color-mode=dark]" for darkSelector.

@argyleink
Copy link
Contributor Author

the PR adds a new config entry for a custom dark selector. you could already pass a custom selector, but it applies to both light and dark preference. this entry allows you to specify a light mode entry and a dark mode entry https://github.com/GoogleChromeLabs/postcss-jit-props/pull/45/files#diff-59e25b254be93038f106111be580b6fb54c6963b6c4e7ef744e58fb8f2b3e3a2R416

argyleink added a commit that referenced this issue Oct 17, 2023
@argyleink
Copy link
Contributor Author

fixed in v1.0.14 👍🏻

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 a pull request may close this issue.

2 participants