question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adaptive dark theme

See original GitHub issue

It’d be great to add adaptive dark mode styles based on prefers-color-scheme CSS modifier.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jdanyowcommented, May 10, 2020

Shipped 🕶️

2reactions
SwapnilSoni1999commented, May 9, 2020

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);
Read more comments on GitHub >

github_iconTop Results From Across the Web

adaptive_theme | Flutter Package - Pub.dev
Easiest way to add support for light and dark theme in your Flutter app. It allows to manually set light or dark theme...
Read more >
Dark theme - Android Developers
Use the system setting (Settings -> Display -> Theme) to enable Dark theme. Use the Quick Settings tile to switch themes from the...
Read more >
Dark Mode with adaptive theme - Samsung Community
The adaptive theme colors from the wallpaper are pretty apparent in light mode, but it's not nearly as apparent in dark mode.
Read more >
How to turn on dark mode on all your apps and devices
To turn on dark mode on an Android operating system, go to settings either by pulling down the notifications bar all the way...
Read more >
Supporting Dark Mode in Your Interface - Apple Developer
Choose Adaptive Colors for Your UI · Choose semantic colors instead of fixed color values. When configuring UI elements, choose colors with names...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found