-
Notifications
You must be signed in to change notification settings - Fork 564
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
Adaptive dark theme #299
Labels
Comments
that's a great idea |
@jdanyow any update? Or can i use any workaround until then? |
you can do with javascript here's example const dark = window.matchMedia('(prefers-color-scheme: dark)').matches;
const currTheme = dark ? 'github-dark' : 'github-light';
const skript = document.createElement('script');
skript.src = "https://utteranc.es/client.js";
skript.crossOrigin = "anonymous";
skript.async = true;
skript.setAttribute('repo', "username/username.github.io");
skript.setAttribute('issue-term', "pathname");
skript.setAttribute('theme', currTheme);
document.body.appendChild(skript); |
@SwapnilSoni1999 thnx for this, it works perfectly |
Shipped 🕶️ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It'd be great to add adaptive dark mode styles based on
prefers-color-scheme
CSS modifier.The text was updated successfully, but these errors were encountered: